History

further code cleanup from memory system upgrade part 1

Ge Wang committed 3 years ago

Commit 927edfd1 parent beef6542 files · +10 −31Browse files

Showing the changes to src/core/chuck_emit.cpp (1 of 2 files). Show all

Unified · Split

src/core/chuck_emit.cpp+8−14
@@ -74,7 +74,7 @@ t_CKBOOL emit_engine_emit_exp_postfix( Chuck_Emitter * emit, a_Exp_Postfix postf · 73 unmodified lines
7474 t_CKBOOL emit_engine_emit_exp_dur( Chuck_Emitter * emit, a_Exp_Dur dur );
7575 t_CKBOOL emit_engine_emit_exp_array( Chuck_Emitter * emit, a_Exp_Array array );
7676 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 );
7878 t_CKBOOL emit_engine_emit_exp_func_call( Chuck_Emitter * emit, a_Exp_Func_Call func_call,
7979 t_CKBOOL spork = FALSE );
8080 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
25652565 assert( binary->ck_func != NULL );
25662566
25672567 // 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 );
25692569 }
25702570
25712571 // 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
34293429 //-----------------------------------------------------------------------------
34303430 t_CKBOOL emit_engine_emit_exp_func_call( Chuck_Emitter * emit,
34313431 Chuck_Func * func,
3432− a_Exp args,
34333432 Chuck_Type * type,
34343433 int linepos,
34353434 t_CKBOOL spork )
@@ -3531,7 +3530,7 @@ t_CKBOOL emit_engine_emit_exp_func_call( Chuck_Emitter * emit, · 95 unmodified lines
35313530 }
35323531
35333532 // 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,
35353534 func_call->ret_type, func_call->linepos, spork );
35363535 }
35373536
@@ -4819,7 +4818,6 @@ t_CKBOOL emit_engine_emit_spork( Chuck_Emitter * emit, a_Exp_Func_Call exp ) · 1281 unmodified lines
48194818 // call the func on sporkee shred
48204819 if( !emit_engine_emit_exp_func_call( emit,
48214820 exp->ck_func,
4822− exp->args,
48234821 exp->ret_type,
48244822 exp->linepos,
48254823 TRUE ) ) return FALSE;
@@ -5142,16 +5140,12 @@ void Chuck_Emitter::traverse_scope_on_jump( ) · 316 unmodified lines
51425140 // skip scope boundary (denoted by NULL)
51435141 if( !local ) continue;
51445142
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 )
51485146 {
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 ) );
51555149 }
51565150 }
51575151

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t