diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-12-04 00:08:02 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-12-04 00:08:02 -0800 |
commit | 8050782c17560ef33a85bd739da8158f9c530e39 (patch) | |
tree | 01c37341f7a65c5ed3c5f804b2d8481043eb842b | |
parent | 9a20f9e32252357e4a445b2eb98bb5d8725f2157 (diff) | |
download | mu-8050782c17560ef33a85bd739da8158f9c530e39.tar.gz |
4136
-rw-r--r-- | 026call.cc | 6 | ||||
-rw-r--r-- | 054static_dispatch.cc | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/026call.cc b/026call.cc index d44188bf..96fd8660 100644 --- a/026call.cc +++ b/026call.cc @@ -37,9 +37,11 @@ struct call { recipe_ordinal running_recipe; int running_step_index; // End call Fields - call(recipe_ordinal r) { + call(recipe_ordinal r) { clear(r, 0); } + call(recipe_ordinal r, int index) { clear(r, index); } + void clear(recipe_ordinal r, int index) { running_recipe = r; - running_step_index = 0; + running_step_index = index; // End call Constructor } ~call() { diff --git a/054static_dispatch.cc b/054static_dispatch.cc index 0c0deffe..566bb7ad 100644 --- a/054static_dispatch.cc +++ b/054static_dispatch.cc @@ -168,8 +168,7 @@ void resolve_ambiguous_calls(const recipe_ordinal r) { if (inst.is_label) continue; if (non_ghost_size(get_or_insert(Recipe_variants, inst.name)) == 0) continue; trace(9992, "transform") << "instruction " << to_original_string(inst) << end(); - Resolve_stack.push_front(call(r)); - Resolve_stack.front().running_step_index = index; + Resolve_stack.push_front(call(r, index)); string new_name = best_variant(inst, caller_recipe); if (!new_name.empty()) inst.name = new_name; |