diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-02-25 03:49:11 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-02-25 03:49:11 -0800 |
commit | c4980fc3023244585a947873e240069694283a19 (patch) | |
tree | 361fdca48ef2f86807a197df4fcbbb12893e306a /cpp | |
parent | 6f5d7864f6c0c62b8849349cb182c61f8dbed452 (diff) | |
download | mu-c4980fc3023244585a947873e240069694283a19.tar.gz |
833
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/012run | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cpp/012run b/cpp/012run index 79dcbfc2..45a6048f 100644 --- a/cpp/012run +++ b/cpp/012run @@ -38,8 +38,8 @@ void run(string form) { void run(call_stack context) { // #defines save us the trouble of updating aliases when dependent variables // change. -#define TOP Recipe[context.top().running_recipe] -#define instructions TOP.steps +#define TOP_RECIPE Recipe[context.top().running_recipe] +#define instructions TOP_RECIPE.steps while (!context.empty()) { while (context.top().pc >= instructions.size()) { context.pop(); @@ -47,10 +47,8 @@ void run(call_stack context) { // todo: no results returned warning ++context.top().pc; } -//? cout << context.size() << '\n'; //? 1 size_t& pc = context.top().pc; -//? cout << "instruction " << TOP.name << '/' << pc << '\n'; //? 1 - trace("run") << "instruction " << TOP.name << '/' << pc; + trace("run") << "instruction " << TOP_RECIPE.name << '/' << pc; switch (instructions[pc].operation) { // Primitive Recipe Implementations. case COPY: { @@ -65,7 +63,7 @@ void run(call_stack context) { } ++pc; } -#undef TOP +#undef TOP_RECIPE #undef instructions } |