summary refs log tree commit diff stats
path: root/go.mod
diff options
context:
space:
mode:
Diffstat (limited to 'go.mod')
-rw-r--r--go.mod2
1 files changed, 1 insertions, 1 deletions
diff --git a/go.mod b/go.mod
index 783f53a..6372e97 100644
--- a/go.mod
+++ b/go.mod
@@ -2,9 +2,9 @@ module git.sr.ht/~sircmpwn/aerc
 
 require (
 	git.sr.ht/~sircmpwn/getopt v0.0.0-20190214165041-9a4f886f9fc7
-	git.sr.ht/~sircmpwn/go-libvterm v0.0.0-20190526181735-cfa1120f7fc7
 	git.sr.ht/~sircmpwn/pty v0.0.0-20190330154901-3a43678975a9
 	github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
+	github.com/ddevault/go-libvterm v0.0.0-20190526191137-d855ab13e5c4
 	github.com/emersion/go-imap v1.0.0-beta.5
 	github.com/emersion/go-imap-idle v0.0.0-20190519112320-2704abd7050e
 	github.com/emersion/go-message v0.10.3
13f2'>^
dcfca05e ^
a767dbd3 ^

f2818edc ^


88be3dbc ^
f2818edc ^



6f5d7864 ^
f2818edc ^
6f5d7864 ^
57699011 ^
f2818edc ^
88be3dbc ^
f2818edc ^
100157d1 ^




6f5d7864 ^


201b2e6c ^
1848b18f ^

201b2e6c ^

201b2e6c ^

6673e1fc ^
201b2e6c ^





dcfca05e ^
a767dbd3 ^

201b2e6c ^


88be3dbc ^
201b2e6c ^



6f5d7864 ^
201b2e6c ^

6f5d7864 ^
57699011 ^
201b2e6c ^
88be3dbc ^
201b2e6c ^



6f5d7864 ^
201b2e6c ^
6f5d7864 ^
57699011 ^
201b2e6c ^
1848b18f ^

201b2e6c ^

201b2e6c ^

6673e1fc ^
201b2e6c ^





dcfca05e ^
a767dbd3 ^

201b2e6c ^


88be3dbc ^
201b2e6c ^



6f5d7864 ^
201b2e6c ^

6f5d7864 ^
57699011 ^
201b2e6c ^
88be3dbc ^
201b2e6c ^



6f5d7864 ^
201b2e6c ^

6f5d7864 ^
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
                   
 
                                             
     

                                        

                                                
                                                                                   

                                                                      


        
                                      



                             
                        
                       
                        
                             
 
                         
             




                               


                        
 

                                             

                                        

                                                
                                                                                 





                                                
                                                                                  

                                                                      


        
                   



                              
                        

                              
                        
                             
 
                               



                               
                        
                          
                        
                               
 

                                             

                                           

                                                
                                                                                 





                                                
                                                                                  

                                                                      


        
                       



                                
                        

                              
                        
                             
 
                                   



                                  
                        

                              
                        
                               
//: Jump primitives

:(before "End Primitive Recipe Declarations")
JUMP,
:(before "End Primitive Recipe Numbers")
Recipe_number["jump"] = JUMP;
:(before "End Primitive Recipe Implementations")
case JUMP: {
  trace("run") << "ingredient 0 is " << current_instruction().ingredients[0].value;
  current_step_index() += current_instruction().ingredients[0].value;
  trace("run") << "jumping to instruction " << current_step_index()+1;
  break;
}

:(scenario jump_can_skip_instructions)
recipe main [
  jump 1:offset
  1:integer <- copy 1:literal
]
+run: instruction main/0
+run: ingredient 0 is 1
-run: instruction main/1
-mem: storing 1 in location 1

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

:(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: {
  vector<long long int> arg0 = read_memory(current_instruction().ingredients[0]);
  assert(arg0.size() == 1);
  trace("run") << "ingredient 0 is " << arg0[0];
  if (!arg0[0]) {
    trace("run") << "jump-if fell through";
    break;
  }
  trace("run") << "ingredient 1 is " << current_instruction().ingredients[1].name;
  current_step_index() += current_instruction().ingredients[1].value;
  trace("run") << "jumping to instruction " << current_step_index()+1;
  break;
}

:(scenario jump_if)
recipe main [
  jump-if 999:literal 1:offset
  1:integer <- copy 1:literal
]
+run: instruction main/0
+run: ingredient 1 is 1
+run: jumping to instruction 2
-run: instruction main/1
-mem: storing 1 in location 1

:(scenario jump_if_fallthrough)
recipe main [
  jump-if 0:literal 1:offset
  123:integer <- copy 1:literal
]
+run: instruction main/0
+run: jump-if fell through
+run: instruction main/1
+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: {
  vector<long long int> arg0 = read_memory(current_instruction().ingredients[0]);
  assert(arg0.size() == 1);
  trace("run") << "ingredient 0 is " << arg0[0];
  if (arg0[0]) {
    trace("run") << "jump-unless fell through";
    break;
  }
  trace("run") << "ingredient 1 is " << current_instruction().ingredients[1].name;
  current_step_index() += current_instruction().ingredients[1].value;
  trace("run") << "jumping to instruction " << current_step_index()+1;
  break;
}

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

:(scenario jump_unless_fallthrough)
recipe main [
  jump-unless 999:literal 1:offset
  123:integer <- copy 1:literal
]
+run: instruction main/0
+run: ingredient 0 is 999
+run: jump-unless fell through
+run: instruction main/1
+mem: storing 1 in location 123