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/073wait.cc.html | 100 +++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'html/073wait.cc.html') diff --git a/html/073wait.cc.html b/html/073wait.cc.html index b99b8cc5..74c5ce2f 100644 --- a/html/073wait.cc.html +++ b/html/073wait.cc.html @@ -41,12 +41,12 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color :(scenario wait_for_location) def f1 [ - 10:number <- copy 34 + 10:num <- copy 34 start-running f2 20:location <- copy 10/unsafe wait-for-reset-then-set 20:location # wait for f2 to run and reset location 1 - 30:number <- copy 10:number + 30:num <- copy 10:num ] def f2 [ 10:location <- copy 0/unsafe @@ -176,8 +176,8 @@ put(Recipe_ordinal,:(scenario get_location) def main [ - 12:number <- copy 34 - 13:number <- copy 35 + 12:num <- copy 34 + 13:num <- copy 35 15:location <- get-location 12:point, 1:offset ] +mem: storing 13 in location 15 @@ -259,9 +259,9 @@ put(Recipe_ordinal,:(scenario get_location_out_of_bounds) % Hide_errors = true; def main [ - 12:number <- copy 34 - 13:number <- copy 35 - 14:number <- copy 36 + 12:num <- copy 34 + 13:num <- copy 35 + 14:num <- copy 36 get-location 12:point-number/raw, 2:offset # point-number occupies 3 locations but has only 2 fields; out of bounds ] +error: main: invalid offset 2 for 'point-number' @@ -269,9 +269,9 @@ def main [ :(scenario get_location_out_of_bounds_2) % Hide_errors = true; def main [ - 12:number <- copy 34 - 13:number <- copy 35 - 14:number <- copy 36 + 12:num <- copy 34 + 13:num <- copy 35 + 14:num <- copy 36 get-location 12:point-number/raw, -1:offset ] +error: main: invalid offset -1 for 'point-number' @@ -279,35 +279,35 @@ 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' :(scenario get_location_indirect) # 'get-location' can read from container address def main [ - 1:number <- copy 10 + 1:num <- copy 10 # 10 reserved for refcount - 11:number <- copy 34 - 12:number <- copy 35 - 4:location <- get-location 1:address:point/lookup, 0:offset + 11:num <- copy 34 + 12:num <- copy 35 + 4:location <- get-location 1:&:point/lookup, 0:offset ] +mem: storing 11 in location 4 :(scenario get_location_indirect_2) def main [ - 1:number <- copy 10 + 1:num <- copy 10 # 10 reserved for refcount - 11:number <- copy 34 - 12:number <- copy 35 - 4:address:number <- copy 20/unsafe - 4:address:location/lookup <- get-location 1:address:point/lookup, 0:offset + 11:num <- copy 34 + 12:num <- copy 35 + 4:&:num <- copy 20/unsafe + 4:&:location/lookup <- get-location 1:&:point/lookup, 0:offset ] +mem: storing 11 in location 21 @@ -316,21 +316,21 @@ def main [ :(scenario wait_for_routine) def f1 [ # add a few routines to run - 1:number/routine <- start-running f2 - 2:number/routine <- start-running f3 - wait-for-routine 1:number/routine + 1:num/routine <- start-running f2 + 2:num/routine <- start-running f3 + wait-for-routine 1:num/routine # now wait for f2 to *complete* and modify location 13 before using its value - 20:number <- copy 13:number + 20:num <- copy 13:num ] def f2 [ - 10:number <- copy 0 # just padding + 10:num <- copy 0 # just padding switch # simulate a block; routine f1 shouldn't restart at this point - 13:number <- copy 34 + 13:num <- copy 34 ] def f3 [ # padding routine just to help simulate the block in f2 using 'switch' - 11:number <- copy 0 - 12:number <- copy 0 + 11:num <- copy 0 + 12:num <- copy 0 ] +schedule: f1 +run: waiting for routine 2 @@ -459,13 +459,13 @@ put(Recipe_ordinal,:(scenario wait_for_routine_to_block) def f1 [ - 1:number/routine <- start-running f2 - wait-for-routine-to-block 1:number/routine + 1:num/routine <- start-running f2 + wait-for-routine-to-block 1:num/routine # now wait for f2 to run and modify location 10 before using its value - 11:number <- copy 10:number + 11:num <- copy 10:num ] def f2 [ - 10:number <- copy 34 + 10:num <- copy 34 ] +schedule: f1 +run: waiting for routine 2 to block @@ -598,14 +598,14 @@ put(Recipe_ordinal,% Scheduling_interval = 1; def main [ local-scope - r:number/routine-id <- start-running f - x:number <- copy 0 # wait for f to be scheduled + r:num/routine-id <- start-running f + x:num <- copy 0 # wait for f to be scheduled # r is COMPLETED by this point restart r # should have no effect - x:number <- copy 0 # give f time to be scheduled (though it shouldn't be) + x:num <- copy 0 # give f time to be scheduled (though it shouldn't be) ] def f [ - 1:number/raw <- copy 1 + 1:num/raw <- copy 1 ] # shouldn't crash @@ -613,7 +613,7 @@ def f [ % Scheduling_interval = 1; def main [ local-scope - r:number/routine-id <- start-running f + r:num/routine-id <- start-running f wait-for-routine-to-block r # get past the block in f below restart r wait-for-routine-to-block r # should run f to completion @@ -622,15 +622,15 @@ def main [ def f [ current-routine-is-blocked # 8 instructions of padding, many more than 'main' above - 1:number <- add 1:number, 1 - 1:number <- add 1:number, 1 - 1:number <- add 1:number, 1 - 1:number <- add 1:number, 1 - 1:number <- add 1:number, 1 - 1:number <- add 1:number, 1 - 1:number <- add 1:number, 1 - 1:number <- add 1:number, 1 - 1:number <- add 1:number, 1 + 1:num <- add 1:num, 1 + 1:num <- add 1:num, 1 + 1:num <- add 1:num, 1 + 1:num <- add 1:num, 1 + 1:num <- add 1:num, 1 + 1:num <- add 1:num, 1 + 1:num <- add 1:num, 1 + 1:num <- add 1:num, 1 + 1:num <- add 1:num, 1 ] # make sure all of f ran +mem: storing 8 in location 1 -- cgit 1.4.1-2-gfad0