AssignmentsInBinaryExpression.golden 5.88 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#
# Autogenerated by generate-bytecode-expectations.
#

---
wrap: yes

---
snippet: "
  var x = 0, y = 1;
  return (x = 2, y = 3, x = 4, y = 5);
"
frame size: 2
parameter count: 1
bytecode array length: 25
bytecodes: [
17 18
  /*   30 E> */ B(StackCheck),
  /*   42 S> */ B(LdaZero),
19
                B(Star), R(0),
20
  /*   49 S> */ B(LdaSmi), I8(1),
21
                B(Star), R(1),
22
  /*   52 S> */ B(LdaSmi), I8(2),
23
                B(Star), R(0),
24
                B(LdaSmi), I8(3),
25
                B(Star), R(1),
26
                B(LdaSmi), I8(4),
27
                B(Star), R(0),
28
                B(LdaSmi), I8(5),
29
                B(Star), R(1),
30
  /*   88 S> */ B(Return),
31 32 33 34 35 36 37 38 39 40 41 42 43 44
]
constant pool: [
]
handlers: [
]

---
snippet: "
  var x = 55;
  var y = (x = 100);
  return y;
"
frame size: 2
parameter count: 1
45
bytecode array length: 12
46
bytecodes: [
47
  /*   30 E> */ B(StackCheck),
48
  /*   42 S> */ B(LdaSmi), I8(55),
49
                B(Star), R(0),
50
  /*   54 S> */ B(LdaSmi), I8(100),
51
                B(Star), R(0),
52
                B(Star), R(1),
53
  /*   74 S> */ B(Return),
54 55 56 57 58 59 60 61 62 63 64 65
]
constant pool: [
]
handlers: [
]

---
snippet: "
  var x = 55;
  x = x + (x = 100) + (x = 101);
  return x;
"
66
frame size: 2
67
parameter count: 1
68
bytecode array length: 27
69
bytecodes: [
70
  /*   30 E> */ B(StackCheck),
71
  /*   42 S> */ B(LdaSmi), I8(55),
72
                B(Star), R(0),
73
  /*   46 S> */ B(LdaSmi), I8(100),
74
                B(Mov), R(0), R(1),
75
                B(Star), R(0),
76
  /*   52 E> */ B(Add), R(1), U8(0),
77
                B(Star), R(1),
78
                B(LdaSmi), I8(101),
79
                B(Star), R(0),
80
  /*   64 E> */ B(Add), R(1), U8(1),
81
                B(Star), R(0),
82
  /*   86 S> */ B(Return),
83 84 85 86 87 88 89 90 91 92 93 94 95
]
constant pool: [
]
handlers: [
]

---
snippet: "
  var x = 55;
  x = (x = 56) - x + (x = 57);
  x++;
  return x;
"
96
frame size: 2
97
parameter count: 1
98
bytecode array length: 28
99
bytecodes: [
100
  /*   30 E> */ B(StackCheck),
101
  /*   42 S> */ B(LdaSmi), I8(55),
102
                B(Star), R(0),
103
  /*   46 S> */ B(LdaSmi), I8(56),
104
                B(Star), R(0),
105
  /*   59 E> */ B(Sub), R(0), U8(1),
106
                B(Star), R(1),
107
                B(LdaSmi), I8(57),
108
                B(Star), R(0),
109
  /*   63 E> */ B(Add), R(1), U8(0),
110
                B(Star), R(0),
111
  /*   75 S> */ B(Inc), U8(2),
112
                B(Star), R(0),
113
  /*   89 S> */ B(Return),
114 115 116 117 118 119 120 121 122 123 124 125
]
constant pool: [
]
handlers: [
]

---
snippet: "
  var x = 55;
  var y = x + (x = 1) + (x = 2) + (x = 3);
  return y;
"
126
frame size: 3
127
parameter count: 1
128
bytecode array length: 36
129
bytecodes: [
130
  /*   30 E> */ B(StackCheck),
131
  /*   42 S> */ B(LdaSmi), I8(55),
132
                B(Star), R(0),
133
  /*   54 S> */ B(LdaSmi), I8(1),
134
                B(Mov), R(0), R(2),
135
                B(Star), R(0),
136
  /*   56 E> */ B(Add), R(2), U8(0),
137
                B(Star), R(2),
138
                B(LdaSmi), I8(2),
139
                B(Star), R(0),
140
  /*   66 E> */ B(Add), R(2), U8(1),
141
                B(Star), R(2),
142
                B(LdaSmi), I8(3),
143
                B(Star), R(0),
144
  /*   76 E> */ B(Add), R(2), U8(2),
145
                B(Star), R(1),
146
  /*   96 S> */ B(Return),
147 148 149 150 151 152 153 154 155 156 157 158
]
constant pool: [
]
handlers: [
]

