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

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

Issue 1645763003: [Interpreter] TurboFan implementation of intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
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-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace interpreter { 9 namespace interpreter {
10 10
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 1128
1129 1129
1130 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime( 1130 BytecodeArrayBuilder& BytecodeArrayBuilder::CallRuntime(
1131 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) { 1131 Runtime::FunctionId function_id, Register first_arg, size_t arg_count) {
1132 DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size); 1132 DCHECK_EQ(1, Runtime::FunctionForId(function_id)->result_size);
1133 DCHECK(FitsInIdx16Operand(function_id)); 1133 DCHECK(FitsInIdx16Operand(function_id));
1134 if (!first_arg.is_valid()) { 1134 if (!first_arg.is_valid()) {
1135 DCHECK_EQ(0u, arg_count); 1135 DCHECK_EQ(0u, arg_count);
1136 first_arg = Register(0); 1136 first_arg = Register(0);
1137 } 1137 }
1138 if (function_id == Runtime::kInlineIsJSReceiver ||
1139 function_id == Runtime::kInlineIsArray) {
1140 // Arg is in the accumulator
oth 2016/02/01 09:52:33 Comment seems distracting. Neither the interpreter
epertoso 2016/03/03 11:20:39 Removed.
1141 Output(Bytecode::kIntrinsicOneArg, static_cast<uint16_t>(function_id),
1142 first_arg.ToRawOperand());
1143 return *this;
1144 }
1138 if (FitsInReg8Operand(first_arg) && FitsInIdx8Operand(arg_count)) { 1145 if (FitsInReg8Operand(first_arg) && FitsInIdx8Operand(arg_count)) {
1139 Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id), 1146 Output(Bytecode::kCallRuntime, static_cast<uint16_t>(function_id),
1140 first_arg.ToRawOperand(), static_cast<uint8_t>(arg_count)); 1147 first_arg.ToRawOperand(), static_cast<uint8_t>(arg_count));
1141 } else if (FitsInReg16Operand(first_arg) && FitsInIdx16Operand(arg_count)) { 1148 } else if (FitsInReg16Operand(first_arg) && FitsInIdx16Operand(arg_count)) {
1142 Output(Bytecode::kCallRuntimeWide, static_cast<uint16_t>(function_id), 1149 Output(Bytecode::kCallRuntimeWide, static_cast<uint16_t>(function_id),
1143 first_arg.ToRawOperand(), static_cast<uint16_t>(arg_count)); 1150 first_arg.ToRawOperand(), static_cast<uint16_t>(arg_count));
1144 } else { 1151 } else {
1145 UNIMPLEMENTED(); 1152 UNIMPLEMENTED();
1146 } 1153 }
1147 return *this; 1154 return *this;
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 } 1820 }
1814 1821
1815 // static 1822 // static
1816 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) { 1823 bool BytecodeArrayBuilder::FitsInReg16OperandUntranslated(Register value) {
1817 return value.is_short_operand(); 1824 return value.is_short_operand();
1818 } 1825 }
1819 1826
1820 } // namespace interpreter 1827 } // namespace interpreter
1821 } // namespace internal 1828 } // namespace internal
1822 } // namespace v8 1829 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698