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

Side by Side Diff: src/interpreter/interpreter-assembler.cc

Issue 2673833003: [interpreter] Create custom call opcodes for specific argument counts (Closed)
Patch Set: Rebase 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 | « src/interpreter/interpreter-assembler.h ('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 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/interpreter/interpreter-assembler.h" 5 #include "src/interpreter/interpreter-assembler.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 21 matching lines...) Expand all
32 bytecode_offset_(this, MachineType::PointerRepresentation()), 32 bytecode_offset_(this, MachineType::PointerRepresentation()),
33 interpreted_frame_pointer_(this, MachineType::PointerRepresentation()), 33 interpreted_frame_pointer_(this, MachineType::PointerRepresentation()),
34 accumulator_(this, MachineRepresentation::kTagged), 34 accumulator_(this, MachineRepresentation::kTagged),
35 accumulator_use_(AccumulatorUse::kNone), 35 accumulator_use_(AccumulatorUse::kNone),
36 made_call_(false), 36 made_call_(false),
37 disable_stack_check_across_call_(false), 37 disable_stack_check_across_call_(false),
38 stack_pointer_before_call_(nullptr) { 38 stack_pointer_before_call_(nullptr) {
39 accumulator_.Bind(Parameter(InterpreterDispatchDescriptor::kAccumulator)); 39 accumulator_.Bind(Parameter(InterpreterDispatchDescriptor::kAccumulator));
40 bytecode_offset_.Bind( 40 bytecode_offset_.Bind(
41 Parameter(InterpreterDispatchDescriptor::kBytecodeOffset)); 41 Parameter(InterpreterDispatchDescriptor::kBytecodeOffset));
42
42 if (FLAG_trace_ignition) { 43 if (FLAG_trace_ignition) {
43 TraceBytecode(Runtime::kInterpreterTraceBytecodeEntry); 44 TraceBytecode(Runtime::kInterpreterTraceBytecodeEntry);
44 } 45 }
45 RegisterCallGenerationCallbacks([this] { CallPrologue(); }, 46 RegisterCallGenerationCallbacks([this] { CallPrologue(); },
46 [this] { CallEpilogue(); }); 47 [this] { CallEpilogue(); });
47 } 48 }
48 49
49 InterpreterAssembler::~InterpreterAssembler() { 50 InterpreterAssembler::~InterpreterAssembler() {
50 // If the following check fails the handler does not use the 51 // If the following check fails the handler does not use the
51 // accumulator in the way described in the bytecode definitions in 52 // accumulator in the way described in the bytecode definitions in
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 } 409 }
409 410
410 Node* InterpreterAssembler::BytecodeOperandImmIntPtr(int operand_index) { 411 Node* InterpreterAssembler::BytecodeOperandImmIntPtr(int operand_index) {
411 return ChangeInt32ToIntPtr(BytecodeOperandImm(operand_index)); 412 return ChangeInt32ToIntPtr(BytecodeOperandImm(operand_index));
412 } 413 }
413 414
414 Node* InterpreterAssembler::BytecodeOperandImmSmi(int operand_index) { 415 Node* InterpreterAssembler::BytecodeOperandImmSmi(int operand_index) {
415 return SmiFromWord32(BytecodeOperandImm(operand_index)); 416 return SmiFromWord32(BytecodeOperandImm(operand_index));
416 } 417 }
417 418
418 Node* InterpreterAssembler::BytecodeOperandIdx(int operand_index) { 419 Node* InterpreterAssembler::BytecodeOperandIdxInt32(int operand_index) {
419 DCHECK(OperandType::kIdx == 420 DCHECK(OperandType::kIdx ==
420 Bytecodes::GetOperandType(bytecode_, operand_index)); 421 Bytecodes::GetOperandType(bytecode_, operand_index));
421 OperandSize operand_size = 422 OperandSize operand_size =
422 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale()); 423 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale());
423 return ChangeUint32ToWord( 424 return BytecodeUnsignedOperand(operand_index, operand_size);
424 BytecodeUnsignedOperand(operand_index, operand_size)); 425 }
426
427 Node* InterpreterAssembler::BytecodeOperandIdx(int operand_index) {
428 return ChangeUint32ToWord(BytecodeOperandIdxInt32(operand_index));
425 } 429 }
426 430
427 Node* InterpreterAssembler::BytecodeOperandIdxSmi(int operand_index) { 431 Node* InterpreterAssembler::BytecodeOperandIdxSmi(int operand_index) {
428 return SmiTag(BytecodeOperandIdx(operand_index)); 432 return SmiTag(BytecodeOperandIdx(operand_index));
429 } 433 }
430 434
431 Node* InterpreterAssembler::BytecodeOperandReg(int operand_index) { 435 Node* InterpreterAssembler::BytecodeOperandReg(int operand_index) {
432 DCHECK(Bytecodes::IsRegisterOperandType( 436 DCHECK(Bytecodes::IsRegisterOperandType(
433 Bytecodes::GetOperandType(bytecode_, operand_index))); 437 Bytecodes::GetOperandType(bytecode_, operand_index)));
434 OperandSize operand_size = 438 OperandSize operand_size =
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 Goto(&loop); 1365 Goto(&loop);
1362 } 1366 }
1363 Bind(&done_loop); 1367 Bind(&done_loop);
1364 1368
1365 return array; 1369 return array;
1366 } 1370 }
1367 1371
1368 } // namespace interpreter 1372 } // namespace interpreter
1369 } // namespace internal 1373 } // namespace internal
1370 } // namespace v8 1374 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/interpreter-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698