| OLD | NEW |
| 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 | 356 |
| 357 Node* InterpreterAssembler::BytecodeOperandRuntimeId(int operand_index) { | 357 Node* InterpreterAssembler::BytecodeOperandRuntimeId(int operand_index) { |
| 358 DCHECK(OperandType::kRuntimeId == | 358 DCHECK(OperandType::kRuntimeId == |
| 359 Bytecodes::GetOperandType(bytecode_, operand_index)); | 359 Bytecodes::GetOperandType(bytecode_, operand_index)); |
| 360 OperandSize operand_size = | 360 OperandSize operand_size = |
| 361 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale()); | 361 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale()); |
| 362 DCHECK_EQ(operand_size, OperandSize::kShort); | 362 DCHECK_EQ(operand_size, OperandSize::kShort); |
| 363 return BytecodeUnsignedOperand(operand_index, operand_size); | 363 return BytecodeUnsignedOperand(operand_index, operand_size); |
| 364 } | 364 } |
| 365 | 365 |
| 366 Node* InterpreterAssembler::BytecodeOperandIntrinsicId(int operand_index) { |
| 367 DCHECK(OperandType::kIntrinsicId == |
| 368 Bytecodes::GetOperandType(bytecode_, operand_index)); |
| 369 OperandSize operand_size = |
| 370 Bytecodes::GetOperandSize(bytecode_, operand_index, operand_scale()); |
| 371 DCHECK_EQ(operand_size, OperandSize::kByte); |
| 372 return BytecodeUnsignedOperand(operand_index, operand_size); |
| 373 } |
| 374 |
| 366 Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) { | 375 Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) { |
| 367 Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(), | 376 Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(), |
| 368 BytecodeArray::kConstantPoolOffset); | 377 BytecodeArray::kConstantPoolOffset); |
| 369 Node* entry_offset = | 378 Node* entry_offset = |
| 370 IntPtrAdd(IntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), | 379 IntPtrAdd(IntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), |
| 371 WordShl(index, kPointerSizeLog2)); | 380 WordShl(index, kPointerSizeLog2)); |
| 372 return Load(MachineType::AnyTagged(), constant_pool, entry_offset); | 381 return Load(MachineType::AnyTagged(), constant_pool, entry_offset); |
| 373 } | 382 } |
| 374 | 383 |
| 375 Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) { | 384 Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) { |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 Goto(&loop); | 770 Goto(&loop); |
| 762 } | 771 } |
| 763 Bind(&done_loop); | 772 Bind(&done_loop); |
| 764 | 773 |
| 765 return array; | 774 return array; |
| 766 } | 775 } |
| 767 | 776 |
| 768 } // namespace interpreter | 777 } // namespace interpreter |
| 769 } // namespace internal | 778 } // namespace internal |
| 770 } // namespace v8 | 779 } // namespace v8 |
| OLD | NEW |