PublicClassFields.golden 6.79 KB
Newer Older
1 2 3 4 5 6 7
#
# Autogenerated by generate-bytecode-expectations.
#

---
wrap: yes

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
---
snippet: "
  {
    class A {
      a;
      ['b'];
    }
  
    class B {
      a = 1;
      ['b'] = this.a;
    }
    new A;
    new B;
  }
"
24
frame size: 8
25
parameter count: 1
26
bytecode array length: 106
27
bytecodes: [
28
  /*   30 E> */ B(CreateBlockContext), U8(0),
29
                B(PushContext), R(2),
30
                B(LdaTheHole),
31
                B(StaCurrentContextSlot), U8(2),
32
                B(LdaTheHole),
33
                B(Star6),
34
                B(CreateClosure), U8(2), U8(0), U8(2),
35
                B(Star3),
36
                B(LdaConstant), U8(1),
37
                B(Star4),
38
  /*   60 S> */ B(LdaConstant), U8(3),
39
                B(StaCurrentContextSlot), U8(2),
40
                B(Star7),
41 42
                B(Mov), R(3), R(5),
                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
43
                B(Star4),
44
                B(CreateClosure), U8(4), U8(1), U8(2),
45
                B(Star5),
46 47
                B(StaNamedProperty), R(3), U8(5), U8(0),
                B(PopContext), R(2),
48
                B(Mov), R(3), R(0),
49
  /*   38 E> */ B(CreateBlockContext), U8(6),
50
                B(PushContext), R(2),
51
                B(LdaTheHole),
52
                B(StaCurrentContextSlot), U8(2),
53
                B(LdaTheHole),
54
                B(Star6),
55
                B(CreateClosure), U8(8), U8(2), U8(2),
56
                B(Star3),
57
                B(LdaConstant), U8(7),
58
                B(Star4),
59
  /*   99 S> */ B(LdaConstant), U8(3),
60
                B(StaCurrentContextSlot), U8(2),
61
                B(Star7),
62 63
                B(Mov), R(3), R(5),
                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
64
                B(Star4),
65
                B(CreateClosure), U8(9), U8(3), U8(2),
66
                B(Star5),
67 68 69 70 71 72 73
                B(StaNamedProperty), R(3), U8(5), U8(2),
                B(PopContext), R(2),
                B(Mov), R(3), R(1),
  /*  120 S> */ B(Ldar), R(0),
  /*  120 E> */ B(Construct), R(0), R(0), U8(0), U8(4),
  /*  129 S> */ B(Ldar), R(1),
  /*  129 E> */ B(Construct), R(1), R(0), U8(0), U8(6),
74
                B(LdaUndefined),
75
  /*  138 S> */ B(Return),
76 77
]
constant pool: [
78
  SCOPE_INFO_TYPE,
79 80 81 82 83
  FIXED_ARRAY_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
  SHARED_FUNCTION_INFO_TYPE,
  SYMBOL_TYPE,
84
  SCOPE_INFO_TYPE,
85 86 87 88 89 90 91
  FIXED_ARRAY_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]

92 93 94 95 96
---
snippet: "
  {
    class A extends class {} {
      a;
97
      ['b'];
98 99 100 101
    }
  
    class B extends class {} {
      a = 1;
102 103
      ['b'] = this.a;
      foo() { return 1; }
104 105 106 107 108
      constructor() {
        super();
      }
    }
  
109
    class C extends B {
110
      a = 1;
111
      ['b'] = this.a;
112 113 114 115 116 117 118 119 120 121
      constructor() {
        (() => super())();
      }
    }
  
    new A;
    new B;
    new C;
  }
