From f344b250f6f062a1a1902bf69b23ebf9b565de0e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 17 Sep 2016 15:01:51 -0700 Subject: 3395 --- html/042name.cc.html | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'html/042name.cc.html') diff --git a/html/042name.cc.html b/html/042name.cc.html index 97822b73..829cc216 100644 --- a/html/042name.cc.html +++ b/html/042name.cc.html @@ -41,7 +41,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color :(scenario transform_names) def main [ - x:number <- copy 0 + x:num <- copy 0 ] +name: assign x 1 +mem: storing 0 in location 1 @@ -50,7 +50,7 @@ def main [ :(scenario transform_names_fails_on_use_before_define) % Hide_errors = true; def main [ - x:number <- copy y:number + x:num <- copy y:num ] +error: main: use before set: 'y' # todo: detect conditional defines @@ -193,7 +193,7 @@ type_ordinal skip_addresses(type_tree* type:(scenario transform_names_supports_containers) def main [ x:point <- merge 34, 35 - y:number <- copy 3 + y:num <- copy 3 ] +name: assign x 1 # skip location 2 because x occupies two locations @@ -201,8 +201,8 @@ def main [ :(scenario transform_names_supports_static_arrays) def main [ - x:array:number:3 <- create-array - y:number <- copy 3 + x:@:num:3 <- create-array + y:num <- copy 3 ] +name: assign x 1 # skip locations 2, 3, 4 because x occupies four locations @@ -211,7 +211,7 @@ def main [ :(scenario transform_names_passes_dummy) # _ is just a dummy result that never gets consumed def main [ - _, x:number <- copy 0, 1 + _, x:num <- copy 0, 1 ] +name: assign x 1 -name: assign _ 1 @@ -221,37 +221,37 @@ def main [ :(scenario transform_names_passes_raw) % Hide_errors = true; def main [ - x:number/raw <- copy 0 + x:num/raw <- copy 0 ] -name: assign x 1 -+error: can't write to location 0 in 'x:number/raw <- copy 0' ++error: can't write to location 0 in 'x:num/raw <- copy 0' :(scenarios transform) :(scenario transform_names_fails_when_mixing_names_and_numeric_locations) % Hide_errors = true; def main [ - x:number <- copy 1:number + x:num <- copy 1:num ] +error: main: mixing variable names and numeric addresses :(scenario transform_names_fails_when_mixing_names_and_numeric_locations_2) % Hide_errors = true; def main [ - x:number <- copy 1 - 1:number <- copy x:number + x:num <- copy 1 + 1:num <- copy x:num ] +error: main: mixing variable names and numeric addresses :(scenario transform_names_does_not_fail_when_mixing_names_and_raw_locations) def main [ - x:number <- copy 1:number/raw + x:num <- copy 1:num/raw ] -error: main: mixing variable names and numeric addresses $error: 0 :(scenario transform_names_does_not_fail_when_mixing_names_and_literals) def main [ - x:number <- copy 1 + x:num <- copy 1 ] -error: main: mixing variable names and numeric addresses $error: 0 @@ -261,9 +261,9 @@ $error: 0 :(scenario transform_names_transforms_container_elements) def main [ - p:address:point <- copy 0 - a:number <- get *p:address:point, y:offset - b:number <- get *p:address:point, x:offset + p:&:point <- copy 0 + a:num <- get *p:&:point, y:offset + b:num <- get *p:&:point, x:offset ] +name: element y of type point is at offset 1 +name: element x of type point is at offset 0 @@ -295,7 +295,7 @@ def main [ :(scenario transform_names_handles_containers) def main [ a:point <- copy 0/unsafe - b:number <- copy 0/unsafe + b:num <- copy 0/unsafe ] +name: assign a 1 +name: assign b 3 @@ -305,10 +305,10 @@ def main [ :(scenarios run) :(scenario transform_names_handles_exclusive_containers) def main [ - 12:number <- copy 1 - 13:number <- copy 35 - 14:number <- copy 36 - 20:point, 22:boolean <- maybe-convert 12:number-or-point/unsafe, p:variant + 12:num <- copy 1 + 13:num <- copy 35 + 14:num <- copy 36 + 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 -- cgit 1.4.1-2-gfad0