David Hakim
2003-05-10 23:00:39 UTC
Does moto_freeVal free codeval.value when in compiler mode ? I'm
worried that it might. If this is the case then codeval.value may need
to be moto_strdup'ed for that while loop to work reliably.
-Dave
worried that it might. If this is the case then codeval.value may need
to be moto_strdup'ed for that while loop to work reliably.
-Dave
Dave,
while(stack_size(frame->opstack) > stacksize){
MotoVal* indexMotoVal = opstack_pop(env);
arrayIndexExpressions[i] = indexMotoVal->codeval.value;
i--;
moto_freeVal(env,indexMotoVal);
}
the val is freed after it has been assigned to
arrayIndexExpressions[i]...
motoc(uc_operand(p, 2));
v2 = opstack_pop(env);
motoc(uc_operand(p, 0));
v1 = opstack_pop(env);
tests/class_succ and its String[] initialization works anyway...
motoc(uc_operand(p, 0));
v1 = opstack_pop(env);
motoc(uc_operand(p, 2));
v2 = opstack_pop(env);
arrayIndexExpressions[i] ends up being null, as expected... and
initialization
doesn't work...
Do you understand what happens?
Stefano
while(stack_size(frame->opstack) > stacksize){
MotoVal* indexMotoVal = opstack_pop(env);
arrayIndexExpressions[i] = indexMotoVal->codeval.value;
i--;
moto_freeVal(env,indexMotoVal);
}
the val is freed after it has been assigned to
arrayIndexExpressions[i]...
motoc(uc_operand(p, 2));
v2 = opstack_pop(env);
motoc(uc_operand(p, 0));
v1 = opstack_pop(env);
tests/class_succ and its String[] initialization works anyway...
motoc(uc_operand(p, 0));
v1 = opstack_pop(env);
motoc(uc_operand(p, 2));
v2 = opstack_pop(env);
arrayIndexExpressions[i] ends up being null, as expected... and
initialization
doesn't work...
Do you understand what happens?
Stefano