diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-28 14:33:22 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-28 14:33:22 -0700 |
commit | bc6436927640603675e2e700007f53c5ab213869 (patch) | |
tree | e8f76a871ac4118223e03015f32e6bd687a7bd49 /041jump_label.cc | |
parent | aa0888459fc2ca41b0ad6bef5bfa72223ca33945 (diff) | |
download | mu-bc6436927640603675e2e700007f53c5ab213869.tar.gz |
1868 - start using naked literals everywhere
First step to reducing typing burden. Next step: inferring types.
Diffstat (limited to '041jump_label.cc')
-rw-r--r-- | 041jump_label.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/041jump_label.cc b/041jump_label.cc index a24970d5..00a547e2 100644 --- a/041jump_label.cc +++ b/041jump_label.cc @@ -5,7 +5,7 @@ :(scenario jump_to_label) recipe main [ jump +target:label - 1:number <- copy 0:literal + 1:number <- copy 0 +target ] -mem: storing 0 in location 1 @@ -62,7 +62,7 @@ recipe main [ { { break +target:label - 1:number <- copy 0:literal + 1:number <- copy 0 } } +target @@ -73,8 +73,8 @@ recipe main [ recipe main [ { { - jump-if 1:literal, +target:label - 1:number <- copy 0:literal + jump-if 1, +target:label + 1:number <- copy 0 } } +target @@ -85,8 +85,8 @@ recipe main [ recipe main [ { { - loop-unless 0:literal, +target:label # loop/break with a label don't care about braces - 1:number <- copy 0:literal + loop-unless 0, +target:label # loop/break with a label don't care about braces + 1:number <- copy 0 } } +target @@ -96,13 +96,13 @@ recipe main [ :(scenario jump_runs_code_after_label) recipe main [ # first a few lines of padding to exercise the offset computation - 1:number <- copy 0:literal - 2:number <- copy 0:literal - 3:number <- copy 0:literal + 1:number <- copy 0 + 2:number <- copy 0 + 3:number <- copy 0 jump +target:label - 4:number <- copy 0:literal + 4:number <- copy 0 +target - 5:number <- copy 0:literal + 5:number <- copy 0 ] +mem: storing 0 in location 5 -mem: storing 0 in location 4 |