diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-16 21:19:50 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-16 21:19:50 -0700 |
commit | 1918e650b333b2dfbfc688f2f276c6fee6eb893a (patch) | |
tree | ed51d7f3267f83930ce4e3c35aec9f0b541accb5 | |
parent | 3a787ca752d2b931c71ed6f34a5aecbf40b8be23 (diff) | |
download | mu-1918e650b333b2dfbfc688f2f276c6fee6eb893a.tar.gz |
936
-rw-r--r-- | cpp/.traces/reply | 16 | ||||
-rw-r--r-- | cpp/021call_ingredient | 6 |
2 files changed, 10 insertions, 12 deletions
diff --git a/cpp/.traces/reply b/cpp/.traces/reply index 6b7b7417..7b89c745 100644 --- a/cpp/.traces/reply +++ b/cpp/.traces/reply @@ -2,7 +2,7 @@ parse/0: instruction: 25 parse/0: ingredient: {name: "2", type: 0} parse/0: product: {name: "3", type: 1} parse/0: product: {name: "4", type: 1} -parse/0: instruction: 22 +parse/0: instruction: 26 parse/0: product: {name: "12", type: 1} parse/0: instruction: 2 parse/0: ingredient: {name: "1", type: 0} @@ -13,18 +13,16 @@ parse/0: ingredient: {name: "12", type: 1} parse/0: ingredient: {name: "13", type: 1} run/0: instruction main/0 run/0: instruction f/0 -run/0: product 0 is 2 -mem/0: storing in location 12 run/0: instruction f/1 run/0: ingredient 0 is 1 run/0: ingredient 1 is 12 -mem/0: location 12 is 2 -run/0: product 0 is 3 +mem/0: location 12 is 0 +run/0: product 0 is 1 mem/0: storing in location 13 run/0: instruction f/2 -mem/0: location 12 is 2 -mem/0: location 13 is 3 -run/0: result 0 is 1[2...] +mem/0: location 12 is 0 +mem/0: location 13 is 1 +run/0: result 0 is 1[0...] mem/0: storing in location 3 -run/0: result 1 is 1[3...] +run/0: result 1 is 1[1...] mem/0: storing in location 4 diff --git a/cpp/021call_ingredient b/cpp/021call_ingredient index 9cc30470..0401d5b9 100644 --- a/cpp/021call_ingredient +++ b/cpp/021call_ingredient @@ -1,11 +1,11 @@ //: Calls can take ingredients just like primitives. To access a recipe's -//: ingredients, use 'next_ingredient'. +//: ingredients, use 'next-ingredient'. :(scenario "next_ingredient") recipe main [ f 2:literal ] recipe f [ - 12:integer <- next_ingredient + 12:integer <- next-ingredient 13:integer <- add 1:literal, 12:integer ] +run: instruction f/1 @@ -28,7 +28,7 @@ rr.calls.push(callee); :(before "End Globals") const int NEXT_INGREDIENT = 22; :(before "End Primitive Recipe Numbers") -Recipe_number["next_ingredient"] = NEXT_INGREDIENT; +Recipe_number["next-ingredient"] = NEXT_INGREDIENT; assert(Next_recipe_number == NEXT_INGREDIENT); Next_recipe_number++; :(before "End Primitive Recipe Implementations") |