diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-22 11:39:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-22 11:39:29 -0700 |
commit | 3c6784a87bb362a7a2f32d617c5950fec23460cd (patch) | |
tree | 094cd564f01256baf8e5c7e8ff1ce3445bdd340d /cpp | |
parent | 86acd63036d059a4c7b89cf01ae49ad169cb04e0 (diff) | |
download | mu-3c6784a87bb362a7a2f32d617c5950fec23460cd.tar.gz |
1125
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/.traces/brace_conversion_and_run (renamed from cpp/.traces/factorial) | 52 | ||||
-rw-r--r-- | cpp/040brace | 4 |
2 files changed, 28 insertions, 28 deletions
diff --git a/cpp/.traces/factorial b/cpp/.traces/brace_conversion_and_run index 55e60320..cce4677c 100644 --- a/cpp/.traces/factorial +++ b/cpp/.traces/brace_conversion_and_run @@ -26,7 +26,7 @@ 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: 1000: push (open, 2) brace/0: push (close, 8) -after-brace/0: recipe factorial +after-brace/0: recipe test-factorial after-brace/0: copy ... after-brace/0: copy ... after-brace/0: equal ... @@ -37,23 +37,23 @@ after-brace/0: jump -5:offset after-brace/0: 7: {name: "", value: -5, type: , properties: ["": ]} after-brace/0: 7: {name: "", value: -5, type: , properties: ["": ]} after-brace/0: copy ... -run/0: instruction factorial/0 +run/0: instruction test-factorial/0 run/0: ingredient 0 is 5 mem/0: storing 5 in location 1 -run/0: instruction factorial/1 +run/0: instruction test-factorial/1 run/0: ingredient 0 is 1 mem/0: storing 1 in location 2 -run/0: instruction factorial/3 +run/0: instruction test-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 0 in location 3 -run/0: instruction factorial/4 +run/0: instruction test-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: instruction test-factorial/5 run/0: ingredient 0 is 2 mem/0: location 2 is 1 run/0: ingredient 1 is 1 @@ -61,26 +61,26 @@ mem/0: location 1 is 5 run/0: ingredient 1 is 5 run/0: product 0 is 5 mem/0: storing 5 in location 2 -run/0: instruction factorial/6 +run/0: instruction test-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 4 in location 1 -run/0: instruction factorial/7 +run/0: instruction test-factorial/7 run/0: ingredient 0 is -5 run/0: pc now 2 -run/0: instruction factorial/3 +run/0: instruction test-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 0 in location 3 -run/0: instruction factorial/4 +run/0: instruction test-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: instruction test-factorial/5 run/0: ingredient 0 is 2 mem/0: location 2 is 5 run/0: ingredient 1 is 1 @@ -88,26 +88,26 @@ mem/0: location 1 is 4 run/0: ingredient 1 is 4 run/0: product 0 is 20 mem/0: storing 20 in location 2 -run/0: instruction factorial/6 +run/0: instruction test-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 3 in location 1 -run/0: instruction factorial/7 +run/0: instruction test-factorial/7 run/0: ingredient 0 is -5 run/0: pc now 2 -run/0: instruction factorial/3 +run/0: instruction test-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 0 in location 3 -run/0: instruction factorial/4 +run/0: instruction test-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: instruction test-factorial/5 run/0: ingredient 0 is 2 mem/0: location 2 is 20 run/0: ingredient 1 is 1 @@ -115,26 +115,26 @@ mem/0: location 1 is 3 run/0: ingredient 1 is 3 run/0: product 0 is 60 mem/0: storing 60 in location 2 -run/0: instruction factorial/6 +run/0: instruction test-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 2 in location 1 -run/0: instruction factorial/7 +run/0: instruction test-factorial/7 run/0: ingredient 0 is -5 run/0: pc now 2 -run/0: instruction factorial/3 +run/0: instruction test-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 0 in location 3 -run/0: instruction factorial/4 +run/0: instruction test-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: instruction test-factorial/5 run/0: ingredient 0 is 2 mem/0: location 2 is 60 run/0: ingredient 1 is 1 @@ -142,27 +142,27 @@ mem/0: location 1 is 2 run/0: ingredient 1 is 2 run/0: product 0 is 120 mem/0: storing 120 in location 2 -run/0: instruction factorial/6 +run/0: instruction test-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 1 in location 1 -run/0: instruction factorial/7 +run/0: instruction test-factorial/7 run/0: ingredient 0 is -5 run/0: pc now 2 -run/0: instruction factorial/3 +run/0: instruction test-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 1 in location 3 -run/0: instruction factorial/4 +run/0: instruction test-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: instruction test-factorial/9 run/0: ingredient 0 is 2 mem/0: location 2 is 120 mem/0: storing 120 in location 4 diff --git a/cpp/040brace b/cpp/040brace index 174335af..3cbffc01 100644 --- a/cpp/040brace +++ b/cpp/040brace @@ -370,8 +370,8 @@ recipe main [ //: test how things actually run :(scenarios run) -:(scenario "factorial") -recipe factorial [ +:(scenario "brace_conversion_and_run") +recipe test-factorial [ 1:integer <- copy 5:literal 2:integer <- copy 1:literal { |