---
snippet: "
  var x = 55;
  var x = x + (x = 1) + (x = 2) + (x = 3);
  return x;
"
159
frame size: 2
160
parameter count: 1
161
bytecode array length: 36
162
bytecodes: [
163
  /*   30 E> */ B(StackCheck),
164
  /*   42 S> */ B(LdaSmi), I8(55),
165
                B(Star), R(0),
166
  /*   54 S> */ B(LdaSmi), I8(1),
167
                B(Mov), R(0), R(1),
168
                B(Star), R(0),
169
  /*   56 E> */ B(Add), R(1), U8(0),
170
                B(Star), R(1),
171
                B(LdaSmi), I8(2),
172
                B(Star), R(0),
173
  /*   66 E> */ B(Add), R(1), U8(1),
174
                B(Star), R(1),
175
                B(LdaSmi), I8(3),
176
                B(Star), R(0),
177
  /*   76 E> */ B(Add), R(1), U8(2),
178
                B(Star), R(0),
179
  /*   96 S> */ B(Return),
180 181 182 183 184 185 186 187 188 189 190
]
constant pool: [
]
handlers: [
]

---
snippet: "
  var x = 10, y = 20;
  return x + (x = 1) + (x + 1) * (y = 2) + (y = 3) + (x = 4) + (y = 5) + y;
"
191
frame size: 4
192
parameter count: 1
193
bytecode array length: 73
194
bytecodes: [
195
  /*   30 E> */ B(StackCheck),
196
  /*   42 S> */ B(LdaSmi), I8(10),
197
                B(Star), R(0),
198
  /*   50 S> */ B(LdaSmi), I8(20),
199
                B(Star), R(1),
200
  /*   54 S> */ B(LdaSmi), I8(1),
201
                B(Mov), R(0), R(2),
202
                B(Star), R(0),
203
  /*   63 E> */ B(Add), R(2), U8(0),
204
                B(Star), R(2),
205
                B(Ldar), R(0),
206
  /*   78 E> */ B(AddSmi), I8(1), U8(2),
207
                B(Star), R(3),
208
                B(LdaSmi), I8(2),
209
                B(Star), R(1),
210 211
  /*   83 E> */ B(Mul), R(3), U8(1),
  /*   73 E> */ B(Add), R(2), U8(3),
212
                B(Star), R(2),
213
                B(LdaSmi), I8(3),
214
                B(Star), R(1),
215
  /*   93 E> */ B(Add), R(2), U8(4),
216
                B(Star), R(2),
217
                B(LdaSmi), I8(4),
218
                B(Star), R(0),
219
  /*  103 E> */ B(Add), R(2), U8(5),
220
                B(Star), R(2),
221
                B(LdaSmi), I8(5),
222
                B(Star), R(1),
223
  /*  113 E> */ B(Add), R(2), U8(6),
224
                B(Star), R(2),
225
                B(Ldar), R(1),
226
  /*  123 E> */ B(Add), R(2), U8(7),
227
  /*  127 S> */ B(Return),
228 229 230 231 232 233 234 235 236 237 238
]
constant pool: [
]
handlers: [
]

---
snippet: "
  var x = 17;
  return 1 + x + (x++) + (++x);
"
239
frame size: 3
240
parameter count: 1
241
bytecode array length: 43
242
bytecodes: [
243
  /*   30 E> */ B(StackCheck),
244
  /*   42 S> */ B(LdaSmi), I8(17),
245
                B(Star), R(0),
246
  /*   46 S> */ B(LdaSmi), I8(1),
247
                B(Star), R(1),
248
                B(Ldar), R(0),
249
  /*   55 E> */ B(Add), R(1), U8(0),
250
                B(Star), R(1),
251
                B(Ldar), R(0),
252
                B(ToNumeric), U8(1),
253
                B(Star), R(2),
254
                B(Inc), U8(1),
255
                B(Star), R(0),
256
                B(Ldar), R(2),
257
  /*   59 E> */ B(Add), R(1), U8(2),
258
                B(Star), R(1),
259
                B(Ldar), R(0),
260
                B(Inc), U8(3),
261
                B(Star), R(0),
262
  /*   67 E> */ B(Add), R(1), U8(4),
263
  /*   75 S> */ B(Return),
264 265 266 267 268 269
]
constant pool: [
]
handlers: [
]