about summary refs log tree commit diff stats
path: root/cpp/.traces/break_if
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-17 00:26:12 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-17 00:26:12 -0700
commitc062697c9ff3c8cb0938f56bed3df2af3d122bd6 (patch)
tree3499fc91b20183f9d87a8fe716a34dacd6f7f993 /cpp/.traces/break_if
parent3d45bf386169bfdea5d8654cf1869cc6c2a719f6 (diff)
downloadmu-c062697c9ff3c8cb0938f56bed3df2af3d122bd6.tar.gz
944 - more break/loop tests
I still can't handle jumps to labels. That'll require some rejiggering..
Diffstat (limited to 'cpp/.traces/break_if')
-rw-r--r--cpp/.traces/break_if41
1 files changed, 41 insertions, 0 deletions
diff --git a/cpp/.traces/break_if b/cpp/.traces/break_if
new file mode 100644
index 00000000..fdfce24d
--- /dev/null
+++ b/cpp/.traces/break_if
@@ -0,0 +1,41 @@
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]}
+parse/0:   product: {name: "1", value: 1, type: 1, properties: [1: integer]}
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]}
+parse/0:   product: {name: "2", value: 2, type: 1, properties: [2: integer]}
+parse/0: label: {
+parse/0: instruction: 25
+parse/0:   ingredient: {name: "2", value: 2, type: 1, properties: [2: integer]}
+parse/0: instruction: 1
+parse/0:   ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]}
+parse/0:   product: {name: "3", value: 3, type: 1, properties: [3: integer]}
+parse/0: label: }
+parse/0: label: {
+parse/0: instruction: 26
+parse/0: label: }
+brace/0: 24: push (open, 2)
+brace/0: push (close, 5)
+brace/0: 24: push (open, 6)
+brace/0: push (close, 8)
+after-brace/0: recipe main
+after-brace/0: copy ...
+after-brace/0: copy ...
+after-brace/0: jump-if 2, 1:offset
+after-brace/0: copy ...
+after-brace/0: jump 0:offset
+run/0: instruction main/0
+run/0: ingredient 0 is 0
+mem/0: storing in location 1
+run/0: instruction main/1
+run/0: ingredient 0 is 0
+mem/0: storing in location 2
+run/0: instruction main/3
+mem/0: location 2 is 0
+run/0: ingredient 0 is 0
+run/0: jump-if fell through
+run/0: instruction main/4
+run/0: ingredient 0 is 0
+mem/0: storing in location 3
+run/0: instruction main/7
+run/0: ingredient 0 is