diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/.traces/brace_conversion | 4 | ||||
-rw-r--r-- | cpp/.traces/break_cascading | 8 | ||||
-rw-r--r-- | cpp/.traces/break_cascading2 | 8 | ||||
-rw-r--r-- | cpp/.traces/break_empty_block | 4 | ||||
-rw-r--r-- | cpp/.traces/break_if | 8 | ||||
-rw-r--r-- | cpp/.traces/break_label | 4 | ||||
-rw-r--r-- | cpp/.traces/break_nested | 6 | ||||
-rw-r--r-- | cpp/.traces/break_nested_degenerate | 6 | ||||
-rw-r--r-- | cpp/.traces/break_nested_degenerate2 | 6 | ||||
-rw-r--r-- | cpp/.traces/break_unless | 4 | ||||
-rw-r--r-- | cpp/.traces/calling_recipe | 2 | ||||
-rw-r--r-- | cpp/.traces/factorial | 6 | ||||
-rw-r--r-- | cpp/.traces/loop | 4 | ||||
-rw-r--r-- | cpp/.traces/loop_nested | 6 | ||||
-rw-r--r-- | cpp/.traces/loop_unless | 4 | ||||
-rw-r--r-- | cpp/.traces/next_ingredient | 2 | ||||
-rw-r--r-- | cpp/.traces/reply | 2 | ||||
-rw-r--r-- | cpp/010vm | 2 |
18 files changed, 44 insertions, 42 deletions
diff --git a/cpp/.traces/brace_conversion b/cpp/.traces/brace_conversion index 22021677..fa3dd47d 100644 --- a/cpp/.traces/brace_conversion +++ b/cpp/.traces/brace_conversion @@ -1,10 +1,10 @@ parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "1", value: 0, type: 1, properties: [1: integer]} parse/0: label: } -brace/0: 24: push (open, 0) +brace/0: 100: push (open, 0) brace/0: push (close, 3) after-brace/0: recipe main after-brace/0: jump 1:offset diff --git a/cpp/.traces/break_cascading b/cpp/.traces/break_cascading index c89a1698..6d5cbb82 100644 --- a/cpp/.traces/break_cascading +++ b/cpp/.traces/break_cascading @@ -2,14 +2,14 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "1", value: 0, type: 1, properties: [1: integer]} parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: label: } parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: label: } -brace/0: 24: push (open, 1) +brace/0: 100: push (open, 1) brace/0: push (close, 3) -brace/0: 24: push (open, 4) +brace/0: 100: push (open, 4) brace/0: push (close, 6) after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/break_cascading2 b/cpp/.traces/break_cascading2 index 6492fb8f..a321fc7e 100644 --- a/cpp/.traces/break_cascading2 +++ b/cpp/.traces/break_cascading2 @@ -5,17 +5,17 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "3", value: 0, type: 1, properties: [3: integer]} parse/0: label: } parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: label: } -brace/0: 24: push (open, 2) +brace/0: 100: push (open, 2) brace/0: push (close, 5) -brace/0: 24: push (open, 6) +brace/0: 100: push (open, 6) brace/0: push (close, 8) after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/break_empty_block b/cpp/.traces/break_empty_block index 305e2a1e..d2f97f93 100644 --- a/cpp/.traces/break_empty_block +++ b/cpp/.traces/break_empty_block @@ -2,9 +2,9 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "1", value: 0, type: 1, properties: [1: integer]} parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: label: } -brace/0: 24: push (open, 1) +brace/0: 100: push (open, 1) brace/0: push (close, 3) after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/break_if b/cpp/.traces/break_if index 1e7ff661..c082e6cc 100644 --- a/cpp/.traces/break_if +++ b/cpp/.traces/break_if @@ -5,18 +5,18 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: ingredient: {name: "2", value: 0, 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: 0, type: 1, properties: [3: integer]} parse/0: label: } parse/0: label: { -parse/0: instruction: 26 +parse/0: instruction: 102 parse/0: label: } -brace/0: 24: push (open, 2) +brace/0: 100: push (open, 2) brace/0: push (close, 5) -brace/0: 24: push (open, 6) +brace/0: 100: push (open, 6) brace/0: push (close, 8) after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/break_label b/cpp/.traces/break_label index 5230e22e..30aaba9f 100644 --- a/cpp/.traces/break_label +++ b/cpp/.traces/break_label @@ -2,10 +2,10 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "1", value: 0, type: 1, properties: [1: integer]} parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: ingredient: {name: "+foo", value: 0, type: 0, properties: [+foo: offset]} parse/0: label: } -brace/0: 24: push (open, 1) +brace/0: 100: push (open, 1) brace/0: push (close, 3) after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/break_nested b/cpp/.traces/break_nested index a4d242ce..212dcc63 100644 --- a/cpp/.traces/break_nested +++ b/cpp/.traces/break_nested @@ -5,7 +5,7 @@ parse/0: label: { parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: label: { parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} @@ -15,8 +15,8 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "4", value: 0, type: 1, properties: [4: integer]} parse/0: label: } -brace/0: 24: push (open, 1) -brace/0: 24: push (open, 4) +brace/0: 100: push (open, 1) +brace/0: 100: push (open, 4) brace/0: push (close, 6) brace/0: push (close, 8) after-brace/0: recipe main diff --git a/cpp/.traces/break_nested_degenerate b/cpp/.traces/break_nested_degenerate index 2a113ff9..b8ba5f7e 100644 --- a/cpp/.traces/break_nested_degenerate +++ b/cpp/.traces/break_nested_degenerate @@ -5,15 +5,15 @@ parse/0: label: { parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: label: { parse/0: label: } parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "4", value: 0, type: 1, properties: [4: integer]} parse/0: label: } -brace/0: 24: push (open, 1) -brace/0: 24: push (open, 4) +brace/0: 100: push (open, 1) +brace/0: 100: push (open, 4) brace/0: push (close, 5) brace/0: push (close, 7) after-brace/0: recipe main diff --git a/cpp/.traces/break_nested_degenerate2 b/cpp/.traces/break_nested_degenerate2 index 586a73eb..67018166 100644 --- a/cpp/.traces/break_nested_degenerate2 +++ b/cpp/.traces/break_nested_degenerate2 @@ -5,12 +5,12 @@ parse/0: label: { parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: label: { parse/0: label: } parse/0: label: } -brace/0: 24: push (open, 1) -brace/0: 24: push (open, 4) +brace/0: 100: push (open, 1) +brace/0: 100: push (open, 4) brace/0: push (close, 5) brace/0: push (close, 6) after-brace/0: recipe main diff --git a/cpp/.traces/break_unless b/cpp/.traces/break_unless index 5528ce60..a9e1778d 100644 --- a/cpp/.traces/break_unless +++ b/cpp/.traces/break_unless @@ -5,13 +5,13 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: ingredient: {name: "2", value: 0, 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: 0, type: 1, properties: [3: integer]} parse/0: label: } -brace/0: 24: push (open, 2) +brace/0: 100: push (open, 2) brace/0: push (close, 5) after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/calling_recipe b/cpp/.traces/calling_recipe index 87986e69..aefedf58 100644 --- a/cpp/.traces/calling_recipe +++ b/cpp/.traces/calling_recipe @@ -1,4 +1,4 @@ -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: instruction: 2 parse/0: ingredient: {name: "2", value: 0, type: 0, properties: [2: literal]} parse/0: ingredient: {name: "2", value: 0, type: 0, properties: [2: literal]} diff --git a/cpp/.traces/factorial b/cpp/.traces/factorial index 3804ea05..9708c6e3 100644 --- a/cpp/.traces/factorial +++ b/cpp/.traces/factorial @@ -9,7 +9,7 @@ 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: instruction: 101 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]} @@ -19,12 +19,12 @@ 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: instruction: 102 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: 100: push (open, 2) brace/0: push (close, 8) after-brace/0: recipe factorial after-brace/0: copy ... diff --git a/cpp/.traces/loop b/cpp/.traces/loop index 035d7aa9..2600600d 100644 --- a/cpp/.traces/loop +++ b/cpp/.traces/loop @@ -8,9 +8,9 @@ parse/0: label: { parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "3", value: 0, type: 1, properties: [3: integer]} -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: label: } -brace/0: 24: push (open, 2) +brace/0: 100: push (open, 2) brace/0: push (close, 5) after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/loop_nested b/cpp/.traces/loop_nested index 9e865605..40fc1441 100644 --- a/cpp/.traces/loop_nested +++ b/cpp/.traces/loop_nested @@ -10,14 +10,14 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "3", value: 0, type: 1, properties: [3: integer]} parse/0: label: } -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: ingredient: {name: "4", value: 0, type: 3, properties: [4: boolean]} parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "5", value: 0, type: 1, properties: [5: integer]} parse/0: label: } -brace/0: 24: push (open, 1) -brace/0: 24: push (open, 3) +brace/0: 100: push (open, 1) +brace/0: 100: push (open, 3) brace/0: push (close, 5) brace/0: push (close, 8) after-brace/0: recipe main diff --git a/cpp/.traces/loop_unless b/cpp/.traces/loop_unless index ef736ca6..a33c9374 100644 --- a/cpp/.traces/loop_unless +++ b/cpp/.traces/loop_unless @@ -5,13 +5,13 @@ parse/0: instruction: 1 parse/0: ingredient: {name: "0", value: 0, type: 0, properties: [0: literal]} parse/0: product: {name: "2", value: 0, type: 1, properties: [2: integer]} parse/0: label: { -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: ingredient: {name: "2", value: 0, 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: 0, type: 1, properties: [3: integer]} parse/0: label: } -brace/0: 24: push (open, 2) +brace/0: 100: push (open, 2) brace/0: push (close, 5) after-brace/0: recipe main after-brace/0: copy ... diff --git a/cpp/.traces/next_ingredient b/cpp/.traces/next_ingredient index 03bee789..bcd6f45e 100644 --- a/cpp/.traces/next_ingredient +++ b/cpp/.traces/next_ingredient @@ -1,4 +1,4 @@ -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: ingredient: {name: "2", value: 0, type: 0, properties: [2: literal]} parse/0: instruction: 22 parse/0: product: {name: "12", value: 0, type: 1, properties: [12: integer]} diff --git a/cpp/.traces/reply b/cpp/.traces/reply index e880d158..b75224fd 100644 --- a/cpp/.traces/reply +++ b/cpp/.traces/reply @@ -1,4 +1,4 @@ -parse/0: instruction: 25 +parse/0: instruction: 101 parse/0: ingredient: {name: "2", value: 0, type: 0, properties: [2: literal]} parse/0: product: {name: "3", value: 0, type: 1, properties: [3: integer]} parse/0: product: {name: "4", value: 0, type: 1, properties: [4: integer]} diff --git a/cpp/010vm b/cpp/010vm index c3f3286d..2689b7c7 100644 --- a/cpp/010vm +++ b/cpp/010vm @@ -129,6 +129,8 @@ void setup_recipes() { assert(Next_recipe_number == COPY); Next_recipe_number++; // End Primitive Recipe Numbers. + assert(Next_recipe_number < 100); + Next_recipe_number = 100; } :(before "End Setup") setup_recipes(); |