diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-30 19:30:33 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-30 19:37:02 -0700 |
commit | 4bbd3ded0b767ae0919551776e4c17189140e735 (patch) | |
tree | 29300d13dc2b869378fbde7f5456b1cfb519482d /html/030container.cc.html | |
parent | 06f3cebe3eb627e18910b6394bfde88c806c8f91 (diff) | |
download | mu-4bbd3ded0b767ae0919551776e4c17189140e735.tar.gz |
1517
Diffstat (limited to 'html/030container.cc.html')
-rw-r--r-- | html/030container.cc.html | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/html/030container.cc.html b/html/030container.cc.html index 4da2e138..5e7b1ff1 100644 --- a/html/030container.cc.html +++ b/html/030container.cc.html @@ -10,19 +10,19 @@ <meta name="colorscheme" content="minimal"> <style type="text/css"> <!-- -pre { white-space: pre-wrap; font-family: monospace; color: #d0d0d0; background-color: #000000; } -body { font-family: monospace; color: #d0d0d0; background-color: #000000; } +pre { white-space: pre-wrap; font-family: monospace; color: #d0d0d0; background-color: #080808; } +body { font-family: monospace; color: #d0d0d0; background-color: #080808; } * { font-size: 1em; } -.traceAbsent { color: #c00000; } -.CommentedCode { color: #6c6c6c; } +.traceContains { color: #008000; } +.cSpecial { color: #008000; } .Constant { color: #008080; } +.SalientComment { color: #00ffff; } +.traceAbsent { color: #c00000; } .Comment { color: #8080ff; } .Delimiter { color: #c000c0; } .Special { color: #ff6060; } .Identifier { color: #008080; } -.SalientComment { color: #00ffff; } -.cSpecial { color: #008000; } -.traceContains { color: #008000; } +.CommentedCode { color: #6c6c6c; } --> </style> @@ -50,11 +50,14 @@ Type[point]<span class="Delimiter">.</span>elements<span class="Delimiter">.</sp <span class="Comment">//: Containers can be copied around with a single instruction just like</span> <span class="Comment">//: numbers, no matter how large they are.</span> +<span class="Comment">//: Tests in this layer often explicitly setup memory before reading it as a</span> +<span class="Comment">//: container. Don't do this in general. I'm tagging exceptions with /raw to</span> +<span class="Comment">//: avoid warnings.</span> <span class="Delimiter">:(scenario copy_multiple_locations)</span> recipe main [ <span class="Constant">1</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span>:literal - <span class="Constant">3</span>:point<span class="Special"> <- </span>copy <span class="Constant">1</span>:point + <span class="Constant">3</span>:point<span class="Special"> <- </span>copy <span class="Constant">1</span>:point/<span class="Special">raw</span> <span class="Comment"># unsafe</span> ] <span class="traceContains">+mem: storing 34 in location 3</span> <span class="traceContains">+mem: storing 35 in location 4</span> @@ -78,7 +81,7 @@ recipe main [ <span class="Constant">12</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Constant">13</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span>:literal <span class="Constant">14</span>:number<span class="Special"> <- </span>copy <span class="Constant">36</span>:literal - <span class="Constant">15</span>:point-number<span class="Special"> <- </span>copy <span class="Constant">12</span>:point-number + <span class="Constant">15</span>:point-number<span class="Special"> <- </span>copy <span class="Constant">12</span>:point-number/<span class="Special">raw</span> <span class="Comment"># unsafe</span> ] <span class="traceContains">+mem: storing 36 in location 17</span> @@ -93,7 +96,7 @@ recipe main [ <span class="Constant">4</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Comment"># second</span> <span class="Constant">5</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span>:literal <span class="Constant">6</span>:number<span class="Special"> <- </span>copy <span class="Constant">36</span>:literal - <span class="Constant">7</span>:boolean<span class="Special"> <- </span>equal <span class="Constant">1</span>:point-number<span class="Delimiter">,</span> <span class="Constant">4</span>:point-number + <span class="Constant">7</span>:boolean<span class="Special"> <- </span>equal <span class="Constant">1</span>:point-number/<span class="Special">raw</span><span class="Delimiter">,</span> <span class="Constant">4</span>:point-number/<span class="Special">raw</span> <span class="Comment"># unsafe</span> ] <span class="traceContains">+mem: storing 1 in location 7</span> @@ -105,7 +108,7 @@ recipe main [ <span class="Constant">4</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Comment"># second</span> <span class="Constant">5</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span>:literal <span class="Constant">6</span>:number<span class="Special"> <- </span>copy <span class="Constant">37</span>:literal <span class="Comment"># different</span> - <span class="Constant">7</span>:boolean<span class="Special"> <- </span>equal <span class="Constant">1</span>:point-number<span class="Delimiter">,</span> <span class="Constant">4</span>:point-number + <span class="Constant">7</span>:boolean<span class="Special"> <- </span>equal <span class="Constant">1</span>:point-number/<span class="Special">raw</span><span class="Delimiter">,</span> <span class="Constant">4</span>:point-number/<span class="Special">raw</span> <span class="Comment"># unsafe</span> ] <span class="traceContains">+mem: storing 0 in location 7</span> @@ -127,7 +130,7 @@ if <span class="Delimiter">(</span>t<span class="Delimiter">.</span>kind == cont recipe main [ <span class="Constant">12</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Constant">13</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span>:literal - <span class="Constant">15</span>:number<span class="Special"> <- </span>get <span class="Constant">12</span>:point<span class="Delimiter">,</span> <span class="Constant">1</span>:offset + <span class="Constant">15</span>:number<span class="Special"> <- </span>get <span class="Constant">12</span>:point/<span class="Special">raw</span><span class="Delimiter">,</span> <span class="Constant">1</span>:offset <span class="Comment"># unsafe</span> ] <span class="traceContains">+mem: storing 35 in location 15</span> @@ -165,7 +168,7 @@ recipe main [ <span class="Constant">12</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Constant">13</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span>:literal <span class="Constant">14</span>:number<span class="Special"> <- </span>copy <span class="Constant">36</span>:literal - <span class="Constant">15</span>:number<span class="Special"> <- </span>get <span class="Constant">12</span>:point-number<span class="Delimiter">,</span> <span class="Constant">1</span>:offset + <span class="Constant">15</span>:number<span class="Special"> <- </span>get <span class="Constant">12</span>:point-number/<span class="Special">raw</span><span class="Delimiter">,</span> <span class="Constant">1</span>:offset <span class="Comment"># unsafe</span> ] <span class="traceContains">+mem: storing 36 in location 15</span> @@ -175,7 +178,7 @@ recipe main [ recipe main [ <span class="Constant">12</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Constant">13</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span>:literal - <span class="Constant">15</span>:address:number<span class="Special"> <- </span>get-address <span class="Constant">12</span>:point<span class="Delimiter">,</span> <span class="Constant">1</span>:offset + <span class="Constant">15</span>:address:number<span class="Special"> <- </span>get-address <span class="Constant">12</span>:point/<span class="Special">raw</span><span class="Delimiter">,</span> <span class="Constant">1</span>:offset <span class="Comment"># unsafe</span> ] <span class="traceContains">+mem: storing 13 in location 15</span> @@ -372,6 +375,18 @@ container foo [ ] <span class="traceContains">+warn: unknown type for field y in foo</span> +<span class="Delimiter">:(scenario read_container_with_bracket_in_comment)</span> +container foo [ + x:number + <span class="Comment"># ']' in comment</span> + y:number +] +<span class="traceContains">+parse: reading container foo</span> +<span class="traceContains">+parse: element name: x</span> +<span class="traceContains">+parse: type: 1</span> +<span class="traceContains">+parse: element name: y</span> +<span class="traceContains">+parse: type: 1</span> + <span class="Delimiter">:(before "End Load Sanity Checks")</span> check_container_field_types<span class="Delimiter">();</span> |