diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-06-03 18:00:11 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-06-03 18:00:11 -0700 |
commit | 1066660e66fd08f608b24426abf7ad60b3a5b566 (patch) | |
tree | 49dd035198bdc59f2c489b57a0c36997c01b85c8 /049continuation.cc | |
parent | ae496d70be94f8ffa363ae1612aa3cbfbaca11b8 (diff) | |
download | mu-1066660e66fd08f608b24426abf7ad60b3a5b566.tar.gz |
1523
Variable 'instruction_counter' was obfuscating more than it clarified.
Diffstat (limited to '049continuation.cc')
-rw-r--r-- | 049continuation.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/049continuation.cc b/049continuation.cc index 7a92a377..4e0dd0e0 100644 --- a/049continuation.cc +++ b/049continuation.cc @@ -42,10 +42,8 @@ Recipe_number["continue-from"] = CONTINUE_FROM; case CONTINUE_FROM: { assert(scalar(ingredients.at(0))); long long int c = ingredients.at(0).at(0); - Current_routine->calls = Continuation[c]; // deep copy because calls have no pointers - // refresh instruction_counter to next instruction after current-continuation - instruction_counter = current_step_index()+1; - continue; // not done with caller; don't increment current_step_index() further + Current_routine->calls = Continuation[c]; // deep copy; calls have no pointers + continue; // skip rest of this instruction } :(scenario continuation) @@ -69,6 +67,7 @@ recipe main [ $current-continuation: 1 :(scenario continuation_inside_caller) +#? % Trace_stream->dump_layer = "all"; #? 1 recipe main [ 1:number <- copy 0:literal 2:continuation <- loop-body @@ -208,9 +207,7 @@ case REPLY_DELIMITED_CONTINUATION: { products.resize(1); products.at(0).push_back(Next_delimited_continuation_id); ++Next_delimited_continuation_id; - // refresh instruction_counter to caller's step_index - instruction_counter = current_step_index(); - break; + break; // continue to process rest of 'reset' call } :(code) |