about summary refs log tree commit diff stats
path: root/html/fork.mu.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-23 19:45:36 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-23 19:56:28 -0700
commitf918675c8b11adb80a83000a3a984e4ff3bdcf1b (patch)
tree2472316e3bf536e0bad76751c5f3504d029b8215 /html/fork.mu.html
parentaf7349d50c40e0604c9bb1e9a50aa1c3c0d407d8 (diff)
downloadmu-f918675c8b11adb80a83000a3a984e4ff3bdcf1b.tar.gz
3569
Update syntax highlighting to not color numeric locations like literals.
Diffstat (limited to 'html/fork.mu.html')
-rw-r--r--html/fork.mu.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/html/fork.mu.html b/html/fork.mu.html
index b1565526..3008fbdc 100644
--- a/html/fork.mu.html
+++ b/html/fork.mu.html
@@ -34,14 +34,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 <span class="muRecipe">def</span> main [
   start-running thread2
   <span class="Delimiter">{</span>
-    $print <span class="Constant">34</span>
+    $print<span class="Constant"> 34</span>
     <span class="muControl">loop</span>
   <span class="Delimiter">}</span>
 ]
 
 <span class="muRecipe">def</span> thread2 [
   <span class="Delimiter">{</span>
-    $print <span class="Constant">35</span>
+    $print<span class="Constant"> 35</span>
     <span class="muControl">loop</span>
   <span class="Delimiter">}</span>
 ]
6d496a4b93266c78d6332'>^
827898fc ^
7feea75b ^
f2818edc ^


6f8f9fb5 ^


f2818edc ^
88be3dbc ^
f2818edc ^
100157d1 ^
d7494165 ^
100157d1 ^


d7494165 ^


201b2e6c ^
1848b18f ^

201b2e6c ^

201b2e6c ^

dc1323e9 ^
ac0e9db5 ^

0487a30e ^
7feea75b ^
201b2e6c ^

ac0e9db5 ^
827898fc ^
7feea75b ^
201b2e6c ^


88be3dbc ^
201b2e6c ^
01caf342 ^
d7494165 ^
201b2e6c ^
d7494165 ^
201b2e6c ^
d7494165 ^

201b2e6c ^
88be3dbc ^
201b2e6c ^
01caf342 ^
5497090a ^
201b2e6c ^
d7494165 ^
201b2e6c ^
d7494165 ^
57699011 ^
201b2e6c ^
1848b18f ^

201b2e6c ^

201b2e6c ^

dc1323e9 ^
ac0e9db5 ^

0487a30e ^
7feea75b ^
201b2e6c ^

ac0e9db5 ^
827898fc ^
7feea75b ^
201b2e6c ^


88be3dbc ^
201b2e6c ^
01caf342 ^
d7494165 ^
201b2e6c ^
d7494165 ^
201b2e6c ^
d7494165 ^

201b2e6c ^
88be3dbc ^
201b2e6c ^
01caf342 ^
5497090a ^
201b2e6c ^
d7494165 ^
201b2e6c ^
d7494165 ^
57699011 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
                   
 




                                      

                                

                             
                                             
     

                                        

                                                
                                                              

                                    
                                                 
                                                                                             


        


                                          
 
                         
             
                       
                               


                               


                    
 

                                             

                                        

                                                
                                                              

                                    
                                 
                                                                   

          
                                    
                                                 
                                                                                             


        
                   
             
                               
                              
 
                                   
                              

                                
 
                               
             
                             
                              
 
                                 
                          
                                  
                               
 

                                             

                                           

                                                
                                                              

                                    
                                
                                                                       

          
                                    
                                                 
                                                                                             


        
                       
             
                                 
                              
 
                                     
                              

                                  
 
                                   
             
                                   
                              
 
                                       
                              
                                  
                               
//: Jump primitives

