From a654e4ecace2d506d1b10f1dde2c287ebe84ef37 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 26 Mar 2016 23:59:59 -0700 Subject: 2812 --- html/034call.cc.html | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) (limited to 'html/034call.cc.html') diff --git a/html/034call.cc.html b/html/034call.cc.html index bf98e18e..17a302a6 100644 --- a/html/034call.cc.html +++ b/html/034call.cc.html @@ -3,28 +3,36 @@ Mu - 034call.cc - - + + - + + + + -
+
 //: So far the recipes we define can't run each other. Let's fix that.
 
 :(scenario calling_recipe)
@@ -49,12 +57,12 @@ def f [
 ]
 +run: f
 # running f
-+run: 4:number <- copy 0
-+run: 5:number <- copy 0
++run: {4: "number"} <- copy {0: "literal"}
++run: {5: "number"} <- copy {0: "literal"}
 # back out to main
-+run: 1:number <- copy 0
-+run: 2:number <- copy 0
-+run: 3:number <- copy 0
++run: {1: "number"} <- copy {0: "literal"}
++run: {2: "number"} <- copy {0: "literal"}
++run: {3: "number"} <- copy {0: "literal"}
 
 :(before "struct routine {")
 // Everytime a recipe runs another, we interrupt it and start running the new
@@ -62,7 +70,7 @@ def f [
 // This requires maintaining a 'stack' of interrupted recipes or 'calls'.
 struct call {
   recipe_ordinal running_recipe;
-  long long int running_step_index;
+  int running_step_index;
   // End call Fields
   call(recipe_ordinal r) {
     running_recipe = r;
@@ -101,8 +109,8 @@ routine::routine(recipe_ordinal r//:: now update routine's helpers
 
-:(replace{} "inline long long int& current_step_index()")
-inline long long int& current_step_index() {
+:(replace{} "inline int& current_step_index()")
+inline int& current_step_index() {
   assert(!Current_routine->calls.empty());
   return current_call().running_step_index;
 }
@@ -124,7 +132,7 @@ routine::routine(recipe_ordinal r:(after "Defined Recipe Checks")
 // not a primitive; check that it's present in the book of recipes
 if (!contains_key(Recipe, inst.operation)) {
-  raise << maybe(get(Recipe, r).name) << "undefined operation in '" << to_string(inst) << "'\n" << end();
+  raise << maybe(get(Recipe, r).name) << "undefined operation in '" << to_original_string(inst) << "'\n" << end();
   break;
 }
 :(replace{} "default:" following "End Primitive Recipe Implementations")
@@ -160,7 +168,7 @@ def main [
 :(scenario calling_undefined_recipe_handles_missing_result)
 % Hide_errors = true;
 def main [
-  x:number <- foo
+  x:number <- foo
 ]
 +error: main: undefined operation in 'x:number <- foo '
 
@@ -171,6 +179,7 @@ def main [
   return calls.empty();
 }
 
+:(replace{} "inline const vector<instruction>& routine::steps() const")
 inline const vector<instruction>& routine::steps() const {
   assert(!calls.empty());
   return get(Recipe, calls.front().running_recipe).steps;
@@ -195,3 +204,4 @@ def main [
 
+ -- cgit 1.4.1-2-gfad0