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

---
wrap: yes

---
snippet: "
  {
    class A {
      #a() { return 1; }
    }
  }
"
16
frame size: 6
17
parameter count: 1
18
bytecode array length: 45
19
bytecodes: [
20
                B(CreateBlockContext), U8(0),
21
                B(PushContext), R(1),
22
                B(LdaConstant), U8(2),
23
                B(Star3),
24
  /*   30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(3), U8(1),
25
                B(StaCurrentContextSlot), U8(3),
26 27
                B(CreateClosure), U8(3), U8(0), U8(2),
                B(StaCurrentContextSlot), U8(2),
28
                B(LdaTheHole),
29
                B(Star5),
30
                B(CreateClosure), U8(4), U8(1), U8(2),
31
                B(Star2),
32
                B(LdaConstant), U8(1),
33 34 35
                B(Star3),
                B(Mov), R(2), R(4),
                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
36
                B(PopContext), R(1),
37
                B(Mov), R(4), R(0),
38
                B(LdaUndefined),
39
  /*   77 S> */ B(Return),
40 41 42 43
]
constant pool: [
  SCOPE_INFO_TYPE,
  FIXED_ARRAY_TYPE,
44
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["A"],
45 46 47 48 49 50 51 52 53 54
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]

---
snippet: "
  {
    class D {
55
      #d() { return 1; }
56 57
    }
    class E extends D {
58
      #e() { return 2; }
59 60 61
    }
  }
"
62
frame size: 7
63
parameter count: 1
64
bytecode array length: 89
65
bytecodes: [
66
                B(CreateBlockContext), U8(0),
67
                B(PushContext), R(2),
68
                B(LdaConstant), U8(2),
69
                B(Star4),
70
  /*   30 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
71
                B(StaCurrentContextSlot), U8(3),
72 73
                B(CreateClosure), U8(3), U8(0), U8(2),
                B(StaCurrentContextSlot), U8(2),
74
                B(LdaTheHole),
75
                B(Star6),
76
                B(CreateClosure), U8(4), U8(1), U8(2),
77
                B(Star3),
78
                B(LdaConstant), U8(1),
79 80 81
                B(Star4),
                B(Mov), R(3), R(5),
                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
82
                B(PopContext), R(2),
83
                B(Mov), R(5), R(0),
84
                B(CreateBlockContext), U8(5),
85
                B(PushContext), R(2),
86
                B(LdaConstant), U8(7),
87
                B(Star4),
88
  /*   38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
89
                B(StaCurrentContextSlot), U8(3),
90 91 92
                B(CreateClosure), U8(8), U8(2), U8(2),
                B(StaCurrentContextSlot), U8(2),
  /*   93 E> */ B(CreateClosure), U8(9), U8(3), U8(2),
93
                B(Star3),
94
                B(LdaConstant), U8(6),
95 96 97 98
                B(Star4),
                B(Mov), R(3), R(5),
                B(Mov), R(0), R(6),
                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
99
                B(PopContext), R(2),
100
                B(Mov), R(5), R(1),
101
                B(LdaUndefined),
102
  /*  126 S> */ B(Return),
103 104 105 106
]
constant pool: [
  SCOPE_INFO_TYPE,
  FIXED_ARRAY_TYPE,
107
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["D"],
108 109 110 111
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
  SCOPE_INFO_TYPE,
  FIXED_ARRAY_TYPE,
112
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["E"],
113 114 115 116 117 118
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]

119 120 121 122 123 124 125 126 127
---
snippet: "
  {
    class A { foo() {} }
    class C extends A {
      #m() { return super.foo; }
    }
  }
"
128
frame size: 8
129
parameter count: 1
130
bytecode array length: 82
131
bytecodes: [
132
                B(CreateBlockContext), U8(0),
133
                B(PushContext), R(2),
134
                B(LdaTheHole),
135
                B(Star6),
136
  /*   30 E> */ B(CreateClosure), U8(2), U8(0), U8(2),
137
                B(Star3),
138
                B(LdaConstant), U8(1),
139
                B(Star4),
140
                B(CreateClosure), U8(3), U8(1), U8(2),
141
                B(Star7),
142 143 144 145
                B(Mov), R(3), R(5),
                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
                B(PopContext), R(2),
                B(Mov), R(5), R(0),
146
                B(CreateBlockContext), U8(4),
147
                B(PushContext), R(2),
148
                B(LdaConstant), U8(6),
149
                B(Star4),
150
  /*   38 E> */ B(CallRuntime), U16(Runtime::kCreatePrivateBrandSymbol), R(4), U8(1),
151
                B(StaCurrentContextSlot), U8(3),
152 153 154
                B(CreateClosure), U8(7), U8(2), U8(2),
                B(StaCurrentContextSlot), U8(2),
  /*   77 E> */ B(CreateClosure), U8(8), U8(3), U8(2),
155
                B(Star3),
156
                B(LdaConstant), U8(5),
157 158 159 160
                B(Star4),
                B(Mov), R(3), R(5),
                B(Mov), R(0), R(6),
                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
161
                B(StaCurrentContextSlot), U8(4),
162
                B(Ldar), R(5),
163
                B(StaCurrentContextSlot), U8(5),
164
                B(PopContext), R(2),
165
                B(Star1),
166
                B(LdaUndefined),
167
  /*  118 S> */ B(Return),
168 169 170 171 172 173 174 175
]
constant pool: [
  SCOPE_INFO_TYPE,
  FIXED_ARRAY_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
  SCOPE_INFO_TYPE,
  FIXED_ARRAY_TYPE,
176
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["C"],
177 178 179 180 181 182
  SHARED_FUNCTION_INFO_TYPE,
  SHARED_FUNCTION_INFO_TYPE,
]
handlers: [
]