diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-14 19:21:51 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-14 19:21:51 -0700 |
commit | cc8f359b2dcc6200f450ba2c9993e816f772010c (patch) | |
tree | 5c0602e5e78b3f5730b0a50c4b64b591607796e5 | |
parent | 2813da63626568615a442f49cfc13eb06389d033 (diff) | |
download | mu-cc8f359b2dcc6200f450ba2c9993e816f772010c.tar.gz |
914
-rw-r--r-- | cpp/020call | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/020call b/cpp/020call index 1a7c4b89..72eb19df 100644 --- a/cpp/020call +++ b/cpp/020call @@ -82,14 +82,14 @@ case REPLY: { callee_results.push_back(read_memory(instructions[pc].ingredients[i])); } rr.calls.pop(); - size_t& new_pc = rr.calls.top().pc; -//? cout << new_pc << ": " << instructions[new_pc].products.size() << " <=> " << callee_results.size(); //? 2 - assert(instructions[new_pc].products.size() <= callee_results.size()); - for (size_t i = 0; i < instructions[new_pc].products.size(); ++i) { + size_t& caller_pc = rr.calls.top().pc; +//? cout << caller_pc << ": " << instructions[caller_pc].products.size() << " <=> " << callee_results.size(); //? 2 + assert(instructions[caller_pc].products.size() <= callee_results.size()); + for (size_t i = 0; i < instructions[caller_pc].products.size(); ++i) { //? cout << "AAA " << i << '\n'; //? 1 trace("run") << "result " << i << " is " << callee_results[i].size() << "[" << callee_results[i][0] << "...]"; - write_memory(instructions[new_pc].products[i], callee_results[i]); + write_memory(instructions[caller_pc].products[i], callee_results[i]); } - ++new_pc; + ++caller_pc; break; } |