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/046global.cc.html | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'html/046global.cc.html') diff --git a/html/046global.cc.html b/html/046global.cc.html index c92132a0..6fce3f17 100644 --- a/html/046global.cc.html +++ b/html/046global.cc.html @@ -3,27 +3,35 @@ Mu - 046global.cc - - + + - + + + + -
+
 //: So far we have local variables, and we can nest local variables of short
 //: lifetimes inside longer ones. Now let's support 'global' variables that
 //: last for the life of a routine. If we create multiple routines they won't
@@ -63,10 +71,10 @@ def main [
 
 //: writes to this variable go to a field in the current routine
 :(before "End routine Fields")
-long long int global_space;
+int global_space;
 :(before "End routine Constructor")
 global_space = 0;
-:(after "void write_memory(reagent x, vector<double> data)")
+:(after "void write_memory(reagent x, const vector<double>& data)")
   if (x.name == "global-space") {
     if (!scalar(data)
         || !x.type
@@ -87,7 +95,7 @@ global_space = 0;
   }
 
 //: now marking variables as /space:global looks them up inside this field
-:(after "long long int space_base(const reagent& x)")
+:(after "int space_base(const reagent& x)")
   if (is_global(x)) {
     if (!Current_routine->global_space)
       raise << "routine has no global space\n" << end();
@@ -100,7 +108,7 @@ global_space = 0;
 :(scenario global_space_with_names)
 def main [
   global-space:address:shared:array:location <- new location:type, 10
-  x:number <- copy 23
+  x:number <- copy 23
   1:number/space:global <- copy 24
 ]
 # don't complain about mixing numeric addresses and names
@@ -113,7 +121,7 @@ $error: 0
 
 :(code)
 bool is_global(const reagent& x) {
-  for (long long int i = 0; i < SIZE(x.properties); ++i) {
+  for (int i = 0; i < SIZE(x.properties); ++i) {
     if (x.properties.at(i).first == "space")
       return x.properties.at(i).second && x.properties.at(i).second->value == "global";
   }
@@ -122,3 +130,4 @@ $error: 0
 
+ -- cgit 1.4.1-2-gfad0