This commit is contained in:
Kartik K. Agaram 2015-04-24 20:25:33 -07:00
parent 8eff791921
commit 7c8493b3fb
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -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()")