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

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 2663963003: [Ignition] Rename New and NewWithSpread bytecodes. (Closed)
Patch Set: Update comments Created 3 years, 10 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
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interpreter/bytecode-array-builder.h" 7 #include "src/interpreter/bytecode-array-builder.h"
8 #include "src/interpreter/bytecode-array-iterator.h" 8 #include "src/interpreter/bytecode-array-iterator.h"
9 #include "src/interpreter/bytecode-label.h" 9 #include "src/interpreter/bytecode-label.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 builder.CreateObjectLiteral(0, 0, 0, reg); 131 builder.CreateObjectLiteral(0, 0, 0, reg);
132 132
133 // Call operations. 133 // Call operations.
134 builder.Call(reg, reg_list, 1, Call::GLOBAL_CALL) 134 builder.Call(reg, reg_list, 1, Call::GLOBAL_CALL)
135 .Call(reg, reg_list, 1, Call::NAMED_PROPERTY_CALL, 135 .Call(reg, reg_list, 1, Call::NAMED_PROPERTY_CALL,
136 TailCallMode::kDisallow) 136 TailCallMode::kDisallow)
137 .Call(reg, reg_list, 1, Call::GLOBAL_CALL, TailCallMode::kAllow) 137 .Call(reg, reg_list, 1, Call::GLOBAL_CALL, TailCallMode::kAllow)
138 .CallRuntime(Runtime::kIsArray, reg) 138 .CallRuntime(Runtime::kIsArray, reg)
139 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair) 139 .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, reg_list, pair)
140 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list) 140 .CallJSRuntime(Context::SPREAD_ITERABLE_INDEX, reg_list)
141 .NewWithSpread(reg, reg_list)
142 .CallWithSpread(reg, reg_list); 141 .CallWithSpread(reg, reg_list);
143 142
144 // Emit binary operator invocations. 143 // Emit binary operator invocations.
145 builder.BinaryOperation(Token::Value::ADD, reg, 1) 144 builder.BinaryOperation(Token::Value::ADD, reg, 1)
146 .BinaryOperation(Token::Value::SUB, reg, 2) 145 .BinaryOperation(Token::Value::SUB, reg, 2)
147 .BinaryOperation(Token::Value::MUL, reg, 3) 146 .BinaryOperation(Token::Value::MUL, reg, 3)
148 .BinaryOperation(Token::Value::DIV, reg, 4) 147 .BinaryOperation(Token::Value::DIV, reg, 4)
149 .BinaryOperation(Token::Value::MOD, reg, 5); 148 .BinaryOperation(Token::Value::MOD, reg, 5);
150 149
151 // Emit bitwise operator invocations 150 // Emit bitwise operator invocations
(...skipping 26 matching lines...) Expand all
178 177
179 // Emit unary operator invocations. 178 // Emit unary operator invocations.
180 builder 179 builder
181 .LogicalNot() // ToBooleanLogicalNot 180 .LogicalNot() // ToBooleanLogicalNot
182 .LogicalNot() // non-ToBoolean LogicalNot 181 .LogicalNot() // non-ToBoolean LogicalNot
183 .TypeOf(); 182 .TypeOf();
184 183
185 // Emit delete 184 // Emit delete
186 builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT); 185 builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT);
187 186
188 // Emit new. 187 // Emit construct.
189 builder.New(reg, reg_list, 1); 188 builder.Construct(reg, reg_list, 1).ConstructWithSpread(reg, reg_list);
190 189
191 // Emit test operator invocations. 190 // Emit test operator invocations.
192 builder.CompareOperation(Token::Value::EQ, reg, 1) 191 builder.CompareOperation(Token::Value::EQ, reg, 1)
193 .CompareOperation(Token::Value::NE, reg, 2) 192 .CompareOperation(Token::Value::NE, reg, 2)
194 .CompareOperation(Token::Value::EQ_STRICT, reg, 3) 193 .CompareOperation(Token::Value::EQ_STRICT, reg, 3)
195 .CompareOperation(Token::Value::LT, reg, 4) 194 .CompareOperation(Token::Value::LT, reg, 4)
196 .CompareOperation(Token::Value::GT, reg, 5) 195 .CompareOperation(Token::Value::GT, reg, 5)
197 .CompareOperation(Token::Value::LTE, reg, 6) 196 .CompareOperation(Token::Value::LTE, reg, 6)
198 .CompareOperation(Token::Value::GTE, reg, 7) 197 .CompareOperation(Token::Value::GTE, reg, 7)
199 .CompareOperation(Token::Value::INSTANCEOF, reg, 8) 198 .CompareOperation(Token::Value::INSTANCEOF, reg, 8)
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 iterator.Advance(); 756 iterator.Advance();
758 } 757 }
759 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 758 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
760 iterator.Advance(); 759 iterator.Advance();
761 CHECK(iterator.done()); 760 CHECK(iterator.done());
762 } 761 }
763 762
764 } // namespace interpreter 763 } // namespace interpreter
765 } // namespace internal 764 } // namespace internal
766 } // namespace v8 765 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698