Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden

Issue 1997653002: [interpreter] Bytecode register optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Grammar. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # 1 #
2 # Autogenerated by generate-bytecode-expectations. 2 # Autogenerated by generate-bytecode-expectations.
3 # 3 #
4 4
5 --- 5 ---
6 pool type: mixed 6 pool type: mixed
7 execute: yes 7 execute: yes
8 wrap: yes 8 wrap: yes
9 9
10 --- 10 ---
11 snippet: " 11 snippet: "
12 class Person { 12 class Person {
13 constructor(name) { this.name = name; } 13 constructor(name) { this.name = name; }
14 speak() { console.log(this.name + ' is speaking.'); } 14 speak() { console.log(this.name + ' is speaking.'); }
15 } 15 }
16 " 16 "
17 frame size: 9 17 frame size: 9
18 parameter count: 1 18 parameter count: 1
19 bytecode array length: 74 19 bytecode array length: 73
20 bytecodes: [ 20 bytecodes: [
21 B(LdaTheHole), 21 B(LdaTheHole),
22 B(Star), R(1), 22 B(Star), R(1),
23 /* 30 E> */ B(StackCheck), 23 /* 30 E> */ B(StackCheck),
24 B(LdaTheHole), 24 B(LdaTheHole),
25 B(Star), R(0), 25 B(Star), R(0),
26 B(LdaTheHole), 26 B(LdaTheHole),
27 B(Star), R(2), 27 B(Star), R(2),
28 B(CreateClosure), U8(0), U8(0), 28 B(CreateClosure), U8(0), U8(0),
29 B(Star), R(3), 29 B(Star), R(3),
30 B(LdaSmi), U8(34), 30 B(LdaSmi), U8(34),
31 B(Star), R(4), 31 B(Star), R(4),
32 B(Wide), B(LdaSmi), U16(148), 32 B(Wide), B(LdaSmi), U16(148),
33 B(Star), R(5), 33 B(Star), R(5),
34 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), 34 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
35 B(Star), R(2), 35 B(Star), R(2),
36 B(LdrNamedProperty), R(2), U8(1), U8(1), R(3), 36 B(LdaNamedProperty), R(2), U8(1), U8(1),
37 B(Ldar), R(3), 37 B(Star), R(3),
38 B(Mov), R(3), R(4),
39 B(LdaConstant), U8(2), 38 B(LdaConstant), U8(2),
40 B(Star), R(5), 39 B(Star), R(5),
41 B(CreateClosure), U8(3), U8(0), 40 B(CreateClosure), U8(3), U8(0),
42 B(Star), R(6), 41 B(Star), R(6),
43 B(LdaSmi), U8(2), 42 B(LdaSmi), U8(2),
44 B(Star), R(7), 43 B(Star), R(7),
45 B(LdaZero), 44 B(LdaZero),
46 B(Star), R(8), 45 B(Star), R(8),
46 B(Mov), R(3), R(4),
47 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4) , U8(5), 47 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4) , U8(5),
48 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), 48 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
49 B(Star), R(0), 49 B(Star), R(0),
50 /* 34 E> */ B(Star), R(1), 50 /* 34 E> */ B(Star), R(1),
51 B(LdaUndefined), 51 B(LdaUndefined),
52 /* 149 S> */ B(Return), 52 /* 149 S> */ B(Return),
53 ] 53 ]
54 constant pool: [ 54 constant pool: [
55 InstanceType::SHARED_FUNCTION_INFO_TYPE, 55 InstanceType::SHARED_FUNCTION_INFO_TYPE,
56 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 56 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
57 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 57 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
58 InstanceType::SHARED_FUNCTION_INFO_TYPE, 58 InstanceType::SHARED_FUNCTION_INFO_TYPE,
59 ] 59 ]
60 handlers: [ 60 handlers: [
61 ] 61 ]
62 62
63 --- 63 ---
64 snippet: " 64 snippet: "
65 class person { 65 class person {
66 constructor(name) { this.name = name; } 66 constructor(name) { this.name = name; }
67 speak() { console.log(this.name + ' is speaking.'); } 67 speak() { console.log(this.name + ' is speaking.'); }
68 } 68 }
69 " 69 "
70 frame size: 9 70 frame size: 9
71 parameter count: 1 71 parameter count: 1
72 bytecode array length: 74 72 bytecode array length: 73
73 bytecodes: [ 73 bytecodes: [
74 B(LdaTheHole), 74 B(LdaTheHole),
75 B(Star), R(1), 75 B(Star), R(1),
76 /* 30 E> */ B(StackCheck), 76 /* 30 E> */ B(StackCheck),
77 B(LdaTheHole), 77 B(LdaTheHole),
78 B(Star), R(0), 78 B(Star), R(0),
79 B(LdaTheHole), 79 B(LdaTheHole),
80 B(Star), R(2), 80 B(Star), R(2),
81 B(CreateClosure), U8(0), U8(0), 81 B(CreateClosure), U8(0), U8(0),
82 B(Star), R(3), 82 B(Star), R(3),
83 B(LdaSmi), U8(34), 83 B(LdaSmi), U8(34),
84 B(Star), R(4), 84 B(Star), R(4),
85 B(Wide), B(LdaSmi), U16(148), 85 B(Wide), B(LdaSmi), U16(148),
86 B(Star), R(5), 86 B(Star), R(5),
87 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), 87 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
88 B(Star), R(2), 88 B(Star), R(2),
89 B(LdrNamedProperty), R(2), U8(1), U8(1), R(3), 89 B(LdaNamedProperty), R(2), U8(1), U8(1),
90 B(Ldar), R(3), 90 B(Star), R(3),
91 B(Mov), R(3), R(4),
92 B(LdaConstant), U8(2), 91 B(LdaConstant), U8(2),
93 B(Star), R(5), 92 B(Star), R(5),
94 B(CreateClosure), U8(3), U8(0), 93 B(CreateClosure), U8(3), U8(0),
95 B(Star), R(6), 94 B(Star), R(6),
96 B(LdaSmi), U8(2), 95 B(LdaSmi), U8(2),
97 B(Star), R(7), 96 B(Star), R(7),
98 B(LdaZero), 97 B(LdaZero),
99 B(Star), R(8), 98 B(Star), R(8),
99 B(Mov), R(3), R(4),
100 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4) , U8(5), 100 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4) , U8(5),
101 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), 101 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
102 B(Star), R(0), 102 B(Star), R(0),
103 /* 34 E> */ B(Star), R(1), 103 /* 34 E> */ B(Star), R(1),
104 B(LdaUndefined), 104 B(LdaUndefined),
105 /* 149 S> */ B(Return), 105 /* 149 S> */ B(Return),
106 ] 106 ]
107 constant pool: [ 107 constant pool: [
108 InstanceType::SHARED_FUNCTION_INFO_TYPE, 108 InstanceType::SHARED_FUNCTION_INFO_TYPE,
109 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 109 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
110 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 110 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
111 InstanceType::SHARED_FUNCTION_INFO_TYPE, 111 InstanceType::SHARED_FUNCTION_INFO_TYPE,
112 ] 112 ]
113 handlers: [ 113 handlers: [
114 ] 114 ]
115 115
116 --- 116 ---
117 snippet: " 117 snippet: "
118 var n0 = 'a'; 118 var n0 = 'a';
119 var n1 = 'b'; 119 var n1 = 'b';
120 class N { 120 class N {
121 [n0]() { return n0; } 121 [n0]() { return n0; }
122 static [n1]() { return n1; } 122 static [n1]() { return n1; }
123 } 123 }
124 " 124 "
125 frame size: 10 125 frame size: 10
126 parameter count: 1 126 parameter count: 1
127 bytecode array length: 128 127 bytecode array length: 127
128 bytecodes: [ 128 bytecodes: [
129 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1), 129 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1),
130 B(PushContext), R(2), 130 B(PushContext), R(2),
131 B(LdaTheHole), 131 B(LdaTheHole),
132 B(Star), R(1), 132 B(Star), R(1),
133 /* 30 E> */ B(StackCheck), 133 /* 30 E> */ B(StackCheck),
134 /* 43 S> */ B(LdaConstant), U8(0), 134 /* 43 S> */ B(LdaConstant), U8(0),
135 /* 43 E> */ B(StaContextSlot), R(context), U8(4), 135 /* 43 E> */ B(StaContextSlot), R(context), U8(4),
136 /* 57 S> */ B(LdaConstant), U8(1), 136 /* 57 S> */ B(LdaConstant), U8(1),
137 /* 57 E> */ B(StaContextSlot), R(context), U8(5), 137 /* 57 E> */ B(StaContextSlot), R(context), U8(5),
138 B(LdaTheHole), 138 B(LdaTheHole),
139 B(Star), R(0), 139 B(Star), R(0),
140 B(LdaTheHole), 140 B(LdaTheHole),
141 B(Star), R(3), 141 B(Star), R(3),
142 B(CreateClosure), U8(2), U8(0), 142 B(CreateClosure), U8(2), U8(0),
143 B(Star), R(4), 143 B(Star), R(4),
144 B(LdaSmi), U8(62), 144 B(LdaSmi), U8(62),
145 B(Star), R(5), 145 B(Star), R(5),
146 B(Wide), B(LdaSmi), U16(128), 146 B(Wide), B(LdaSmi), U16(128),
147 B(Star), R(6), 147 B(Star), R(6),
148 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), 148 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
149 B(Star), R(3), 149 B(Star), R(3),
150 B(LdrNamedProperty), R(3), U8(3), U8(1), R(4), 150 B(LdaNamedProperty), R(3), U8(3), U8(1),
151 B(Ldar), R(4), 151 B(Star), R(4),
152 B(Mov), R(4), R(5),
153 /* 75 E> */ B(LdaContextSlot), R(context), U8(4), 152 /* 75 E> */ B(LdaContextSlot), R(context), U8(4),
154 B(ToName), 153 B(ToName),
155 B(Star), R(6), 154 B(Star), R(6),
156 B(CreateClosure), U8(4), U8(0), 155 B(CreateClosure), U8(4), U8(0),
157 B(Star), R(7), 156 B(Star), R(7),
158 B(LdaSmi), U8(2), 157 B(LdaSmi), U8(2),
159 B(Star), R(8), 158 B(Star), R(8),
160 B(LdaSmi), U8(1), 159 B(LdaSmi), U8(1),
161 B(Star), R(9), 160 B(Star), R(9),
161 B(Mov), R(4), R(5),
162 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5), 162 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5),
163 B(Mov), R(3), R(5),
164 /* 106 E> */ B(LdaContextSlot), R(context), U8(5), 163 /* 106 E> */ B(LdaContextSlot), R(context), U8(5),
165 B(ToName), 164 B(ToName),
166 B(Star), R(6), 165 B(Star), R(6),
167 B(LdaConstant), U8(3), 166 B(LdaConstant), U8(3),
168 B(TestEqualStrict), R(6), 167 B(TestEqualStrict), R(6),
169 B(JumpIfFalse), U8(7), 168 B(Mov), R(3), R(5),
169 B(JumpIfToBooleanFalse), U8(7),
170 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0), 170 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
171 B(CreateClosure), U8(5), U8(0), 171 B(CreateClosure), U8(5), U8(0),
172 B(Star), R(7), 172 B(Star), R(7),
173 B(LdaSmi), U8(1), 173 B(LdaSmi), U8(1),
174 B(Star), R(9), 174 B(Star), R(9),
175 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5), 175 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5),
176 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), 176 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
177 B(Star), R(0), 177 B(Star), R(0),
178 /* 62 E> */ B(Star), R(1), 178 /* 62 E> */ B(Star), R(1),
179 B(LdaUndefined), 179 B(LdaUndefined),
(...skipping 11 matching lines...) Expand all
191 ] 191 ]
192 192
193 --- 193 ---
194 snippet: " 194 snippet: "
195 var count = 0; 195 var count = 0;
196 class C { constructor() { count++; }} 196 class C { constructor() { count++; }}
197 return new C(); 197 return new C();
198 " 198 "
199 frame size: 7 199 frame size: 7
200 parameter count: 1 200 parameter count: 1
201 bytecode array length: 73 201 bytecode array length: 74
202 bytecodes: [ 202 bytecodes: [
203 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1), 203 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1),
204 B(PushContext), R(2), 204 B(PushContext), R(2),
205 B(LdaTheHole), 205 B(LdaTheHole),
206 B(Star), R(1), 206 B(Star), R(1),
207 /* 30 E> */ B(StackCheck), 207 /* 30 E> */ B(StackCheck),
208 /* 46 S> */ B(LdaZero), 208 /* 46 S> */ B(LdaZero),
209 /* 46 E> */ B(StaContextSlot), R(context), U8(4), 209 /* 46 E> */ B(StaContextSlot), R(context), U8(4),
210 B(LdaTheHole), 210 B(LdaTheHole),
211 B(Star), R(0), 211 B(Star), R(0),
212 B(LdaTheHole), 212 B(LdaTheHole),
213 B(Star), R(3), 213 B(Star), R(3),
214 B(CreateClosure), U8(0), U8(0), 214 B(CreateClosure), U8(0), U8(0),
215 B(Star), R(4), 215 B(Star), R(4),
216 B(LdaSmi), U8(49), 216 B(LdaSmi), U8(49),
217 B(Star), R(5), 217 B(Star), R(5),
218 B(LdaSmi), U8(86), 218 B(LdaSmi), U8(86),
219 B(Star), R(6), 219 B(Star), R(6),
220 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), 220 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
221 B(Star), R(3), 221 B(Star), R(3),
222 B(LdrNamedProperty), R(3), U8(1), U8(1), R(4), 222 B(LdaNamedProperty), R(3), U8(1), U8(1),
223 B(Star), R(4),
223 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), 224 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
224 B(Star), R(0), 225 B(Star), R(0),
225 B(Star), R(1), 226 B(Star), R(1),
226 /* 87 S> */ B(JumpIfNotHole), U8(11), 227 /* 87 S> */ B(JumpIfNotHole), U8(11),
227 B(LdaConstant), U8(2), 228 B(LdaConstant), U8(2),
228 B(Star), R(4), 229 B(Star), R(4),
229 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), 230 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
230 B(Star), R(3), 231 /* 94 E> */ B(Star), R(3),
231 /* 94 E> */ B(New), R(3), R(0), U8(0), 232 B(New), R(3), R(0), U8(0),
232 /* 103 S> */ B(Return), 233 /* 103 S> */ B(Return),
233 ] 234 ]
234 constant pool: [ 235 constant pool: [
235 InstanceType::SHARED_FUNCTION_INFO_TYPE, 236 InstanceType::SHARED_FUNCTION_INFO_TYPE,
236 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 237 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
237 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 238 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
238 ] 239 ]
239 handlers: [ 240 handlers: [
240 ] 241 ]
241 242
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698