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

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

Issue 1997653002: [interpreter] Bytecode register optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Decouple a test from implementation. 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 var x = 0; 12 var x = 0;
13 label: { 13 label: {
14 x = x + 1; 14 x = x + 1;
15 break label; 15 break label;
16 x = x + 1; 16 x = x + 1;
17 } 17 }
18 return x; 18 return x;
19 " 19 "
20 frame size: 2 20 frame size: 1
21 parameter count: 1 21 parameter count: 1
22 bytecode array length: 17 22 bytecode array length: 15
23 bytecodes: [ 23 bytecodes: [
24 /* 30 E> */ B(StackCheck), 24 /* 30 E> */ B(StackCheck),
25 /* 42 S> */ B(LdaZero), 25 /* 42 S> */ B(LdaZero),
26 B(Star), R(0), 26 B(Star), R(0),
27 /* 56 S> */ B(Star), R(1), 27 /* 56 S> */ B(LdaSmi), U8(1),
28 B(LdaSmi), U8(1), 28 B(Add), R(0),
29 B(Add), R(1),
30 B(Star), R(0), 29 B(Star), R(0),
31 /* 69 S> */ B(Jump), U8(2), 30 /* 69 S> */ B(Jump), U8(2),
32 /* 97 S> */ B(Ldar), R(0), 31 /* 97 S> */ B(Ldar), R(0),
33 /* 107 S> */ B(Return), 32 /* 107 S> */ B(Return),
34 ] 33 ]
35 constant pool: [ 34 constant pool: [
36 ] 35 ]
37 handlers: [ 36 handlers: [
38 ] 37 ]
39 38
40 --- 39 ---
41 snippet: " 40 snippet: "
42 var sum = 0; 41 var sum = 0;
43 outer: { 42 outer: {
44 for (var x = 0; x < 10; ++x) { 43 for (var x = 0; x < 10; ++x) {
45 for (var y = 0; y < 3; ++y) { 44 for (var y = 0; y < 3; ++y) {
46 ++sum; 45 ++sum;
47 if (x + y == 12) { break outer; } 46 if (x + y == 12) { break outer; }
48 } 47 }
49 } 48 }
50 } 49 }
51 return sum; 50 return sum;
52 " 51 "
53 frame size: 5 52 frame size: 5
54 parameter count: 1 53 parameter count: 1
55 bytecode array length: 72 54 bytecode array length: 61
56 bytecodes: [ 55 bytecodes: [
57 /* 30 E> */ B(StackCheck), 56 /* 30 E> */ B(StackCheck),
58 /* 44 S> */ B(LdaZero), 57 /* 44 S> */ B(LdaZero),
59 B(Star), R(0), 58 B(Star), R(0),
60 /* 71 S> */ B(LdaZero), 59 /* 71 S> */ B(LdaZero),
61 /* 71 E> */ B(Star), R(1), 60 /* 71 E> */ B(Star), R(1),
62 /* 76 S> */ B(Ldar), R(1), 61 /* 76 S> */ B(LdaSmi), U8(10),
63 B(Star), R(3), 62 /* 76 E> */ B(TestLessThan), R(1),
64 B(LdaSmi), U8(10), 63 B(JumpIfFalse), U8(47),
65 /* 76 E> */ B(TestLessThan), R(3),
66 B(JumpIfFalse), U8(54),
67 /* 58 E> */ B(StackCheck), 64 /* 58 E> */ B(StackCheck),
68 /* 106 S> */ B(LdaZero), 65 /* 106 S> */ B(LdaZero),
69 /* 106 E> */ B(Star), R(2), 66 /* 106 E> */ B(Star), R(2),
70 /* 111 S> */ B(Ldar), R(2), 67 /* 111 S> */ B(LdaSmi), U8(3),
71 B(Star), R(3), 68 /* 111 E> */ B(TestLessThan), R(2),
72 B(LdaSmi), U8(3), 69 B(JumpIfFalse), U8(30),
73 /* 111 E> */ B(TestLessThan), R(3),
74 B(JumpIfFalse), U8(33),
75 /* 93 E> */ B(StackCheck), 70 /* 93 E> */ B(StackCheck),
76 /* 129 S> */ B(Ldar), R(0), 71 /* 129 S> */ B(Ldar), R(0),
77 B(Inc), 72 B(Inc),
78 B(Star), R(0), 73 B(Star), R(0),
79 /* 142 S> */ B(Ldar), R(1), 74 /* 142 S> */ B(Nop),
80 B(Star), R(3),
81 /* 150 E> */ B(Ldar), R(2), 75 /* 150 E> */ B(Ldar), R(2),
82 B(Add), R(3), 76 B(Add), R(1),
83 B(Star), R(4), 77 B(Star), R(4),
84 B(LdaSmi), U8(12), 78 B(LdaSmi), U8(12),
85 /* 152 E> */ B(TestEqual), R(4), 79 /* 152 E> */ B(TestEqual), R(4),
86 B(JumpIfFalse), U8(4), 80 B(JumpIfFalse), U8(4),
87 /* 161 S> */ B(Jump), U8(16), 81 /* 161 S> */ B(Jump), U8(16),
88 /* 118 S> */ B(Ldar), R(2), 82 /* 118 S> */ B(Ldar), R(2),
89 B(Inc), 83 B(Inc),
90 /* 118 E> */ B(Star), R(2), 84 /* 118 E> */ B(Star), R(2),
91 B(Jump), U8(-39), 85 B(Jump), U8(-32),
92 /* 84 S> */ B(Ldar), R(1), 86 /* 84 S> */ B(Ldar), R(1),
93 B(Inc), 87 B(Inc),
94 /* 84 E> */ B(Star), R(1), 88 /* 84 E> */ B(Star), R(1),
95 B(Jump), U8(-60), 89 B(Jump), U8(-49),
96 /* 188 S> */ B(Ldar), R(0), 90 /* 188 S> */ B(Ldar), R(0),
97 /* 200 S> */ B(Return), 91 /* 200 S> */ B(Return),
98 ] 92 ]
99 constant pool: [ 93 constant pool: [
100 ] 94 ]
101 handlers: [ 95 handlers: [
102 ] 96 ]
103 97
104 --- 98 ---
105 snippet: " 99 snippet: "
106 outer: { 100 outer: {
107 let y = 10; 101 let y = 10;
108 function f() { return y; } 102 function f() { return y; }
109 break outer; 103 break outer;
110 } 104 }
111 " 105 "
112 frame size: 5 106 frame size: 5
113 parameter count: 1 107 parameter count: 1
114 bytecode array length: 51 108 bytecode array length: 50
115 bytecodes: [ 109 bytecodes: [
116 /* 30 E> */ B(StackCheck), 110 /* 30 E> */ B(StackCheck),
117 B(LdaConstant), U8(0), 111 B(LdaConstant), U8(0),
118 B(Star), R(3), 112 B(Star), R(3),
119 B(Ldar), R(closure), 113 B(Mov), R(closure), R(4),
120 B(Star), R(4),
121 B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2), 114 B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2),
122 B(PushContext), R(2), 115 B(PushContext), R(2),
123 B(LdaTheHole), 116 B(LdaTheHole),
124 B(StaContextSlot), R(context), U8(4), 117 B(StaContextSlot), R(context), U8(4),
125 B(CreateClosure), U8(1), U8(0), 118 B(CreateClosure), U8(1), U8(0),
126 B(Star), R(0), 119 B(Star), R(0),
127 /* 53 S> */ B(LdaSmi), U8(10), 120 /* 53 S> */ B(LdaSmi), U8(10),
128 /* 53 E> */ B(StaContextSlot), R(context), U8(4), 121 /* 53 E> */ B(StaContextSlot), R(context), U8(4),
129 B(Ldar), R(0), 122 B(Ldar), R(0),
130 B(JumpIfNotHole), U8(11), 123 B(JumpIfNotHole), U8(11),
(...skipping 22 matching lines...) Expand all
153 let y = 2; 146 let y = 2;
154 function f() { return x + y; } 147 function f() { return x + y; }
155 if (y) break outer; 148 if (y) break outer;
156 y = 3; 149 y = 3;
157 } 150 }
158 } 151 }
159 x = 4; 152 x = 4;
160 " 153 "
161 frame size: 6 154 frame size: 6
162 parameter count: 1 155 parameter count: 1
163 bytecode array length: 131 156 bytecode array length: 130
164 bytecodes: [ 157 bytecodes: [
165 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1), 158 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1),
166 B(PushContext), R(2), 159 B(PushContext), R(2),
167 B(LdaTheHole), 160 B(LdaTheHole),
168 B(StaContextSlot), R(context), U8(4), 161 B(StaContextSlot), R(context), U8(4),
169 /* 30 E> */ B(StackCheck), 162 /* 30 E> */ B(StackCheck),
170 /* 42 S> */ B(LdaSmi), U8(1), 163 /* 42 S> */ B(LdaSmi), U8(1),
171 /* 42 E> */ B(StaContextSlot), R(context), U8(4), 164 /* 42 E> */ B(StaContextSlot), R(context), U8(4),
172 B(LdaConstant), U8(0), 165 B(LdaConstant), U8(0),
173 B(Star), R(4), 166 B(Star), R(4),
174 B(Ldar), R(closure), 167 B(Mov), R(closure), R(5),
175 B(Star), R(5),
176 B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2), 168 B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2),
177 B(PushContext), R(3), 169 B(PushContext), R(3),
178 B(LdaTheHole), 170 B(LdaTheHole),
179 B(StaContextSlot), R(context), U8(4), 171 B(StaContextSlot), R(context), U8(4),
180 B(CreateClosure), U8(1), U8(0), 172 B(CreateClosure), U8(1), U8(0),
181 B(Star), R(0), 173 B(Star), R(0),
182 /* 76 S> */ B(LdaSmi), U8(2), 174 /* 76 S> */ B(LdaSmi), U8(2),
183 /* 76 E> */ B(StaContextSlot), R(context), U8(4), 175 /* 76 E> */ B(StaContextSlot), R(context), U8(4),
184 B(Ldar), R(0), 176 B(Ldar), R(0),
185 B(JumpIfNotHole), U8(11), 177 B(JumpIfNotHole), U8(11),
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 constant pool: [ 212 constant pool: [
221 InstanceType::FIXED_ARRAY_TYPE, 213 InstanceType::FIXED_ARRAY_TYPE,
222 InstanceType::SHARED_FUNCTION_INFO_TYPE, 214 InstanceType::SHARED_FUNCTION_INFO_TYPE,
223 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 215 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
224 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 216 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
225 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 217 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
226 ] 218 ]
227 handlers: [ 219 handlers: [
228 ] 220 ]
229 221
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698