diff options
-rw-r--r-- | 038new_text.cc | 28 | ||||
-rw-r--r-- | 043space.cc | 4 | ||||
-rw-r--r-- | 050scenario.cc | 2 | ||||
-rw-r--r-- | 054static_dispatch.cc | 4 | ||||
-rw-r--r-- | 055shape_shifting_container.cc | 16 | ||||
-rw-r--r-- | 056shape_shifting_recipe.cc | 8 |
6 files changed, 31 insertions, 31 deletions
diff --git a/038new_text.cc b/038new_text.cc index 9ecc992c..d9dbbf17 100644 --- a/038new_text.cc +++ b/038new_text.cc @@ -6,17 +6,17 @@ put(Type_abbreviations, "text", new_type_tree("address:array:character")); :(scenario new_string) def main [ - 1:address:array:character <- new [abc def] - 2:character <- index *1:address:array:character, 5 + 1:text <- new [abc def] + 2:character <- index *1:text, 5 ] # number code for 'e' +mem: storing 101 in location 2 :(scenario new_string_handles_unicode) def main [ - 1:address:array:character <- new [a«c] - 2:number <- length *1:address:array:character - 3:character <- index *1:address:array:character, 1 + 1:text <- new [a«c] + 2:number <- length *1:text + 3:character <- index *1:text, 1 ] +mem: storing 3 in location 2 # unicode for '«' @@ -66,8 +66,8 @@ int new_mu_text(const string& contents) { :(scenario stash_string) def main [ - 1:address:array:character <- new [abc] - stash [foo:], 1:address:array:character + 1:text <- new [abc] + stash [foo:], 1:text ] +app: foo: abc @@ -79,22 +79,22 @@ if (is_mu_text(r)) { :(scenario unicode_string) def main [ - 1:address:array:character <- new [♠] - stash [foo:], 1:address:array:character + 1:text <- new [♠] + stash [foo:], 1:text ] +app: foo: ♠ :(scenario stash_space_after_string) def main [ - 1:address:array:character <- new [abc] - stash 1:address:array:character, [foo] + 1:text <- new [abc] + stash 1:text, [foo] ] +app: abc foo :(scenario stash_string_as_array) def main [ - 1:address:array:character <- new [abc] - stash *1:address:array:character + 1:text <- new [abc] + stash *1:text ] +app: 3 97 98 99 @@ -107,7 +107,7 @@ if (!canonize_type(x)) return false; % Initial_memory_per_routine = 3; def main [ 1:address:number/raw <- new number:type - 2:address:array:character/raw <- new [a] # not enough room in initial page, if you take the refcount and array length into account + 2:text/raw <- new [a] # not enough room in initial page, if you take the refcount and array length into account ] +new: routine allocated memory from 1000 to 1003 +new: routine allocated memory from 1003 to 1006 diff --git a/043space.cc b/043space.cc index 1c26cc2f..d331342c 100644 --- a/043space.cc +++ b/043space.cc @@ -207,9 +207,9 @@ def foo [ :(scenario local_scope_frees_up_addresses) def main [ local-scope - x:address:array:character <- new [abc] + x:text <- new [abc] ] -+mem: clearing x:address:array:character ++mem: clearing x:text :(before "End Rewrite Instruction(curr, recipe result)") if (curr.name == "local-scope") { diff --git a/050scenario.cc b/050scenario.cc index 351d978b..62121fb3 100644 --- a/050scenario.cc +++ b/050scenario.cc @@ -100,7 +100,7 @@ scenario foo [ :(scenario read_scenario_with_bracket_in_comment_in_nested_string) scenario foo [ - 1:address:array:character <- new [# not a comment] + 1:text <- new [# not a comment] ] +run: {1: ("address" "array" "character")} <- new {"# not a comment": "literal-string"} diff --git a/054static_dispatch.cc b/054static_dispatch.cc index e6bbe207..82fc1de3 100644 --- a/054static_dispatch.cc +++ b/054static_dispatch.cc @@ -617,10 +617,10 @@ def foo a:boolean -> b:number [ type string = address:array:character def main [ local-scope - s:address:array:character <- new [abc] + s:text <- new [abc] 1:number/raw <- foo s ] -def foo a:address:array:character -> result:number [ +def foo a:text -> result:number [ return 34 ] # identical to previous variant once you take type abbreviation into account diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc index ef165c91..26bb7467 100644 --- a/055shape_shifting_container.cc +++ b/055shape_shifting_container.cc @@ -52,9 +52,9 @@ container foo:_a:_b [ y:_b ] def main [ - 1:address:array:character <- new [abc] + 1:text <- new [abc] # compound types for type ingredients - {2: (foo number (address array character))} <- merge 34/x, 1:address:array:character/y + {2: (foo number (address array character))} <- merge 34/x, 1:text/y ] $error: 0 @@ -68,8 +68,8 @@ container bar:_a:_b [ {data: (foo _a (address _b))} ] def main [ - 1:address:array:character <- new [abc] - 2:bar:number:array:character <- merge 34/x, 1:address:array:character/y + 1:text <- new [abc] + 2:bar:number:array:character <- merge 34/x, 1:text/y ] $error: 0 @@ -278,10 +278,10 @@ container foo:_a:_b [ y:_b ] def main [ - 1:address:array:character <- new [abc] - {2: (foo number (address array character))} <- merge 34/x, 1:address:array:character/y - 3:address:array:character <- get {2: (foo number (address array character))}, y:offset - 4:boolean <- equal 1:address:array:character, 3:address:array:character + 1:text <- new [abc] + {2: (foo number (address array character))} <- merge 34/x, 1:text/y + 3:text <- get {2: (foo number (address array character))}, y:offset + 4:boolean <- equal 1:text, 3:text ] +mem: storing 1 in location 4 diff --git a/056shape_shifting_recipe.cc b/056shape_shifting_recipe.cc index 1903921e..d251db47 100644 --- a/056shape_shifting_recipe.cc +++ b/056shape_shifting_recipe.cc @@ -548,7 +548,7 @@ container c:_a:_b [ b:_b ] def main [ - s:address:array:character <- new [abc] + s:text <- new [abc] {x: (c (address array character) number)} <- merge s, 34 foo x ] @@ -925,10 +925,10 @@ def foo dummy:address:array:number, x:_elem -> y:number, dummy:address:array:num :(scenario specialize_most_similar_variant_3) def main [ - 1:address:array:character <- new [abc] - foo 1:address:array:character + 1:text <- new [abc] + foo 1:text ] -def foo x:address:array:character [ +def foo x:text [ 2:number <- copy 34 ] def foo x:address:_elem [ |