diff options
-rw-r--r-- | cpp/035call | 8 | ||||
-rw-r--r-- | cpp/036call_ingredient | 2 | ||||
-rw-r--r-- | cpp/037call_reply | 2 | ||||
-rw-r--r-- | cpp/043space | 2 |
4 files changed, 7 insertions, 7 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") diff --git a/cpp/036call_ingredient b/cpp/036call_ingredient index 08894690..d928f286 100644 --- a/cpp/036call_ingredient +++ b/cpp/036call_ingredient @@ -26,7 +26,7 @@ recipe f [ vector<vector<int> > ingredient_atoms; size_t next_ingredient_to_process; :(replace{} "call(recipe_number r)") -call(recipe_number r) :running_recipe(r), pc(0), next_ingredient_to_process(0) {} +call(recipe_number r) :running_recipe(r), running_step_index(0), next_ingredient_to_process(0) {} :(replace "Current_routine->calls.push(call(current_instruction().operation))" following "End Primitive Recipe Implementations") call callee(current_instruction().operation); diff --git a/cpp/037call_reply b/cpp/037call_reply index 97e93fe3..adf75c7e 100644 --- a/cpp/037call_reply +++ b/cpp/037call_reply @@ -27,7 +27,7 @@ case REPLY: { } Current_routine->calls.pop(); assert(!Current_routine->calls.empty()); - size_t& caller_pc = Current_routine->calls.top().pc; + size_t& caller_pc = Current_routine->calls.top().running_step_index; instruction& caller_instruction = Recipe[Current_routine->calls.top().running_recipe].steps[caller_pc]; assert(caller_instruction.products.size() <= callee_results.size()); for (size_t i = 0; i < caller_instruction.products.size(); ++i) { diff --git a/cpp/043space b/cpp/043space index f749b265..5d9c8555 100644 --- a/cpp/043space +++ b/cpp/043space @@ -28,7 +28,7 @@ recipe main [ :(before "End call Fields") size_t default_space; :(replace "call(recipe_number r) :running_recipe(r)") -call(recipe_number r) :running_recipe(r), pc(0), next_ingredient_to_process(0), default_space(0) {} +call(recipe_number r) :running_recipe(r), running_step_index(0), next_ingredient_to_process(0), default_space(0) {} :(replace "reagent r = x" following "reagent canonize(reagent x)") reagent r = absolutize(x); |