diff options
Diffstat (limited to 'cpp/.traces/factorial')
-rw-r--r-- | cpp/.traces/factorial | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/cpp/.traces/factorial b/cpp/.traces/factorial new file mode 100644 index 00000000..ef8fff86 --- /dev/null +++ b/cpp/.traces/factorial @@ -0,0 +1,168 @@ +parse/0: instruction: 1 +parse/0: ingredient: {name: "5", value: 0, type: 0, properties: [5: literal]} +parse/0: product: {name: "1", value: 0, type: 1, properties: [1: integer]} +parse/0: instruction: 1 +parse/0: ingredient: {name: "1", value: 0, type: 0, properties: [1: literal]} +parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} +parse/0: label: { +parse/0: instruction: 13 +parse/0: ingredient: {name: "1", value: 0, type: 1, properties: [1: integer]} +parse/0: ingredient: {name: "1", value: 0, type: 0, properties: [1: literal]} +parse/0: product: {name: "3", value: 0, type: 3, properties: [3: boolean]} +parse/0: instruction: 25 +parse/0: ingredient: {name: "3", value: 0, type: 3, properties: [3: boolean]} +parse/0: instruction: 4 +parse/0: ingredient: {name: "2", value: 0, type: 1, properties: [2: integer]} +parse/0: ingredient: {name: "1", value: 0, type: 1, properties: [1: integer]} +parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} +parse/0: instruction: 3 +parse/0: ingredient: {name: "1", value: 0, type: 1, properties: [1: integer]} +parse/0: ingredient: {name: "1", value: 0, type: 0, properties: [1: literal]} +parse/0: product: {name: "1", value: 0, type: 1, properties: [1: integer]} +parse/0: instruction: 26 +parse/0: label: } +parse/0: instruction: 1 +parse/0: ingredient: {name: "2", value: 0, type: 1, properties: [2: integer]} +parse/0: product: {name: "4", value: 0, type: 1, properties: [4: integer]} +brace/0: 24: push (open, 2) +brace/0: push (close, 8) +after-brace/0: recipe factorial +after-brace/0: copy ... +after-brace/0: copy ... +after-brace/0: equal ... +after-brace/0: jump-if 3, 3:offset +after-brace/0: multiply ... +after-brace/0: subtract ... +after-brace/0: jump -5:offset +after-brace/0: 7: {name: "", value: -5, type: 0} +after-brace/0: 7: {name: "", value: -5, type: 0} +after-brace/0: copy ... +run/0: instruction factorial/0 +run/0: ingredient 0 is 5 +mem/0: storing in location 1 +run/0: instruction factorial/1 +run/0: ingredient 0 is 1 +mem/0: storing in location 2 +run/0: instruction factorial/3 +run/0: ingredient 0 is 1 +mem/0: location 1 is 5 +run/0: ingredient 1 is 1 +run/0: product 0 is 0 +mem/0: storing in location 3 +run/0: instruction factorial/4 +mem/0: location 3 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction factorial/5 +run/0: ingredient 0 is 2 +mem/0: location 2 is 1 +run/0: ingredient 1 is 1 +mem/0: location 1 is 5 +run/0: ingredient 1 is 5 +run/0: product 0 is 5 +mem/0: storing in location 2 +run/0: instruction factorial/6 +run/0: ingredient 0 is 1 +mem/0: location 1 is 5 +run/0: ingredient 1 is 1 +run/0: product 0 is 4 +mem/0: storing in location 1 +run/0: instruction factorial/7 +run/0: ingredient 0 is -5 +run/0: pc now 2 +run/0: instruction factorial/3 +run/0: ingredient 0 is 1 +mem/0: location 1 is 4 +run/0: ingredient 1 is 1 +run/0: product 0 is 0 +mem/0: storing in location 3 +run/0: instruction factorial/4 +mem/0: location 3 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction factorial/5 +run/0: ingredient 0 is 2 +mem/0: location 2 is 5 +run/0: ingredient 1 is 1 +mem/0: location 1 is 4 +run/0: ingredient 1 is 4 +run/0: product 0 is 20 +mem/0: storing in location 2 +run/0: instruction factorial/6 +run/0: ingredient 0 is 1 +mem/0: location 1 is 4 +run/0: ingredient 1 is 1 +run/0: product 0 is 3 +mem/0: storing in location 1 +run/0: instruction factorial/7 +run/0: ingredient 0 is -5 +run/0: pc now 2 +run/0: instruction factorial/3 +run/0: ingredient 0 is 1 +mem/0: location 1 is 3 +run/0: ingredient 1 is 1 +run/0: product 0 is 0 +mem/0: storing in location 3 +run/0: instruction factorial/4 +mem/0: location 3 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction factorial/5 +run/0: ingredient 0 is 2 +mem/0: location 2 is 20 +run/0: ingredient 1 is 1 +mem/0: location 1 is 3 +run/0: ingredient 1 is 3 +run/0: product 0 is 60 +mem/0: storing in location 2 +run/0: instruction factorial/6 +run/0: ingredient 0 is 1 +mem/0: location 1 is 3 +run/0: ingredient 1 is 1 +run/0: product 0 is 2 +mem/0: storing in location 1 +run/0: instruction factorial/7 +run/0: ingredient 0 is -5 +run/0: pc now 2 +run/0: instruction factorial/3 +run/0: ingredient 0 is 1 +mem/0: location 1 is 2 +run/0: ingredient 1 is 1 +run/0: product 0 is 0 +mem/0: storing in location 3 +run/0: instruction factorial/4 +mem/0: location 3 is 0 +run/0: ingredient 0 is 0 +run/0: jump-if fell through +run/0: instruction factorial/5 +run/0: ingredient 0 is 2 +mem/0: location 2 is 60 +run/0: ingredient 1 is 1 +mem/0: location 1 is 2 +run/0: ingredient 1 is 2 +run/0: product 0 is 120 +mem/0: storing in location 2 +run/0: instruction factorial/6 +run/0: ingredient 0 is 1 +mem/0: location 1 is 2 +run/0: ingredient 1 is 1 +run/0: product 0 is 1 +mem/0: storing in location 1 +run/0: instruction factorial/7 +run/0: ingredient 0 is -5 +run/0: pc now 2 +run/0: instruction factorial/3 +run/0: ingredient 0 is 1 +mem/0: location 1 is 1 +run/0: ingredient 1 is 1 +run/0: product 0 is 1 +mem/0: storing in location 3 +run/0: instruction factorial/4 +mem/0: location 3 is 1 +run/0: ingredient 0 is 1 +run/0: ingredient 1 is +run/0: jumping to instruction 8 +run/0: instruction factorial/9 +run/0: ingredient 0 is 2 +mem/0: location 2 is 120 +mem/0: storing in location 4 |