diff options
-rw-r--r-- | 021check_instruction.cc | 6 | ||||
-rw-r--r-- | 022arithmetic.cc | 4 | ||||
-rw-r--r-- | 023boolean.cc | 30 | ||||
-rw-r--r-- | 025compare.cc | 48 | ||||
-rw-r--r-- | 027call_ingredient.cc | 6 | ||||
-rw-r--r-- | 030container.cc | 4 | ||||
-rw-r--r-- | 033exclusive_container.cc | 8 | ||||
-rw-r--r-- | 034address.cc | 2 | ||||
-rw-r--r-- | 035lookup.cc | 8 | ||||
-rw-r--r-- | 036refcount.cc | 4 | ||||
-rw-r--r-- | 037abandon.cc | 6 | ||||
-rw-r--r-- | 040brace.cc | 6 | ||||
-rw-r--r-- | 042name.cc | 2 | ||||
-rw-r--r-- | 043space.cc | 2 | ||||
-rw-r--r-- | 047check_type_by_name.cc | 4 | ||||
-rw-r--r-- | 054static_dispatch.cc | 16 | ||||
-rw-r--r-- | 055shape_shifting_container.cc | 4 | ||||
-rw-r--r-- | 057immutable.cc | 2 | ||||
-rw-r--r-- | 062convert_ingredients_to_text.cc | 2 | ||||
-rw-r--r-- | 069hash.cc | 24 | ||||
-rw-r--r-- | 071recipe.cc | 8 | ||||
-rw-r--r-- | 072scheduler.cc | 2 | ||||
-rw-r--r-- | 073wait.cc | 10 | ||||
-rw-r--r-- | 074deep_copy.cc | 46 | ||||
-rw-r--r-- | 085scenario_console.cc | 8 |
25 files changed, 131 insertions, 131 deletions
diff --git a/021check_instruction.cc b/021check_instruction.cc index b847fbe5..ac065abe 100644 --- a/021check_instruction.cc +++ b/021check_instruction.cc @@ -81,8 +81,8 @@ $error: 0 :(scenario write_boolean_to_number_allowed) def main [ - 1:boolean <- copy 1/true - 2:num <- copy 1:boolean + 1:bool <- copy 1/true + 2:num <- copy 1:bool ] +mem: storing 1 in location 2 $error: 0 @@ -90,7 +90,7 @@ $error: 0 :(scenario write_number_to_boolean_allowed) def main [ 1:num <- copy 34 - 2:boolean <- copy 1:num + 2:bool <- copy 1:num ] +mem: storing 34 in location 2 $error: 0 diff --git a/022arithmetic.cc b/022arithmetic.cc index 760aa98d..a56d2b72 100644 --- a/022arithmetic.cc +++ b/022arithmetic.cc @@ -57,9 +57,9 @@ def main [ :(scenario add_checks_type) % Hide_errors = true; def main [ - 1:num <- add 2:boolean, 1 + 1:num <- add 2:bool, 1 ] -+error: main: 'add' requires number ingredients, but got '2:boolean' ++error: main: 'add' requires number ingredients, but got '2:bool' :(scenario add_checks_return_type) % Hide_errors = true; diff --git a/023boolean.cc b/023boolean.cc index 8175e365..72037b1d 100644 --- a/023boolean.cc +++ b/023boolean.cc @@ -34,27 +34,27 @@ case AND: { :(scenario and) def main [ - 1:boolean <- copy 1 - 2:boolean <- copy 0 - 3:boolean <- and 1:boolean, 2:boolean + 1:bool <- copy 1 + 2:bool <- copy 0 + 3:bool <- and 1:bool, 2:bool ] +mem: storing 0 in location 3 :(scenario and_2) def main [ - 1:boolean <- and 1, 1 + 1:bool <- and 1, 1 ] +mem: storing 1 in location 1 :(scenario and_multiple) def main [ - 1:boolean <- and 1, 1, 0 + 1:bool <- and 1, 1, 0 ] +mem: storing 0 in location 1 :(scenario and_multiple_2) def main [ - 1:boolean <- and 1, 1, 1 + 1:bool <- and 1, 1, 1 ] +mem: storing 1 in location 1 @@ -92,27 +92,27 @@ case OR: { :(scenario or) def main [ - 1:boolean <- copy 1 - 2:boolean <- copy 0 - 3:boolean <- or 1:boolean, 2:boolean + 1:bool <- copy 1 + 2:bool <- copy 0 + 3:bool <- or 1:bool, 2:bool ] +mem: storing 1 in location 3 :(scenario or_2) def main [ - 1:boolean <- or 0, 0 + 1:bool <- or 0, 0 ] +mem: storing 0 in location 1 :(scenario or_multiple) def main [ - 1:boolean <- and 0, 0, 0 + 1:bool <- and 0, 0, 0 ] +mem: storing 0 in location 1 :(scenario or_multiple_2) def main [ - 1:boolean <- or 0, 0, 1 + 1:bool <- or 0, 0, 1 ] +mem: storing 1 in location 1 @@ -152,14 +152,14 @@ case NOT: { :(scenario not) def main [ - 1:boolean <- copy 1 - 2:boolean <- not 1:boolean + 1:bool <- copy 1 + 2:bool <- not 1:bool ] +mem: storing 0 in location 2 :(scenario not_multiple) def main [ - 1:boolean, 2:boolean, 3:boolean <- not 1, 0, 1 + 1:bool, 2:bool, 3:bool <- not 1, 0, 1 ] +mem: storing 0 in location 1 +mem: storing 1 in location 2 diff --git a/025compare.cc b/025compare.cc index 42b22e7e..a57aab88 100644 --- a/025compare.cc +++ b/025compare.cc @@ -46,7 +46,7 @@ case EQUAL: { def main [ 1:num <- copy 34 2:num <- copy 33 - 3:boolean <- equal 1:num, 2:num + 3:bool <- equal 1:num, 2:num ] +mem: location 1 is 34 +mem: location 2 is 33 @@ -56,7 +56,7 @@ def main [ def main [ 1:num <- copy 34 2:num <- copy 34 - 3:boolean <- equal 1:num, 2:num + 3:bool <- equal 1:num, 2:num ] +mem: location 1 is 34 +mem: location 2 is 34 @@ -64,13 +64,13 @@ def main [ :(scenario equal_multiple) def main [ - 1:boolean <- equal 34, 34, 34 + 1:bool <- equal 34, 34, 34 ] +mem: storing 1 in location 1 :(scenario equal_multiple_2) def main [ - 1:boolean <- equal 34, 34, 35 + 1:bool <- equal 34, 34, 35 ] +mem: storing 0 in location 1 @@ -112,7 +112,7 @@ case NOT_EQUAL: { def main [ 1:num <- copy 34 2:num <- copy 33 - 3:boolean <- not-equal 1:num, 2:num + 3:bool <- not-equal 1:num, 2:num ] +mem: location 1 is 34 +mem: location 2 is 33 @@ -122,7 +122,7 @@ def main [ def main [ 1:num <- copy 34 2:num <- copy 34 - 3:boolean <- not-equal 1:num, 2:num + 3:bool <- not-equal 1:num, 2:num ] +mem: location 1 is 34 +mem: location 2 is 34 @@ -171,7 +171,7 @@ case GREATER_THAN: { def main [ 1:num <- copy 34 2:num <- copy 33 - 3:boolean <- greater-than 1:num, 2:num + 3:bool <- greater-than 1:num, 2:num ] +mem: storing 1 in location 3 @@ -179,19 +179,19 @@ def main [ def main [ 1:num <- copy 34 2:num <- copy 34 - 3:boolean <- greater-than 1:num, 2:num + 3:bool <- greater-than 1:num, 2:num ] +mem: storing 0 in location 3 :(scenario greater_than_multiple) def main [ - 1:boolean <- greater-than 36, 35, 34 + 1:bool <- greater-than 36, 35, 34 ] +mem: storing 1 in location 1 :(scenario greater_than_multiple_2) def main [ - 1:boolean <- greater-than 36, 35, 35 + 1:bool <- greater-than 36, 35, 35 ] +mem: storing 0 in location 1 @@ -238,7 +238,7 @@ case LESSER_THAN: { def main [ 1:num <- copy 32 2:num <- copy 33 - 3:boolean <- lesser-than 1:num, 2:num + 3:bool <- lesser-than 1:num, 2:num ] +mem: storing 1 in location 3 @@ -246,19 +246,19 @@ def main [ def main [ 1:num <- copy 34 2:num <- copy 33 - 3:boolean <- lesser-than 1:num, 2:num + 3:bool <- lesser-than 1:num, 2:num ] +mem: storing 0 in location 3 :(scenario lesser_than_multiple) def main [ - 1:boolean <- lesser-than 34, 35, 36 + 1:bool <- lesser-than 34, 35, 36 ] +mem: storing 1 in location 1 :(scenario lesser_than_multiple_2) def main [ - 1:boolean <- lesser-than 34, 35, 35 + 1:bool <- lesser-than 34, 35, 35 ] +mem: storing 0 in location 1 @@ -305,7 +305,7 @@ case GREATER_OR_EQUAL: { def main [ 1:num <- copy 34 2:num <- copy 33 - 3:boolean <- greater-or-equal 1:num, 2:num + 3:bool <- greater-or-equal 1:num, 2:num ] +mem: storing 1 in location 3 @@ -313,7 +313,7 @@ def main [ def main [ 1:num <- copy 34 2:num <- copy 34 - 3:boolean <- greater-or-equal 1:num, 2:num + 3:bool <- greater-or-equal 1:num, 2:num ] +mem: storing 1 in location 3 @@ -321,19 +321,19 @@ def main [ def main [ 1:num <- copy 34 2:num <- copy 35 - 3:boolean <- greater-or-equal 1:num, 2:num + 3:bool <- greater-or-equal 1:num, 2:num ] +mem: storing 0 in location 3 :(scenario greater_or_equal_multiple) def main [ - 1:boolean <- greater-or-equal 36, 35, 35 + 1:bool <- greater-or-equal 36, 35, 35 ] +mem: storing 1 in location 1 :(scenario greater_or_equal_multiple_2) def main [ - 1:boolean <- greater-or-equal 36, 35, 36 + 1:bool <- greater-or-equal 36, 35, 36 ] +mem: storing 0 in location 1 @@ -380,7 +380,7 @@ case LESSER_OR_EQUAL: { def main [ 1:num <- copy 32 2:num <- copy 33 - 3:boolean <- lesser-or-equal 1:num, 2:num + 3:bool <- lesser-or-equal 1:num, 2:num ] +mem: storing 1 in location 3 @@ -388,7 +388,7 @@ def main [ def main [ 1:num <- copy 33 2:num <- copy 33 - 3:boolean <- lesser-or-equal 1:num, 2:num + 3:bool <- lesser-or-equal 1:num, 2:num ] +mem: storing 1 in location 3 @@ -396,19 +396,19 @@ def main [ def main [ 1:num <- copy 34 2:num <- copy 33 - 3:boolean <- lesser-or-equal 1:num, 2:num + 3:bool <- lesser-or-equal 1:num, 2:num ] +mem: storing 0 in location 3 :(scenario lesser_or_equal_multiple) def main [ - 1:boolean <- lesser-or-equal 34, 35, 35 + 1:bool <- lesser-or-equal 34, 35, 35 ] +mem: storing 1 in location 1 :(scenario lesser_or_equal_multiple_2) def main [ - 1:boolean <- lesser-or-equal 34, 35, 34 + 1:bool <- lesser-or-equal 34, 35, 34 ] +mem: storing 0 in location 1 diff --git a/027call_ingredient.cc b/027call_ingredient.cc index dd44fe36..20dc3a36 100644 --- a/027call_ingredient.cc +++ b/027call_ingredient.cc @@ -101,9 +101,9 @@ def main [ ] def f [ 12:num <- next-ingredient # consume ingredient - _, 1:boolean <- next-ingredient # will not find any ingredients + _, 1:bool <- next-ingredient # will not find any ingredients rewind-ingredients - 13:num, 2:boolean <- next-ingredient # will find ingredient again + 13:num, 2:bool <- next-ingredient # will find ingredient again ] +mem: storing 2 in location 12 +mem: storing 0 in location 1 @@ -130,7 +130,7 @@ def main [ ] def f [ 12:num <- ingredient 1 # consume second ingredient first - 13:num, 1:boolean <- next-ingredient # next-ingredient tries to scan past that + 13:num, 1:bool <- next-ingredient # next-ingredient tries to scan past that ] +mem: storing 2 in location 12 +mem: storing 0 in location 1 diff --git a/030container.cc b/030container.cc index 29268587..c54a4be5 100644 --- a/030container.cc +++ b/030container.cc @@ -76,7 +76,7 @@ def main [ 4:num <- copy 34 # second 5:num <- copy 35 6:num <- copy 36 - 7:boolean <- equal 1:point-number/raw, 4:point-number/unsafe + 7:bool <- equal 1:point-number/raw, 4:point-number/unsafe ] +mem: storing 1 in location 7 @@ -88,7 +88,7 @@ def main [ 4:num <- copy 34 # second 5:num <- copy 35 6:num <- copy 37 # different - 7:boolean <- equal 1:point-number/raw, 4:point-number/unsafe + 7:bool <- equal 1:point-number/raw, 4:point-number/unsafe ] +mem: storing 0 in location 7 diff --git a/033exclusive_container.cc b/033exclusive_container.cc index 79406bf4..3fa8426a 100644 --- a/033exclusive_container.cc +++ b/033exclusive_container.cc @@ -73,7 +73,7 @@ def main [ 12:num <- copy 1 13:num <- copy 35 14:num <- copy 36 - 20:point, 22:boolean <- maybe-convert 12:number-or-point/unsafe, 1:variant + 20:point, 22:bool <- maybe-convert 12:number-or-point/unsafe, 1:variant ] # boolean +mem: storing 1 in location 22 @@ -86,7 +86,7 @@ def main [ 12:num <- copy 1 13:num <- copy 35 14:num <- copy 36 - 20:num, 21:boolean <- maybe-convert 12:number-or-point/unsafe, 0:variant + 20:num, 21:bool <- maybe-convert 12:number-or-point/unsafe, 0:variant ] # boolean +mem: storing 0 in location 21 @@ -203,7 +203,7 @@ def main [ 12:num <- copy 1 13:num <- copy 35 14:num <- copy 36 - 20:num, 21:boolean <- maybe-convert 12:number-or-point/unsafe, 1:variant + 20:num, 21:bool <- maybe-convert 12:number-or-point/unsafe, 1:variant ] +error: main: 'maybe-convert 12:number-or-point/unsafe, 1:variant' should write to point but '20' has type number @@ -212,7 +212,7 @@ def main [ 12:num <- copy 1 13:num <- copy 35 14:num <- copy 36 - _, 21:boolean <- maybe-convert 12:number-or-point/unsafe, 1:variant + _, 21:bool <- maybe-convert 12:number-or-point/unsafe, 1:variant ] $error: 0 diff --git a/034address.cc b/034address.cc index ce94d819..3a599a7d 100644 --- a/034address.cc +++ b/034address.cc @@ -125,7 +125,7 @@ def main [ 1:address:num/raw <- new number:type 2:address:num/raw <- new number:type - 3:boolean/raw <- equal 1:address:num/raw, 2:address:num/raw + 3:bool/raw <- equal 1:address:num/raw, 2:address:num/raw ] +mem: storing 0 in location 3 diff --git a/035lookup.cc b/035lookup.cc index 04c27115..d37a8a35 100644 --- a/035lookup.cc +++ b/035lookup.cc @@ -412,7 +412,7 @@ def main [ # 10 reserved for refcount 11:number-or-point <- merge 0/number, 34 1:address:number-or-point <- copy 10/unsafe - 2:num, 3:boolean <- maybe-convert 1:address:number-or-point/lookup, i:variant + 2:num, 3:bool <- maybe-convert 1:address:number-or-point/lookup, i:variant ] +mem: storing 1 in location 3 +mem: storing 34 in location 2 @@ -423,7 +423,7 @@ def main [ 11:number-or-point <- merge 0/number, 34 1:address:number-or-point <- copy 10/unsafe 2:address:num <- copy 20/unsafe - 2:address:num/lookup, 3:boolean <- maybe-convert 1:address:number-or-point/lookup, i:variant + 2:address:num/lookup, 3:bool <- maybe-convert 1:address:number-or-point/lookup, i:variant ] +mem: storing 1 in location 3 +mem: storing 34 in location 21 @@ -433,8 +433,8 @@ def main [ # 10 reserved for refcount 11:number-or-point <- merge 0/number, 34 1:address:number-or-point <- copy 10/unsafe - 2:address:boolean <- copy 20/unsafe - 3:num, 2:address:boolean/lookup <- maybe-convert 1:address:number-or-point/lookup, i:variant + 2:address:bool <- copy 20/unsafe + 3:num, 2:address:bool/lookup <- maybe-convert 1:address:number-or-point/lookup, i:variant ] +mem: storing 1 in location 21 +mem: storing 34 in location 3 diff --git a/036refcount.cc b/036refcount.cc index 293d52d9..7622232f 100644 --- a/036refcount.cc +++ b/036refcount.cc @@ -168,7 +168,7 @@ exclusive-container foo [ def main [ 1:address:num <- new number:type 2:foo <- merge 1/p, 1:address:num - 4:address:num, 5:boolean <- maybe-convert 2:foo, 1:variant/p + 4:address:num, 5:bool <- maybe-convert 2:foo, 1:variant/p ] +run: {1: ("address" "number")} <- new {number: "type"} +mem: incrementing refcount of 1000: 0 -> 1 @@ -766,7 +766,7 @@ def main [ 1:address:num <- new number:type 2:bar <- merge 1:address:num 3:foo <- merge 1/b, 2:bar - 5:bar, 6:boolean <- maybe-convert 3:foo, 1:variant/b + 5:bar, 6:bool <- maybe-convert 3:foo, 1:variant/b ] +run: {1: ("address" "number")} <- new {number: "type"} +mem: incrementing refcount of 1000: 0 -> 1 diff --git a/037abandon.cc b/037abandon.cc index ea872e2f..c6e7607f 100644 --- a/037abandon.cc +++ b/037abandon.cc @@ -8,7 +8,7 @@ def main [ 1:address:num <- copy 0 # abandon 3:address:num <- new number:type # must be same size as abandoned memory to reuse 4:num <- copy 3:address:num - 5:boolean <- equal 2:num, 4:num + 5:bool <- equal 2:num, 4:num ] # both allocations should have returned the same address +mem: storing 1 in location 5 @@ -80,7 +80,7 @@ def main [ 1:address:num <- copy 0 # abandon 3:address:array:num <- new number:type, 2 # different size 4:num <- copy 3:address:array:num - 5:boolean <- equal 2:num, 4:num + 5:bool <- equal 2:num, 4:num ] # no reuse +mem: storing 0 in location 5 @@ -92,7 +92,7 @@ def main [ 1:address:array:num <- copy 0 # abandon 3:address:array:num <- new number:type, 2 # same size 4:num <- copy 3:address:array:num - 5:boolean <- equal 2:num, 4:num + 5:bool <- equal 2:num, 4:num ] # both calls to new returned identical addresses +mem: storing 1 in location 5 diff --git a/040brace.cc b/040brace.cc index be522bbc..89b4b633 100644 --- a/040brace.cc +++ b/040brace.cc @@ -310,7 +310,7 @@ def main [ { 3:num <- copy 0 } - loop-if 4:boolean + loop-if 4:bool 5:num <- copy 0 } ] @@ -334,8 +334,8 @@ def test-factorial [ 1:num <- copy 5 2:num <- copy 1 { - 3:boolean <- equal 1:num, 1 - break-if 3:boolean + 3:bool <- equal 1:num, 1 + break-if 3:bool # $print 1:num 2:num <- multiply 2:num, 1:num 1:num <- subtract 1:num, 1 diff --git a/042name.cc b/042name.cc index 29478a89..5b9540a2 100644 --- a/042name.cc +++ b/042name.cc @@ -271,7 +271,7 @@ def main [ 12:num <- copy 1 13:num <- copy 35 14:num <- copy 36 - 20:point, 22:boolean <- maybe-convert 12:number-or-point/unsafe, p:variant + 20:point, 22:bool <- maybe-convert 12:number-or-point/unsafe, p:variant ] +name: variant p of type number-or-point has tag 1 +mem: storing 1 in location 22 diff --git a/043space.cc b/043space.cc index 625cffed..fbff5460 100644 --- a/043space.cc +++ b/043space.cc @@ -194,7 +194,7 @@ if (x.name == "number-of-locals") { def main [ 1:address <- foo 2:address <- foo - 3:boolean <- equal 1:address, 2:address + 3:bool <- equal 1:address, 2:address ] def foo [ local-scope diff --git a/047check_type_by_name.cc b/047check_type_by_name.cc index 9f18f861..5bc42880 100644 --- a/047check_type_by_name.cc +++ b/047check_type_by_name.cc @@ -10,7 +10,7 @@ % Hide_errors = true; def main [ x:num <- copy 1 - x:boolean <- copy 1 + x:bool <- copy 1 ] +error: main: 'x' used with multiple types @@ -120,7 +120,7 @@ def foo [ # dummy def main [ local-scope 0:address:array:location/names:foo <- copy 0 # specify surrounding space - x:boolean <- copy 1/true + x:bool <- copy 1/true x:num/space:1 <- copy 34 x/space:1 <- copy 35 ] diff --git a/054static_dispatch.cc b/054static_dispatch.cc index 46e1468c..3a1d9980 100644 --- a/054static_dispatch.cc +++ b/054static_dispatch.cc @@ -418,13 +418,13 @@ def test a:number -> z:number [ def main [ 1:number <- copy 34 2:number <- copy 34 - 3:boolean <- equal 1:number, 2:number - 4:boolean <- copy 0/false - 5:boolean <- copy 0/false - 6:boolean <- equal 4:boolean, 5:boolean + 3:bool <- equal 1:number, 2:number + 4:bool <- copy 0/false + 5:bool <- copy 0/false + 6:bool <- equal 4:bool, 5:bool ] # temporarily hardcode number equality to always fail -def equal x:number, y:number -> z:boolean [ +def equal x:number, y:number -> z:bool [ local-scope load-ingredients z <- copy 0/false @@ -515,7 +515,7 @@ def foo x:char -> y:number [ load-ingredients return 34 ] -def foo x:boolean -> y:number [ +def foo x:bool -> y:number [ local-scope load-ingredients return 35 @@ -532,7 +532,7 @@ def foo x:char -> y:number [ load-ingredients return 34 ] -def foo x:boolean -> y:number [ +def foo x:bool -> y:number [ local-scope load-ingredients return 35 @@ -605,7 +605,7 @@ def foo a:number -> b:number [ load-ingredients return 34 ] -def foo a:boolean -> b:number [ +def foo a:bool -> b:number [ local-scope load-ingredients return 35 diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc index 0457e43a..d3103ab8 100644 --- a/055shape_shifting_container.cc +++ b/055shape_shifting_container.cc @@ -42,7 +42,7 @@ container foo:_a:_b [ y:_b ] def main [ - 1:foo:number:boolean <- merge 34, 1/true + 1:foo:number:bool <- merge 34, 1/true ] $error: 0 @@ -281,7 +281,7 @@ def main [ 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 + 4:bool <- equal 1:text, 3:text ] +mem: storing 1 in location 4 diff --git a/057immutable.cc b/057immutable.cc index 739f6a56..b10abb22 100644 --- a/057immutable.cc +++ b/057immutable.cc @@ -282,7 +282,7 @@ def test k:address:number [ def foo -> [ local-scope load-ingredients - k:address:number, found?:boolean <- next-ingredient + k:address:number, found?:bool <- next-ingredient # we don't further check k for immutability, but assume it's mutable ] $error: 0 diff --git a/062convert_ingredients_to_text.cc b/062convert_ingredients_to_text.cc index 300645de..828f7940 100644 --- a/062convert_ingredients_to_text.cc +++ b/062convert_ingredients_to_text.cc @@ -152,7 +152,7 @@ def main [ c:character <- copy 111/o a:text <- append [abc], 10, n, c expected:text <- new [abc1011o] - 10:boolean/raw <- equal a, expected + 10:bool/raw <- equal a, expected ] //: Make sure that the new system is strictly better than just the 'stash' diff --git a/069hash.cc b/069hash.cc index bbaaa924..b0a4fa6b 100644 --- a/069hash.cc +++ b/069hash.cc @@ -139,7 +139,7 @@ def main [ 4:foo <- merge 34, 98/a 6:number <- hash 4:foo return-unless 6:number - 7:boolean <- equal 3:number, 6:number + 7:bool <- equal 3:number, 6:number ] # hash on containers includes all elements +mem: storing 0 in location 7 @@ -160,7 +160,7 @@ def main [ 5:foo <- merge 0/x, 34, 36 8:number <- hash 5:foo return-unless 8:number - 9:boolean <- equal 4:number, 8:number + 9:bool <- equal 4:number, 8:number ] # hash on containers includes all elements +mem: storing 0 in location 9 @@ -177,7 +177,7 @@ def main [ 4:foo <- merge 34, 98/a 6:number <- hash 4:foo return-unless 6:number - 7:boolean <- equal 3:number, 6:number + 7:bool <- equal 3:number, 6:number ] # hashes match even though y is different +mem: storing 1 in location 7 @@ -198,7 +198,7 @@ def main [ def main [ 1:number <- hash 1.5 2:number <- hash 1 - 3:boolean <- equal 1:number, 2:number + 3:bool <- equal 1:number, 2:number ] +mem: storing 1 in location 3 @@ -213,7 +213,7 @@ def main [ 3:text <- new [abc] 4:number <- hash 3:text return-unless 4:number - 5:boolean <- equal 2:number, 4:number + 5:bool <- equal 2:number, 4:number ] +mem: storing 1 in location 5 @@ -225,7 +225,7 @@ def main [ 3:address:number <- new number:type *3:address:number <- copy 34 4:number <- hash 3:address:number - 5:boolean <- equal 2:number, 4:number + 5:bool <- equal 2:number, 4:number ] # different addresses hash to the same result as long as the values the point to do so +mem: storing 1 in location 5 @@ -240,7 +240,7 @@ def main [ 3:address:number <- copy 1:address:number 4:number <- hash 3:address:number return-unless 4:number - 5:boolean <- equal 2:number, 4:number + 5:bool <- equal 2:number, 4:number ] # hash doesn't change when refcount changes +mem: storing 1 in location 5 @@ -261,7 +261,7 @@ def main [ 4:bar <- merge 34, 97/a 6:number <- hash 4:bar return-unless 6:number - 7:boolean <- equal 3:number, 6:number + 7:bool <- equal 3:number, 6:number ] # containers with identical elements return identical hashes +mem: storing 1 in location 7 @@ -283,7 +283,7 @@ def main [ 7:foo <- merge 34, 97/a, 6:address:number 10:number <- hash 7:foo return-unless 10:number - 11:boolean <- equal 5:number, 10:number + 11:bool <- equal 5:number, 10:number ] # containers with identical 'leaf' elements return identical hashes +mem: storing 1 in location 11 @@ -305,7 +305,7 @@ def main [ 7:foo <- merge 34, 97/a, 47, 48 12:number <- hash 7:foo return-unless 12:number - 13:boolean <- equal 6:number, 12:number + 13:bool <- equal 6:number, 12:number ] # containers with identical 'leaf' elements return identical hashes +mem: storing 1 in location 13 @@ -326,7 +326,7 @@ def main [ 5:bar <- merge 34, 35 7:number <- hash 5:bar return-unless 7:number - 8:boolean <- equal 4:number, 7:number + 8:bool <- equal 4:number, 7:number ] # hash on containers includes all elements +mem: storing 1 in location 8 @@ -340,7 +340,7 @@ def main [ 1:text <- new [abc] 2:number <- hash 1:text 3:number <- hash_old 1:text - 4:boolean <- equal 2:number, 3:number + 4:bool <- equal 2:number, 3:number ] +mem: storing 1 in location 4 diff --git a/071recipe.cc b/071recipe.cc index 026af6f4..35bb64f3 100644 --- a/071recipe.cc +++ b/071recipe.cc @@ -80,11 +80,11 @@ bool is_matching_non_recipe_literal(const reagent& x, const string& name) { % Hide_errors = true; def main [ local-scope - a:boolean <- equal break 0 - break:boolean <- copy 0 + a:bool <- equal break 0 + break:bool <- copy 0 ] +error: main: you can't use 'break' as a recipe literal when it's also a variable -+error: main: missing type for 'break' in 'a:boolean <- equal break, 0' ++error: main: missing type for 'break' in 'a:bool <- equal break, 0' :(before "End Primitive Recipe Declarations") CALL, @@ -271,7 +271,7 @@ def f x:number -> y:number [ def main [ {1: (recipe number -> number)} <- copy f # mismatch with a recipe literal ] -def f x:boolean -> y:boolean [ +def f x:bool -> y:bool [ local-scope load-ingredients y <- copy x diff --git a/072scheduler.cc b/072scheduler.cc index 91fd110a..096f425c 100644 --- a/072scheduler.cc +++ b/072scheduler.cc @@ -673,7 +673,7 @@ def f1 [ def f2 [ 2:address:number/raw <- new number:type # hack: assumes scheduler implementation - 3:boolean/raw <- equal 1:address:number/raw, 2:address:number/raw + 3:bool/raw <- equal 1:address:number/raw, 2:address:number/raw # signal f2 complete 4:number/raw <- copy 1 ] diff --git a/073wait.cc b/073wait.cc index a762a8b7..942c6871 100644 --- a/073wait.cc +++ b/073wait.cc @@ -243,13 +243,13 @@ def main [ :(scenario get_location_product_type_mismatch) % Hide_errors = true; container boolbool [ - x:boolean - y:boolean + x:bool + y:bool ] def main [ - 12:boolean <- copy 1 - 13:boolean <- copy 0 - 15:boolean <- get-location 12:boolbool, 1:offset + 12:bool <- copy 1 + 13:bool <- copy 0 + 15:bool <- get-location 12:boolbool, 1:offset ] +error: main: 'get-location 12:boolbool, 1:offset' should write to type location but '15' has type 'boolean' diff --git a/074deep_copy.cc b/074deep_copy.cc index a3d7c48b..4df269ff 100644 --- a/074deep_copy.cc +++ b/074deep_copy.cc @@ -15,7 +15,7 @@ def main [ local-scope x:number <- copy 34 y:number <- deep-copy x - 10:boolean/raw <- equal x, y + 10:bool/raw <- equal x, y ] # non-address primitives are identical +mem: storing 1 in location 10 @@ -29,7 +29,7 @@ def main [ local-scope a:foo <- merge 34, 35 b:foo <- deep-copy a - 10:boolean/raw <- equal a, b + 10:bool/raw <- equal a, b ] # containers are identical as long as they don't contain addresses +mem: storing 1 in location 10 @@ -42,8 +42,8 @@ def main [ 1:address:number <- copy 100/unsafe # pretend allocation *1:address:number <- copy 34 2:address:number <- deep-copy 1:address:number - 10:boolean <- equal 1:address:number, 2:address:number - 11:boolean <- equal *1:address:number, *2:address:number + 10:bool <- equal 1:address:number, 2:address:number + 11:bool <- equal *1:address:number, *2:address:number 2:address:number <- copy 0 ] # the result of deep-copy is a new address @@ -64,8 +64,8 @@ def main [ 1:address:point <- copy 100/unsafe # pretend allocation *1:address:point <- merge 34, 35 2:address:point <- deep-copy 1:address:point - 10:boolean <- equal 1:address:point, 2:address:point - 11:boolean <- equal *1:address:point, *2:address:point + 10:bool <- equal 1:address:point, 2:address:point + 11:bool <- equal *1:address:point, *2:address:point ] # the result of deep-copy is a new address +mem: storing 0 in location 10 @@ -81,9 +81,9 @@ def main [ *1:address:address:number <- copy 150/unsafe **1:address:address:number <- copy 34 2:address:address:number <- deep-copy 1:address:address:number - 10:boolean <- equal 1:address:address:number, 2:address:address:number - 11:boolean <- equal *1:address:address:number, *2:address:address:number - 12:boolean <- equal **1:address:address:number, **2:address:address:number + 10:bool <- equal 1:address:address:number, 2:address:address:number + 11:bool <- equal *1:address:address:number, *2:address:address:number + 12:bool <- equal **1:address:address:number, **2:address:address:number ] # the result of deep-copy is a new address +mem: storing 0 in location 10 @@ -107,8 +107,8 @@ def main [ 2:address:array:number <- deep-copy 1:address:array:number stash 2:address:array:number stash [new:], *2:address:array:number - 10:boolean <- equal 1:address:array:number, 2:address:array:number - 11:boolean <- equal *1:address:array:number, *2:address:array:number + 10:bool <- equal 1:address:array:number, 2:address:array:number + 11:bool <- equal *1:address:array:number, *2:address:array:number ] +app: old: 3 34 35 36 +app: new: 3 34 35 36 @@ -128,9 +128,9 @@ def main [ *y0 <- copy 35 a:foo <- merge 34, y0 b:foo <- deep-copy a - 10:boolean/raw <- equal a, b + 10:bool/raw <- equal a, b y1:address:number <- get b, y:offset - 11:boolean/raw <- equal y0, y1 + 11:bool/raw <- equal y0, y1 12:number/raw <- copy *y1 ] # containers containing addresses are not identical to their deep copies @@ -150,9 +150,9 @@ def main [ *y0 <- copy 34 a:foo <- merge 1/y, y0 b:foo <- deep-copy a - 10:boolean/raw <- equal a, b - y1:address:number, z:boolean <- maybe-convert b, y:variant - 11:boolean/raw <- equal y0, y1 + 10:bool/raw <- equal a, b + y1:address:number, z:bool <- maybe-convert b, y:variant + 11:bool/raw <- equal y0, y1 12:number/raw <- copy *y1 ] # exclusive containers containing addresses are not identical to their deep copies @@ -176,10 +176,10 @@ def main [ a:bar <- merge y0 b:foo <- merge 1/y, a c:foo <- deep-copy b - 10:boolean/raw <- equal b, c - d:bar, z:boolean <- maybe-convert c, y:variant + 10:bool/raw <- equal b, c + d:bar, z:bool <- maybe-convert c, y:variant y1:address:number <- get d, x:offset - 11:boolean/raw <- equal y0, y1 + 11:bool/raw <- equal y0, y1 12:number/raw <- copy *y1 ] # exclusive containers containing addresses are not identical to their deep copies @@ -321,7 +321,7 @@ def main [ *b <- merge a c:foo3 <- merge 1/q, b d:foo3 <- deep-copy c - e:address:foo2, z:boolean <- maybe-convert d, q:variant + e:address:foo2, z:bool <- maybe-convert d, q:variant f:address:foo1 <- get *e, p:offset g:address:number <- get *f, p:offset 1:number/raw <- copy *g @@ -356,7 +356,7 @@ def main [ d:foo4 <- merge 35, c e:foo4 <- deep-copy d f:address:foo3 <- get e, q:offset - g:address:foo2, z:boolean <- maybe-convert *f, q:variant + g:address:foo2, z:bool <- maybe-convert *f, q:variant h:address:foo1 <- get *g, p:offset y:address:number <- get *h, p:offset 1:number/raw <- copy *y @@ -377,8 +377,8 @@ def main [ 1:number/raw <- get *y, p:offset y2:address:foo <- get *y, q:offset stash y [vs] y2 - 2:boolean/raw <- equal y, y2 # is it still a cycle? - 3:boolean/raw <- equal x, y # is it the same cycle? + 2:bool/raw <- equal y, y2 # is it still a cycle? + 3:bool/raw <- equal x, y # is it the same cycle? ] +mem: storing 34 in location 1 # deep copy also contains a cycle diff --git a/085scenario_console.cc b/085scenario_console.cc index dbad4103..64c87a97 100644 --- a/085scenario_console.cc +++ b/085scenario_console.cc @@ -15,10 +15,10 @@ scenario keyboard-in-scenario [ type [abc] ] run [ - 1:char, console:address:console, 2:boolean <- read-key console:address:console - 3:char, console:address:console, 4:boolean <- read-key console:address:console - 5:char, console:address:console, 6:boolean <- read-key console:address:console - 7:char, console:address:console, 8:boolean, 9:boolean <- read-key console:address:console + 1:char, console:address:console, 2:bool <- read-key console:address:console + 3:char, console:address:console, 4:bool <- read-key console:address:console + 5:char, console:address:console, 6:bool <- read-key console:address:console + 7:char, console:address:console, 8:bool, 9:bool <- read-key console:address:console ] memory-should-contain [ 1 <- 97 # 'a' |