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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 1568493002: [Interpreter] Add support for calling runtime functions which return a pair. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michi's review comments. Created 4 years, 11 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/code-factory.cc ('k') | src/compiler/interpreter-assembler.h » ('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/compiler/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/compiler/bytecode-branch-analysis.h" 7 #include "src/compiler/bytecode-branch-analysis.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 interpreter::Register first_arg = iterator.GetRegisterOperand(1); 1192 interpreter::Register first_arg = iterator.GetRegisterOperand(1);
1193 size_t arg_count = iterator.GetCountOperand(2); 1193 size_t arg_count = iterator.GetCountOperand(2);
1194 1194
1195 // Create node to perform the runtime call. 1195 // Create node to perform the runtime call.
1196 const Operator* call = javascript()->CallRuntime(functionId, arg_count); 1196 const Operator* call = javascript()->CallRuntime(functionId, arg_count);
1197 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count); 1197 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count);
1198 environment()->BindAccumulator(value, &states); 1198 environment()->BindAccumulator(value, &states);
1199 } 1199 }
1200 1200
1201 1201
1202 void BytecodeGraphBuilder::VisitCallRuntimeForPair(
1203 const interpreter::BytecodeArrayIterator& iterator) {
1204 UNIMPLEMENTED();
1205 }
1206
1207
1202 Node* BytecodeGraphBuilder::ProcessCallNewArguments( 1208 Node* BytecodeGraphBuilder::ProcessCallNewArguments(
1203 const Operator* call_new_op, interpreter::Register callee, 1209 const Operator* call_new_op, interpreter::Register callee,
1204 interpreter::Register first_arg, size_t arity) { 1210 interpreter::Register first_arg, size_t arity) {
1205 Node** all = info()->zone()->NewArray<Node*>(arity); 1211 Node** all = info()->zone()->NewArray<Node*>(arity);
1206 all[0] = environment()->LookupRegister(callee); 1212 all[0] = environment()->LookupRegister(callee);
1207 int first_arg_index = first_arg.index(); 1213 int first_arg_index = first_arg.index();
1208 for (int i = 1; i < static_cast<int>(arity) - 1; ++i) { 1214 for (int i = 1; i < static_cast<int>(arity) - 1; ++i) {
1209 all[i] = environment()->LookupRegister( 1215 all[i] = environment()->LookupRegister(
1210 interpreter::Register(first_arg_index + i - 1)); 1216 interpreter::Register(first_arg_index + i - 1));
1211 } 1217 }
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 1943
1938 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { 1944 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) {
1939 if (environment()->IsMarkedAsUnreachable()) return; 1945 if (environment()->IsMarkedAsUnreachable()) return;
1940 environment()->MarkAsUnreachable(); 1946 environment()->MarkAsUnreachable();
1941 exit_controls_.push_back(exit); 1947 exit_controls_.push_back(exit);
1942 } 1948 }
1943 1949
1944 } // namespace compiler 1950 } // namespace compiler
1945 } // namespace internal 1951 } // namespace internal
1946 } // namespace v8 1952 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/interpreter-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698