about summary refs log tree commit diff stats
path: root/cpp/090debug
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-24 20:07:17 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-24 20:16:21 -0700
commitdcfca05e08744270b3145f7906c5cd46485a4b52 (patch)
tree673e8715688bdc3990bbfe9077158e764690ec01 /cpp/090debug
parent69e14325e3eaa3722766bb9706d7da5862b6ea26 (diff)
downloadmu-dcfca05e08744270b3145f7906c5cd46485a4b52.tar.gz
1171
Chip away at eliminating that 'pc' reference by first throwing out the
most common expression that uses it: instructions[pc].
Diffstat (limited to 'cpp/090debug')
-rw-r--r--cpp/090debug8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/090debug b/cpp/090debug
index 4f1a0796..d81071e9 100644
--- a/cpp/090debug
+++ b/cpp/090debug
@@ -6,12 +6,12 @@ _PRINT,
 Recipe_number["$print"] = _PRINT;
 :(before "End Primitive Recipe Implementations")
 case _PRINT: {
-  if (isa_literal(instructions[pc].ingredients[0])) {
-    trace("run") << "$print: " << instructions[pc].ingredients[0].name;
-    cout << instructions[pc].ingredients[0].name;
+  if (isa_literal(current_instruction().ingredients[0])) {
+    trace("run") << "$print: " << current_instruction().ingredients[0].name;
+    cout << current_instruction().ingredients[0].name;
     break;
   }
-  vector<int> result(read_memory(instructions[pc].ingredients[0]));
+  vector<int> result(read_memory(current_instruction().ingredients[0]));
   for (size_t i = 0; i < result.size(); ++i) {
     trace("run") << "$print: " << result[i];
     if (i > 0) cout << " ";