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

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

Issue 2084623002: Reland: [Interpreter] Map runtime id's to intrinsic id's in InvokeIntrinsic bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reland 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 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 "test/unittests/test-utils.h" 9 #include "test/unittests/test-utils.h"
10 10
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); 222 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
223 CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_0.index()); 223 CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_0.index());
224 CHECK_EQ(iterator.GetRegisterOperandRange(0), 3); 224 CHECK_EQ(iterator.GetRegisterOperandRange(0), 3);
225 CHECK(!iterator.done()); 225 CHECK(!iterator.done());
226 offset += Bytecodes::Size(Bytecode::kForInPrepare, OperandScale::kSingle); 226 offset += Bytecodes::Size(Bytecode::kForInPrepare, OperandScale::kSingle);
227 iterator.Advance(); 227 iterator.Advance();
228 228
229 CHECK_EQ(iterator.current_bytecode(), Bytecode::kCallRuntime); 229 CHECK_EQ(iterator.current_bytecode(), Bytecode::kCallRuntime);
230 CHECK_EQ(iterator.current_offset(), offset); 230 CHECK_EQ(iterator.current_offset(), offset);
231 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); 231 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
232 CHECK_EQ(static_cast<Runtime::FunctionId>(iterator.GetRuntimeIdOperand(0)), 232 CHECK_EQ(iterator.GetRuntimeIdOperand(0), Runtime::kLoadIC_Miss);
233 Runtime::kLoadIC_Miss);
234 CHECK_EQ(iterator.GetRegisterOperand(1).index(), reg_0.index()); 233 CHECK_EQ(iterator.GetRegisterOperand(1).index(), reg_0.index());
235 CHECK_EQ(iterator.GetRegisterCountOperand(2), 1); 234 CHECK_EQ(iterator.GetRegisterCountOperand(2), 1);
236 CHECK(!iterator.done()); 235 CHECK(!iterator.done());
237 offset += Bytecodes::Size(Bytecode::kCallRuntime, OperandScale::kSingle); 236 offset += Bytecodes::Size(Bytecode::kCallRuntime, OperandScale::kSingle);
238 iterator.Advance(); 237 iterator.Advance();
239 238
240 CHECK_EQ(iterator.current_bytecode(), Bytecode::kDebugger); 239 CHECK_EQ(iterator.current_bytecode(), Bytecode::kDebugger);
241 CHECK_EQ(iterator.current_offset(), offset); 240 CHECK_EQ(iterator.current_offset(), offset);
242 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); 241 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
243 CHECK(!iterator.done()); 242 CHECK(!iterator.done());
(...skipping 13 matching lines...) Expand all
257 CHECK_EQ(iterator.current_offset(), offset); 256 CHECK_EQ(iterator.current_offset(), offset);
258 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); 257 CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
259 CHECK(!iterator.done()); 258 CHECK(!iterator.done());
260 iterator.Advance(); 259 iterator.Advance();
261 CHECK(iterator.done()); 260 CHECK(iterator.done());
262 } 261 }
263 262
264 } // namespace interpreter 263 } // namespace interpreter
265 } // namespace internal 264 } // namespace internal
266 } // namespace v8 265 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698