"
122
frame size: 12
123
parameter count: 1
124
bytecode array length: 204
125
bytecodes: [
126
  /*   30 E> */ B(CreateBlockContext), U8(0),
127
                B(PushContext), R(3),
128
                B(LdaTheHole),
129
                B(StaCurrentContextSlot), U8(2),
130
                B(LdaTheHole),
131
                B(Star11),
132
                B(CreateClosure), U8(3), U8(0), U8(2),
133
                B(Star8),
134
                B(LdaConstant), U8(2),
135
                B(Star9),
136 137
                B(Mov), R(8), R(10),
                B(CallRuntime), U16(Runtime::kDefineClass), R(9), U8(3),
138
                B(Star9),
139
                B(CreateClosure), U8(4), U8(1), U8(2),
140
                B(Star4),
141
                B(LdaConstant), U8(1),
142
                B(Star5),
143
  /*   77 S> */ B(LdaConstant), U8(5),
144
                B(StaCurrentContextSlot), U8(2),
145
                B(Star8),
146 147 148
                B(Mov), R(4), R(6),
                B(Mov), R(10), R(7),
                B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
149
                B(Star5),
150
                B(CreateClosure), U8(6), U8(2), U8(2),
151
                B(Star6),
152 153 154
                B(StaNamedProperty), R(4), U8(7), U8(0),
                B(PopContext), R(3),
                B(Mov), R(4), R(0),
155
  /*   38 E> */ B(CreateBlockContext), U8(8),
156
                B(PushContext), R(3),
157
                B(LdaTheHole),
158
                B(StaCurrentContextSlot), U8(2),
159
                B(LdaTheHole),
160
                B(Star11),
161
                B(CreateClosure), U8(11), U8(3), U8(2),
162
                B(Star8),
163
                B(LdaConstant), U8(10),
164
                B(Star9),
165 166
                B(Mov), R(8), R(10),
                B(CallRuntime), U16(Runtime::kDefineClass), R(9), U8(3),
167
                B(Star9),
168
                B(CreateClosure), U8(12), U8(4), U8(2),
169
                B(Star4),
170
                B(LdaConstant), U8(9),
171
                B(Star5),
172
  /*  133 S> */ B(LdaConstant), U8(5),
173
                B(StaCurrentContextSlot), U8(2),
174
                B(Star8),
175
                B(CreateClosure), U8(13), U8(5), U8(2),
176
                B(Star9),
177 178 179
                B(Mov), R(4), R(6),
                B(Mov), R(10), R(7),
                B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(5),
180
                B(Star5),
181
                B(CreateClosure), U8(14), U8(6), U8(2),
182
                B(Star6),
183 184
                B(StaNamedProperty), R(4), U8(7), U8(2),
                B(PopContext), R(3),
185
                B(Mov), R(4), R(1),
186
  /*   90 E> */ B(CreateBlockContext), U8(15),
187
                B(PushContext), R(3),
188
                B(LdaTheHole),
189
                B(StaCurrentContextSlot), U8(2),
190
  /*  236 E> */ B(CreateClosure), U8(17), U8(7), U8(2),
191
                B(Star4),
192
                B(LdaConstant), U8(16),
193
                B(Star5),
194
  /*  256 S> */ B(LdaConstant), U8(5),
195
                B(StaCurrentContextSlot), U8(2),
196
                B(Star8),
197 198 199
                B(Mov), R(4), R(6),
                B(Mov), R(1), R(7),
                B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
200
                B(Star5),
201
                B(CreateClosure), U8(18), U8(8), U8(2),
202
                B(Star6),
203 204 205 206 207 208 209 210 211
                B(StaNamedProperty), R(4), U8(7), U8(4),
                B(PopContext), R(3),
                B(Mov), R(4), R(2),
  /*  329 S> */ B(Ldar), R(0),
  /*  329 E> */ B(Construct), R(0), R(0), U8(0), U8(6),
  /*  338 S> */ B(Ldar), R(1),
  /*  338 E> */ B(Construct), R(1), R(0), U8(0), U8(8),
  /*  347 S> */ B(Ldar), R(2),
  /*  347 E> */ B(Construct), R(2), R(0), U8(0), U8(10),
212
                B(LdaUndefined),
213
  /*  356 S> */ B(Return),
214 215
]
constant pool: [
216
  SCOPE_INFO_TYPE,
217 218 219 220
  FIXED_ARRAY_TYPE,
  FIXED_ARRAY_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
221
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
222 223
  SHARED_FUNCTION_INFO_TYPE,
  SYMBOL_TYPE,
224
  SCOPE_INFO_TYPE,
225
  FIXED_ARRAY_TYPE,
226 227
  FIXED_ARRAY_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
228 229 230
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
231
  SCOPE_INFO_TYPE,
232 233 234 235 236 237 238
  FIXED_ARRAY_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]