| @@ -74,7 +74,7 @@ t_CKBOOL emit_engine_emit_exp_postfix( Chuck_Emitter * emit, a_Exp_Postfix postf · 73 unmodified lines |
| 74 | 74 | t_CKBOOL emit_engine_emit_exp_dur( Chuck_Emitter * emit, a_Exp_Dur dur ); |
| 75 | 75 | t_CKBOOL emit_engine_emit_exp_array( Chuck_Emitter * emit, a_Exp_Array array ); |
| 76 | 76 | t_CKBOOL emit_engine_emit_exp_func_call( Chuck_Emitter * emit, Chuck_Func * func, |
| 77 | | − a_Exp args, Chuck_Type * type, int linepos, t_CKBOOL spork = FALSE ); |
| 77 | + Chuck_Type * type, int linepos, t_CKBOOL spork = FALSE ); |
| 78 | 78 | t_CKBOOL emit_engine_emit_exp_func_call( Chuck_Emitter * emit, a_Exp_Func_Call func_call, |
| 79 | 79 | t_CKBOOL spork = FALSE ); |
| 80 | 80 | t_CKBOOL emit_engine_emit_func_args( Chuck_Emitter * emit, a_Exp_Func_Call func_call ); |
| @@ -2565,7 +2565,7 @@ t_CKBOOL emit_engine_emit_op_chuck( Chuck_Emitter * emit, a_Exp lhs, a_Exp rhs, · 2484 unmodified lines |
| 2565 | 2565 | assert( binary->ck_func != NULL ); |
| 2566 | 2566 | |
| 2567 | 2567 | // emit |
| 2568 | | − return emit_engine_emit_exp_func_call( emit, binary->ck_func, binary->lhs, binary->self->type, binary->linepos ); |
| 2568 | + return emit_engine_emit_exp_func_call( emit, binary->ck_func, binary->self->type, binary->linepos ); |
| 2569 | 2569 | } |
| 2570 | 2570 | |
| 2571 | 2571 | // assignment or something else |
| @@ -3429,7 +3429,6 @@ t_CKBOOL emit_engine_emit_exp_array( Chuck_Emitter * emit, a_Exp_Array array ) · 857 unmodified lines |
| 3429 | 3429 | //----------------------------------------------------------------------------- |
| 3430 | 3430 | t_CKBOOL emit_engine_emit_exp_func_call( Chuck_Emitter * emit, |
| 3431 | 3431 | Chuck_Func * func, |
| 3432 | | − a_Exp args, |
| 3433 | 3432 | Chuck_Type * type, |
| 3434 | 3433 | int linepos, |
| 3435 | 3434 | t_CKBOOL spork ) |
| @@ -3531,7 +3530,7 @@ t_CKBOOL emit_engine_emit_exp_func_call( Chuck_Emitter * emit, · 95 unmodified lines |
| 3531 | 3530 | } |
| 3532 | 3531 | |
| 3533 | 3532 | // the rest |
| 3534 | | − return emit_engine_emit_exp_func_call( emit, func_call->ck_func, func_call->args, |
| 3533 | + return emit_engine_emit_exp_func_call( emit, func_call->ck_func, |
| 3535 | 3534 | func_call->ret_type, func_call->linepos, spork ); |
| 3536 | 3535 | } |
| 3537 | 3536 | |
| @@ -4819,7 +4818,6 @@ t_CKBOOL emit_engine_emit_spork( Chuck_Emitter * emit, a_Exp_Func_Call exp ) · 1281 unmodified lines |
| 4819 | 4818 | // call the func on sporkee shred |
| 4820 | 4819 | if( !emit_engine_emit_exp_func_call( emit, |
| 4821 | 4820 | exp->ck_func, |
| 4822 | | − exp->args, |
| 4823 | 4821 | exp->ret_type, |
| 4824 | 4822 | exp->linepos, |
| 4825 | 4823 | TRUE ) ) return FALSE; |
| @@ -5142,16 +5140,12 @@ void Chuck_Emitter::traverse_scope_on_jump( ) · 316 unmodified lines |
| 5142 | 5140 | // skip scope boundary (denoted by NULL) |
| 5143 | 5141 | if( !local ) continue; |
| 5144 | 5142 | |
| 5145 | | − // CK_STDCERR << "local: " << local->offset << " " << local->is_obj << CK_STDENDL; |
| 5146 | | − // check to see if it's an object |
| 5147 | | − if( local->is_obj ) |
| 5143 | + // check to see if it's an object (but not global) |
| 5144 | + // (REFACTOR-2017: don't release global objects) |
| 5145 | + if( local->is_obj && !local->is_global ) |
| 5148 | 5146 | { |
| 5149 | | − // (REFACTOR-2017: don't release global objects) |
| 5150 | | − if( !local->is_global ) |
| 5151 | | − { |
| 5152 | | − // emit instruction to release the object |
| 5153 | | − this->append( new Chuck_Instr_Release_Object2( local->offset ) ); |
| 5154 | | − } |
| 5147 | + // emit instruction to release the object |
| 5148 | + this->append( new Chuck_Instr_Release_Object2( local->offset ) ); |
| 5155 | 5149 | } |
| 5156 | 5150 | } |
| 5157 | 5151 | |