From 3e1349d29fa00db1fab3a811b60bc9d8de0355e4 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 30 Sep 2016 10:45:14 -0700 Subject: 3431 Improvements to syntax highlighting, particularly for Mu code in C++ files. --- html/073wait.cc.html | 58 +++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) (limited to 'html/073wait.cc.html') diff --git a/html/073wait.cc.html b/html/073wait.cc.html index 74c5ce2f..ffc27bb9 100644 --- a/html/073wait.cc.html +++ b/html/073wait.cc.html @@ -15,14 +15,16 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color * { font-size: 12pt; font-size: 1em; } .Constant { color: #00a0a0; } .cSpecial { color: #008000; } -.traceContains { color: #008000; } -.SalientComment { color: #00ffff; } +.muRecipe { color: #ff8700; } +.CommentedCode { color: #6c6c6c; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } .Special { color: #c00000; } -.Identifier { color: #fcb165; } +.traceContains { color: #008000; } .Normal { color: #eeeeee; background-color: #080808; padding-bottom: 1px; } -.CommentedCode { color: #6c6c6c; } +.muData { color: #ffff00; } +.Identifier { color: #fcb165; } +.SalientComment { color: #00ffff; } --> @@ -40,7 +42,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color //: operate. :(scenario wait_for_location) -def f1 [ +def f1 [ 10:num <- copy 34 start-running f2 20:location <- copy 10/unsafe @@ -48,7 +50,7 @@ def f1 [ # wait for f2 to run and reset location 1 30:num <- copy 10:num ] -def f2 [ +def f2 [ 10:location <- copy 0/unsafe ] +schedule: f1 @@ -175,10 +177,10 @@ put(Recipe_ordinal,//: containers within containers yet. :(scenario get_location) -def main [ +def main [ 12:num <- copy 34 13:num <- copy 35 - 15:location <- get-location 12:point, 1:offset + 15:location <- get-location 12:point, 1:offset ] +mem: storing 13 in location 15 @@ -258,63 +260,63 @@ put(Recipe_ordinal,:(scenario get_location_out_of_bounds) % Hide_errors = true; -def main [ +def main [ 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 + 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' :(scenario get_location_out_of_bounds_2) % Hide_errors = true; -def main [ +def main [ 12:num <- copy 34 13:num <- copy 35 14:num <- copy 36 - get-location 12:point-number/raw, -1:offset + get-location 12:point-number/raw, -1:offset ] +error: main: invalid offset -1 for 'point-number' :(scenario get_location_product_type_mismatch) % Hide_errors = true; -container boolbool [ +container boolbool [ x:bool y:bool ] -def main [ +def main [ 12:bool <- copy 1 13:bool <- copy 0 - 15:bool <- get-location 12:boolbool, 1:offset + 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 [ +def main [ 1:num <- copy 10 # 10 reserved for refcount 11:num <- copy 34 12:num <- copy 35 - 4:location <- get-location 1:&:point/lookup, 0:offset + 4:location <- get-location 1:&:point/lookup, 0:offset ] +mem: storing 11 in location 4 :(scenario get_location_indirect_2) -def main [ +def main [ 1:num <- copy 10 # 10 reserved for refcount 11:num <- copy 34 12:num <- copy 35 4:&:num <- copy 20/unsafe - 4:&:location/lookup <- get-location 1:&:point/lookup, 0:offset + 4:&:location/lookup <- get-location 1:&:point/lookup, 0:offset ] +mem: storing 11 in location 21 //: allow waiting on a routine to complete :(scenario wait_for_routine) -def f1 [ +def f1 [ # add a few routines to run 1:num/routine <- start-running f2 2:num/routine <- start-running f3 @@ -322,12 +324,12 @@ def f1 [ # now wait for f2 to *complete* and modify location 13 before using its value 20:num <- copy 13:num ] -def f2 [ +def f2 [ 10:num <- copy 0 # just padding switch # simulate a block; routine f1 shouldn't restart at this point 13:num <- copy 34 ] -def f3 [ +def f3 [ # padding routine just to help simulate the block in f2 using 'switch' 11:num <- copy 0 12:num <- copy 0 @@ -458,13 +460,13 @@ put(Recipe_ordinal,//: (just for tests; use wait_for_routine above wherever possible) :(scenario wait_for_routine_to_block) -def f1 [ +def f1 [ 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:num <- copy 10:num ] -def f2 [ +def f2 [ 10:num <- copy 34 ] +schedule: f1 @@ -596,7 +598,7 @@ put(Recipe_ordinal,:(scenario cannot_restart_completed_routine) % Scheduling_interval = 1; -def main [ +def main [ local-scope r:num/routine-id <- start-running f x:num <- copy 0 # wait for f to be scheduled @@ -604,14 +606,14 @@ def main [ restart r # should have no effect x:num <- copy 0 # give f time to be scheduled (though it shouldn't be) ] -def f [ +def f [ 1:num/raw <- copy 1 ] # shouldn't crash :(scenario restart_blocked_routine) % Scheduling_interval = 1; -def main [ +def main [ local-scope r:num/routine-id <- start-running f wait-for-routine-to-block r # get past the block in f below @@ -619,7 +621,7 @@ def main [ wait-for-routine-to-block r # should run f to completion ] # function with one block -def f [ +def f [ current-routine-is-blocked # 8 instructions of padding, many more than 'main' above 1:num <- add 1:num, 1 -- cgit 1.4.1-2-gfad0