mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-08 13:37:35 +02:00
generate_drop_prev shouldn't apply its optimization to arbitrary opcodes
returning void since some may be mutating.
This commit is contained in:
parent
a2ca973c4f
commit
72ce309918
1 changed files with 1 additions and 3 deletions
4
vm.c
4
vm.c
|
@ -165,9 +165,7 @@ static void generate_lit (sexp ctx, sexp value) {
|
|||
static void generate_drop_prev (sexp ctx, sexp prev) {
|
||||
#if ! SEXP_USE_ALIGNED_BYTECODE
|
||||
if ((sexp_pairp(prev) && sexp_opcodep(sexp_car(prev))
|
||||
&& ((sexp_opcode_return_type(sexp_car(prev)) == SEXP_VOID
|
||||
&& sexp_opcode_class(sexp_car(prev)) != SEXP_OPC_FOREIGN)
|
||||
|| (sexp_opcode_code(sexp_car(prev)) == SEXP_OP_PUSH)))
|
||||
&& (sexp_opcode_code(sexp_car(prev)) == SEXP_OP_PUSH))
|
||||
|| sexp_setp(prev) || sexp_litp(prev) || prev == SEXP_VOID)
|
||||
sexp_inc_context_pos(ctx, -(1 + sizeof(sexp)));
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue