diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-28 05:53:39 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-28 05:53:39 -0700 |
commit | 5810092d53f44e639c7bfd4e62d1960c323dcb6f (patch) | |
tree | 7bce56818432243780aa371381c49300f189a9dd | |
parent | 3b795875bc7ab25e5cfa02f74b1a4428af4c0ec4 (diff) | |
download | mu-5810092d53f44e639c7bfd4e62d1960c323dcb6f.tar.gz |
2296 - record ingredient types on call stack
As we perform type-checking earlier we'll delete these checks. But start with type-checking at run-time.
-rw-r--r-- | 034call.cc | 1 | ||||
-rw-r--r-- | 035call_ingredient.cc | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/034call.cc b/034call.cc index ee554ab6..87d0d601 100644 --- a/034call.cc +++ b/034call.cc @@ -90,6 +90,7 @@ if (Recipe.find(inst.operation) == Recipe.end()) { } :(replace{} "default:" following "End Primitive Recipe Implementations") default: { + const instruction& call_instruction = current_instruction(); if (Recipe.find(current_instruction().operation) == Recipe.end()) { // duplicate from Checks // stop running this instruction immediately ++current_step_index(); diff --git a/035call_ingredient.cc b/035call_ingredient.cc index 1291e567..01036728 100644 --- a/035call_ingredient.cc +++ b/035call_ingredient.cc @@ -22,6 +22,7 @@ recipe f [ :(before "End call Fields") vector<vector<double> > ingredient_atoms; +vector<type_tree*> ingredient_types; long long int next_ingredient_to_process; :(before "End call Constructor") next_ingredient_to_process = 0; @@ -29,6 +30,7 @@ next_ingredient_to_process = 0; :(before "End Call Housekeeping") for (long long int i = 0; i < SIZE(ingredients); ++i) { Current_routine->calls.front().ingredient_atoms.push_back(ingredients.at(i)); + Current_routine->calls.front().ingredient_types.push_back(call_instruction.ingredients.at(i).type); } :(before "End Primitive Recipe Declarations") |