diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-14 22:29:09 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-14 22:29:09 -0700 |
commit | 15433557812c1b8153fe3f238311ff808c8389b6 (patch) | |
tree | db8db47c44edc674d903681c672a855d453a1cf3 /cpp/012run | |
parent | f89378d563330260c54496cd80bd4e2550e5988c (diff) | |
download | mu-15433557812c1b8153fe3f238311ff808c8389b6.tar.gz |
923
Diffstat (limited to 'cpp/012run')
-rw-r--r-- | cpp/012run | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cpp/012run b/cpp/012run index d2c22e44..0d102660 100644 --- a/cpp/012run +++ b/cpp/012run @@ -51,8 +51,7 @@ void run(recipe_number r) { void run(routine rr) { // #defines save us the trouble of updating aliases when dependent variables // change. -#define TOP_RECIPE Recipe[rr.calls.top().running_recipe] -#define instructions TOP_RECIPE.steps +#define instructions Recipe[rr.calls.top().running_recipe].steps while (!rr.calls.empty()) { while (rr.calls.top().pc >= instructions.size()) { rr.calls.pop(); @@ -61,7 +60,7 @@ void run(routine rr) { ++rr.calls.top().pc; } size_t& pc = rr.calls.top().pc; - trace("run") << "instruction " << TOP_RECIPE.name << '/' << pc; + trace("run") << "instruction " << Recipe[rr.calls.top().running_recipe].name << '/' << pc; switch (instructions[pc].operation) { // Primitive Recipe Implementations. case COPY: { @@ -77,7 +76,6 @@ void run(routine rr) { } ++pc; } -#undef TOP_RECIPE #undef instructions } |