diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-24 20:25:33 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-24 20:25:33 -0700 |
commit | 7c8493b3fba57b31708ba53875805f5b045d92e4 (patch) | |
tree | 810c036861d5ba9b09115a00cb7d95b33a3d9f0d /cpp | |
parent | 8eff7919219c921c38c3921b7532b9608ece2741 (diff) | |
download | mu-7c8493b3fba57b31708ba53875805f5b045d92e4.tar.gz |
1173
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/020run | 4 | ||||
-rw-r--r-- | cpp/035call | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cpp/020run b/cpp/020run index cafeef75..93052b52 100644 --- a/cpp/020run +++ b/cpp/020run @@ -57,7 +57,7 @@ void run_current_routine() if (current_instruction().is_label) { ++pc; continue; } //? cout << "AAA " << Trace_stream << " ^" << Trace_stream->dump_layer << "$\n"; //? 1 //? trace("foo") << "2.5: " << pc << " " << &pc; //? 1 - trace("run") << "instruction " << recipe_name() << '/' << pc; + trace("run") << "instruction " << current_recipe_name() << '/' << pc; //? cout << "operation " << current_instruction().operation << '\n'; //? 3 //? if (!current_instruction().products.empty()) trace("foo") << "AAA product 0 is " << current_instruction().products[0].to_string(); //? 1 switch (current_instruction().operation) { @@ -87,7 +87,7 @@ inline size_t& current_step_index() { return Current_routine->running_step_index; } -inline string recipe_name() { +inline const string& current_recipe_name() { return Recipe[Current_routine->running_recipe].name; } diff --git a/cpp/035call b/cpp/035call index d01b0e30..912240ce 100644 --- a/cpp/035call +++ b/cpp/035call @@ -57,8 +57,8 @@ struct routine { inline size_t& current_step_index() { return Current_routine->calls.top().pc; } -:(replace{} "inline string recipe_name()") -inline string recipe_name() { +:(replace{} "inline const string& current_recipe_name()") +inline const string& current_recipe_name() { return Recipe[Current_routine->calls.top().running_recipe].name; } :(replace{} "inline vector<instruction>& steps()") |