diff options
Diffstat (limited to 'cpp/.traces/array-from-args')
-rw-r--r-- | cpp/.traces/array-from-args | 57 |
1 files changed, 52 insertions, 5 deletions
diff --git a/cpp/.traces/array-from-args b/cpp/.traces/array-from-args index d999e006..292b6a44 100644 --- a/cpp/.traces/array-from-args +++ b/cpp/.traces/array-from-args @@ -1,3 +1,36 @@ +parse/0: instruction: run +parse/0: ingredient: {name: " + 1:address:array:location <- init-array 0:literal, 1:literal, 2:literal + 2:array:location <- copy 1:address:array:location/deref + ", value: 0, type: 0, properties: [" + 1:address:array:location <- init-array 0:literal, 1:literal, 2:literal + 2:array:location <- copy 1:address:array:location/deref + ": "literal-string"]} +parse/0: instruction: memory-should-contain +parse/0: ingredient: {name: " + 2 <- 3 # array length + 3 <- 0 + 4 <- 1 + 5 <- 2 + ", value: 0, type: 0, properties: [" + 2 <- 3 # array length + 3 <- 0 + 4 <- 1 + 5 <- 2 + ": "literal-string"]} +after-brace/0: recipe array-from-args +after-brace/0: run ... +after-brace/0: memory-should-contain ... +new/0: routine allocated memory from 1000 to 101000 +schedule/0: array-from-args +run/0: instruction array-from-args/0 +run/0: run {name: " + 1:address:array:location <- init-array 0:literal, 1:literal, 2:literal + 2:array:location <- copy 1:address:array:location/deref + ", value: 0, type: 0, properties: [" + 1:address:array:location <- init-array 0:literal, 1:literal, 2:literal + 2:array:location <- copy 1:address:array:location/deref + ": "literal-string"]} parse/0: instruction: init-array parse/0: ingredient: {name: "0", value: 0, type: 0, properties: ["0": "literal"]} parse/0: ingredient: {name: "1", value: 0, type: 0, properties: ["1": "literal"]} @@ -6,12 +39,10 @@ parse/0: product: {name: "1", value: 0, type: 2-5-1, properties: ["1": "addres parse/0: instruction: copy parse/0: ingredient: {name: "1", value: 0, type: 2-5-1, properties: ["1": "address":"array":"location", "deref": ]} parse/0: product: {name: "2", value: 0, type: 5-1, properties: ["2": "array":"location"]} -after-brace/0: recipe test-array-from-args +after-brace/0: recipe tmp0 after-brace/0: init-array ... after-brace/0: copy ... -new/0: routine allocated memory from 1000 to 101000 -schedule/0: test-array-from-args -run/0: instruction test-array-from-args/0 +run/0: instruction tmp0/0 run/0: {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location"]} <- init-array {name: "0", value: 0, type: 0, properties: ["0": "literal"]}, {name: "1", value: 1, type: 0, properties: ["1": "literal"]}, {name: "2", value: 2, type: 0, properties: ["2": "literal"]} run/0: instruction init-array/0 run/0: {name: "default-space", value: 0, type: 2-5-1, properties: ["default-space": "address":"array":"location"]} <- new {name: "location", value: 1, type: 0, properties: ["location": "type"]}, {name: "30", value: 30, type: 0, properties: ["30": "literal"]} @@ -268,7 +299,7 @@ run/0: reply {name: "result", value: 4, type: 2-5-1, properties: ["result": "add mem/0: location 1005 is 1031 run/0: result 0 is 1031 mem/0: storing 1031 in location 1 -run/0: instruction test-array-from-args/1 +run/0: instruction tmp0/1 run/0: {name: "2", value: 2, type: 5-1, properties: ["2": "array":"location"]} <- copy {name: "1", value: 1, type: 2-5-1, properties: ["1": "address":"array":"location", "deref": ]} run/0: ingredient 0 is 1 mem/0: location 1 is 1031 @@ -280,3 +311,19 @@ mem/0: storing 3 in location 2 mem/0: storing 0 in location 3 mem/0: storing 1 in location 4 mem/0: storing 2 in location 5 +run/0: instruction array-from-args/1 +run/0: memory-should-contain {name: " + 2 <- 3 # array length + 3 <- 0 + 4 <- 1 + 5 <- 2 + ", value: 0, type: 0, properties: [" + 2 <- 3 # array length + 3 <- 0 + 4 <- 1 + 5 <- 2 + ": "literal-string"]} +run/0: checking location 2 +run/0: checking location 3 +run/0: checking location 4 +run/0: checking location 5 |