diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-24 20:41:37 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-24 20:41:37 -0700 |
commit | f1b71a4461a2fca938897fc15de0214e48265c54 (patch) | |
tree | ded0d093ef3f653efd21c35eeadc57674c98dd41 /cpp/035call | |
parent | a767dbd3338af1d3cc69e3c200341fff8e08fc4b (diff) | |
download | mu-f1b71a4461a2fca938897fc15de0214e48265c54.tar.gz |
1177
Diffstat (limited to 'cpp/035call')
-rw-r--r-- | cpp/035call | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/035call b/cpp/035call index 3db1a10a..9aee3db8 100644 --- a/cpp/035call +++ b/cpp/035call @@ -33,9 +33,9 @@ recipe f [ // This requires maintaining a 'stack' of interrupted recipes or 'calls'. struct call { recipe_number running_recipe; - size_t pc; + size_t running_step_index; // End call Fields - call(recipe_number r) :running_recipe(r), pc(0) {} + call(recipe_number r) :running_recipe(r), running_step_index(0) {} }; typedef stack<call> call_stack; @@ -55,7 +55,7 @@ struct routine { :(replace{} "inline size_t& current_step_index()") inline size_t& current_step_index() { - return Current_routine->calls.top().pc; + return Current_routine->calls.top().running_step_index; } :(replace{} "inline const string& current_recipe_name()") inline const string& current_recipe_name() { @@ -67,7 +67,7 @@ inline vector<instruction>& steps() { } :(replace{} "inline const instruction& current_instruction()") inline const instruction& current_instruction() { - return Recipe[Current_routine->calls.top().running_recipe].steps[Current_routine->calls.top().pc]; + return Recipe[Current_routine->calls.top().running_recipe].steps[Current_routine->calls.top().running_step_index]; } :(replace{} "default:" following "End Primitive Recipe Implementations") |