about summary refs log tree commit diff stats
path: root/html/073wait.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-30 10:45:14 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-30 10:45:14 -0700
commit3e1349d29fa00db1fab3a811b60bc9d8de0355e4 (patch)
tree93afedf36b8b211432a458ca9c0c7bfaf76e2425 /html/073wait.cc.html
parent6c69569a4c4ca3a23635d4d7a40f0fe557194619 (diff)
downloadmu-3e1349d29fa00db1fab3a811b60bc9d8de0355e4.tar.gz
3431
Improvements to syntax highlighting, particularly for Mu code in C++
files.
Diffstat (limited to 'html/073wait.cc.html')
-rw-r--r--html/073wait.cc.html58
1 files changed, 30 insertions, 28 deletions
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; }
 -->
 </style>
 
@@ -40,7 +42,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="Comment">//: operate.</span>
 
 <span class="Delimiter">:(scenario wait_for_location)</span>
-def f1 [
+<span class="muRecipe">def</span> f1 [
   <span class="Constant">10</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>
   start-running f2
   <span class="Constant">20</span>:location<span class="Special"> &lt;- </span>copy <span class="Constant">10</span>/unsafe
@@ -48,7 +50,7 @@ def f1 [
   <span class="Comment"># wait for f2 to run and reset location 1</span>
   <span class="Constant">30</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">10</span>:num
 ]
-def f2 [
+<span class="muRecipe">def</span> f2 [
   <span class="Constant">10</span>:location<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>/unsafe
 ]
 <span class="traceContains">+schedule: f1</span>
@@ -175,10 +177,10 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span
 <span class="Comment">//: containers within containers yet.</span>
 
 <span class="Delimiter">:(scenario get_location)</span>
-def main [
+<span class="muRecipe">def</span> main [
   <span class="Constant">12</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>
   <span class="Constant">13</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">35</span>
-  <span class="Constant">15</span>:location<span class="Special"> &lt;- </span>get-location <span class="Constant">12</span>:point<span class="Delimiter">,</span> <span class="Constant">1</span>:offset
+  <span class="Constant">15</span>:location<span class="Special"> &lt;- </span>get-location <span class="Constant">12</span>:point<span class="Delimiter">,</span> <span class="Constant">1:offset</span>
 ]
 <span class="traceContains">+mem: storing 13 in location 15</span>
 
@@ -258,63 +260,63 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span
 
 <span class="Delimiter">:(scenario get_location_out_of_bounds)</span>
 <span class="Special">% Hide_errors = true;</span>
-def main [
+<span class="muRecipe">def</span> main [
   <span class="Constant">12</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>
   <span class="Constant">13</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">35</span>
   <span class="Constant">14</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">36</span>
-  get-location <span class="Constant">12</span>:point-number/<span class="Special">raw</span><span class="Delimiter">,</span> <span class="Constant">2</span>:offset  <span class="Comment"># point-number occupies 3 locations but has only 2 fields; out of bounds</span>
+  get-location <span class="Constant">12</span>:point-number/<span class="Special">raw</span><span class="Delimiter">,</span> <span class="Constant">2:offset</span>  <span class="Comment"># point-number occupies 3 locations but has only 2 fields; out of bounds</span>
 ]
 <span class="traceContains">+error: main: invalid offset 2 for 'point-number'</span>
 
 <span class="Delimiter">:(scenario get_location_out_of_bounds_2)</span>
 <span class="Special">% Hide_errors = true;</span>
-def main [
+<span class="muRecipe">def</span> main [
   <span class="Constant">12</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>
   <span class="Constant">13</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">35</span>
   <span class="Constant">14</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">36</span>
-  get-location <span class="Constant">12</span>:point-number/<span class="Special">raw</span><span class="Delimiter">,</span> -<span class="Constant">1</span>:offset
+  get-location <span class="Constant">12</span>:point-number/<span class="Special">raw</span><span class="Delimiter">,</span> <span class="Constant">-1:offset</span>
 ]
 <span class="traceContains">+error: main: invalid offset -1 for 'point-number'</span>
 
 <span class="Delimiter">:(scenario get_location_product_type_mismatch)</span>
 <span class="Special">% Hide_errors = true;</span>
-container boolbool [
+<span class="muData">container</span> boolbool [
   <span class="Normal">x</span>:<span class="Normal">bool</span>
   <span class="Normal">y</span>:<span class="Normal">bool</span>
 ]
-def main [
+<span class="muRecipe">def</span> main [
   <span class="Constant">12</span>:<span class="Normal">bool</span><span class="Special"> &lt;- </span>copy <span class="Constant">1</span>
   <span class="Constant">13</span>:<span class="Normal">bool</span><span class="Special"> &lt;- </span>copy <span class="Constant">0</span>
-  <span class="Constant">15</span>:<span class="Normal">bool</span><span class="Special"> &lt;- </span>get-location <span class="Constant">12</span>:boolbool<span class="Delimiter">,</span> <span class="Constant">1</span>:offset
+  <span class="Constant">15</span>:<span class="Normal">bool</span><span class="Special"> &lt;- </span>get-location <span class="Constant">12</span>:boolbool<span class="Delimiter">,</span> <span class="Constant">1:offset</span>
 ]
 <span class="traceContains">+error: main: 'get-location 12:boolbool, 1:offset' should write to type location but '15' has type 'boolean'</span>
 
 <span class="Delimiter">:(scenario get_location_indirect)</span>
 <span class="Comment"># 'get-location' can read from container address</span>
-def main [
+<span class="muRecipe">def</span> main [
   <span class="Constant">1</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">10</span>
   <span class="Comment"># 10 reserved for refcount</span>
   <span class="Constant">11</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>
   <span class="Constant">12</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">35</span>
-  <span class="Constant">4</span>:location<span class="Special"> &lt;- </span>get-location <span class="Constant">1</span>:&amp;:point/lookup<span class="Delimiter">,</span> <span class="Constant">0</span>:offset
+  <span class="Constant">4</span>:location<span class="Special"> &lt;- </span>get-location <span class="Constant">1</span>:&amp;:point/lookup<span class="Delimiter">,</span> <span class="Constant">0:offset</span>
 ]
 <span class="traceContains">+mem: storing 11 in location 4</span>
 
 <span class="Delimiter">:(scenario get_location_indirect_2)</span>
-def main [
+<span class="muRecipe">def</span> main [
   <span class="Constant">1</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">10</span>
   <span class="Comment"># 10 reserved for refcount</span>
   <span class="Constant">11</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>
   <span class="Constant">12</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">35</span>
   <span class="Constant">4</span>:&amp;:num<span class="Special"> &lt;- </span>copy <span class="Constant">20</span>/unsafe
-  <span class="Constant">4</span>:&amp;:location/lookup<span class="Special"> &lt;- </span>get-location <span class="Constant">1</span>:&amp;:point/lookup<span class="Delimiter">,</span> <span class="Constant">0</span>:offset
+  <span class="Constant">4</span>:&amp;:location/lookup<span class="Special"> &lt;- </span>get-location <span class="Constant">1</span>:&amp;:point/lookup<span class="Delimiter">,</span> <span class="Constant">0:offset</span>
 ]
 <span class="traceContains">+mem: storing 11 in location 21</span>
 
 <span class="Comment">//: allow waiting on a routine to complete</span>
 
 <span class="Delimiter">:(scenario wait_for_routine)</span>
-def f1 [
+<span class="muRecipe">def</span> f1 [
   <span class="Comment"># add a few routines to run</span>
   <span class="Constant">1</span>:num/routine<span class="Special"> &lt;- </span>start-running f2
   <span class="Constant">2</span>:num/routine<span class="Special"> &lt;- </span>start-running f3
@@ -322,12 +324,12 @@ def f1 [
   <span class="Comment"># now wait for f2 to *complete* and modify location 13 before using its value</span>
   <span class="Constant">20</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">13</span>:num
 ]
-def f2 [
+<span class="muRecipe">def</span> f2 [
   <span class="Constant">10</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>  <span class="Comment"># just padding</span>
   <span class="Normal">switch</span>  <span class="Comment"># simulate a block; routine f1 shouldn't restart at this point</span>
   <span class="Constant">13</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>
 ]
-def f3 [
+<span class="muRecipe">def</span> f3 [
   <span class="Comment"># padding routine just to help simulate the block in f2 using 'switch'</span>
   <span class="Constant">11</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>
   <span class="Constant">12</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>
@@ -458,13 +460,13 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span
 <span class="Comment">//: (just for tests; use wait_for_routine above wherever possible)</span>
 
 <span class="Delimiter">:(scenario wait_for_routine_to_block)</span>
-def f1 [
+<span class="muRecipe">def</span> f1 [
   <span class="Constant">1</span>:num/routine<span class="Special"> &lt;- </span>start-running f2
   wait-<span class="Normal">for</span>-routine-to-block <span class="Constant">1</span>:num/routine
   <span class="Comment"># now wait for f2 to run and modify location 10 before using its value</span>
   <span class="Constant">11</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">10</span>:num
 ]
-def f2 [
+<span class="muRecipe">def</span> f2 [
   <span class="Constant">10</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">34</span>
 ]
 <span class="traceContains">+schedule: f1</span>
@@ -596,7 +598,7 @@ put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span
 
 <span class="Delimiter">:(scenario cannot_restart_completed_routine)</span>
 <span class="Special">% Scheduling_interval = 1;</span>
-def main [
+<span class="muRecipe">def</span> main [
   local-scope
   <span class="Normal">r</span>:num/routine-id<span class="Special"> &lt;- </span>start-running f
   <span class="Normal">x</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>  <span class="Comment"># wait for f to be scheduled</span>
@@ -604,14 +606,14 @@ def main [
   restart r  <span class="Comment"># should have no effect</span>
   <span class="Normal">x</span>:num<span class="Special"> &lt;- </span>copy <span class="Constant">0</span>  <span class="Comment"># give f time to be scheduled (though it shouldn't be)</span>
 ]
-def f [
+<span class="muRecipe">def</span> f [
   <span class="Constant">1</span>:num/<span class="Special">raw &lt;- </span>copy <span class="Constant">1</span>
 ]
 <span class="Comment"># shouldn't crash</span>
 
 <span class="Delimiter">:(scenario restart_blocked_routine)</span>
 <span class="Special">% Scheduling_interval = 1;</span>
-def main [
+<span class="muRecipe">def</span> main [
   local-scope
   <span class="Normal">r</span>:num/routine-id<span class="Special"> &lt;- </span>start-running f
   wait-<span class="Normal">for</span>-routine-to-block r  <span class="Comment"># get past the block in f below</span>
@@ -619,7 +621,7 @@ def main [
   wait-<span class="Normal">for</span>-routine-to-block r  <span class="Comment"># should run f to completion</span>
 ]
 <span class="Comment"># function with one block</span>
-def f [
+<span class="muRecipe">def</span> f [
   current-routine-is-blocked
   <span class="Comment"># 8 instructions of padding, many more than 'main' above</span>
   <span class="Constant">1</span>:num<span class="Special"> &lt;- </span>add <span class="Constant">1</span>:num<span class="Delimiter">,</span> <span class="Constant">1</span>