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

Side by Side Diff: src/interpreter/bytecode-array-iterator.cc

Issue 1410003003: [Interpreter] Add support for JS runtime calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_api_builtin
Patch Set: Rebased Created 5 years, 1 month 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/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | 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/bytecode-array-iterator.h" 5 #include "src/interpreter/bytecode-array-iterator.h"
6 6
7 #include "src/objects-inl.h" 7 #include "src/objects-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 OperandSize size = 69 OperandSize size =
70 Bytecodes::GetOperandSize(current_bytecode(), operand_index); 70 Bytecodes::GetOperandSize(current_bytecode(), operand_index);
71 OperandType type = 71 OperandType type =
72 (size == OperandSize::kByte) ? OperandType::kIdx8 : OperandType::kIdx16; 72 (size == OperandSize::kByte) ? OperandType::kIdx8 : OperandType::kIdx16;
73 uint32_t operand = GetRawOperand(operand_index, type); 73 uint32_t operand = GetRawOperand(operand_index, type);
74 return static_cast<int>(operand); 74 return static_cast<int>(operand);
75 } 75 }
76 76
77 77
78 Register BytecodeArrayIterator::GetRegisterOperand(int operand_index) const { 78 Register BytecodeArrayIterator::GetRegisterOperand(int operand_index) const {
79 uint32_t operand = GetRawOperand(operand_index, OperandType::kReg8); 79 OperandType operand_type =
80 Bytecodes::GetOperandType(current_bytecode(), operand_index);
81 DCHECK(operand_type == OperandType::kReg8 ||
82 operand_type == OperandType::kMaybeReg8);
83 uint32_t operand = GetRawOperand(operand_index, operand_type);
80 return Register::FromOperand(operand); 84 return Register::FromOperand(operand);
81 } 85 }
82 86
83 87
84 Handle<Object> BytecodeArrayIterator::GetConstantForIndexOperand( 88 Handle<Object> BytecodeArrayIterator::GetConstantForIndexOperand(
85 int operand_index) const { 89 int operand_index) const {
86 Handle<FixedArray> constants = handle(bytecode_array()->constant_pool()); 90 Handle<FixedArray> constants = handle(bytecode_array()->constant_pool());
87 return FixedArray::get(constants, GetIndexOperand(operand_index)); 91 return FixedArray::get(constants, GetIndexOperand(operand_index));
88 } 92 }
89 93
90 } // namespace interpreter 94 } // namespace interpreter
91 } // namespace internal 95 } // namespace internal
92 } // namespace v8 96 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698