:(scenario jump_can_skip_instructions)
recipe main [
  jump 1:offset
  1:number <- copy 1:literal
]
+run: jump 1:offset
-run: 1:number <- copy 1:literal
-mem: storing 1 in location 1

:(before "End Primitive Recipe Declarations")
JUMP,
:(before "End Primitive Recipe Numbers")
Recipe_number["jump"] = JUMP;
:(before "End Primitive Recipe Implementations")
case JUMP: {
  assert(current_instruction().ingredients.at(0).initialized);
  assert(SIZE(ingredients) == 1);
  assert(scalar(ingredients.at(0)));
  instruction_counter += ingredients.at(0).at(0);
  trace(Primitive_recipe_depth, "run") << "jumping to instruction " << instruction_counter+1;
  break;
}

//: special type to designate jump targets
:(before "End Mu Types Initialization")
Type_number["offset"] = 0;

:(scenario jump_backward)
recipe main [
  jump 1:offset  # 0 -+
  jump 3:offset  #    |   +-+ 1
                 #   \/  /\ |
  jump -2:offset #  2 +-->+ |
]                #         \/ 3
+run: jump 1:offset
+run: jump -2:offset
+run: jump 3:offset

:(before "End Primitive Recipe Declarations")
JUMP_IF,
:(before "End Primitive Recipe Numbers")
Recipe_number["jump-if"] = JUMP_IF;
:(before "End Primitive Recipe Implementations")
case JUMP_IF: {
  assert(current_instruction().ingredients.at(1).initialized);
  assert(SIZE(ingredients) == 2);
  assert(scalar(ingredients.at(0)));
  if (!ingredients.at(0).at(0)) {
    trace(Primitive_recipe_depth, "run") << "jump-if fell through";
    break;
  }
  assert(scalar(ingredients.at(1)));
  instruction_counter += ingredients.at(1).at(0);
  trace(Primitive_recipe_depth, "run") << "jumping to instruction " << instruction_counter+1;
  break;
}

:(scenario jump_if)
recipe main [
  jump-if 999:literal, 1:offset
  123:number <- copy 1:literal
]
+run: jump-if 999:literal, 1:offset
+run: jumping to instruction 2
-run: 1:number <- copy 1:literal
-mem: storing 1 in location 123

:(scenario jump_if_fallthrough)
recipe main [
  jump-if 0:literal, 1:offset
  123:number <- copy 1:literal
]
+run: jump-if 0:literal, 1:offset
+run: jump-if fell through
+run: 123:number <- copy 1:literal
+mem: storing 1 in location 123

:(before "End Primitive Recipe Declarations")
JUMP_UNLESS,
:(before "End Primitive Recipe Numbers")
Recipe_number["jump-unless"] = JUMP_UNLESS;
:(before "End Primitive Recipe Implementations")
case JUMP_UNLESS: {
  assert(current_instruction().ingredients.at(1).initialized);
  assert(SIZE(ingredients) == 2);
  assert(scalar(ingredients.at(0)));
  if (ingredients.at(0).at(0)) {
    trace(Primitive_recipe_depth, "run") << "jump-unless fell through";
    break;
  }
  assert(scalar(ingredients.at(1)));
  instruction_counter += ingredients.at(1).at(0);
  trace(Primitive_recipe_depth, "run") << "jumping to instruction " << instruction_counter+1;
  break;
}

:(scenario jump_unless)
recipe main [
  jump-unless 0:literal, 1:offset
  123:number <- copy 1:literal
]
+run: jump-unless 0:literal, 1:offset
+run: jumping to instruction 2
-run: 123:number <- copy 1:literal
-mem: storing 1 in location 123

:(scenario jump_unless_fallthrough)
recipe main [
  jump-unless 999:literal, 1:offset
  123:number <- copy 1:literal
]
+run: jump-unless 999:literal, 1:offset
+run: jump-unless fell through
+run: 123:number <- copy 1:literal
+mem: storing 1 in location 123