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

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: 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
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 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 interpreter::Register first_arg = iterator.GetRegisterOperand(1); 1166 interpreter::Register first_arg = iterator.GetRegisterOperand(1);
1167 size_t arg_count = iterator.GetCountOperand(2); 1167 size_t arg_count = iterator.GetCountOperand(2);
1168 1168
1169 // Create node to perform the runtime call. 1169 // Create node to perform the runtime call.
1170 const Operator* call = javascript()->CallRuntime(functionId, arg_count); 1170 const Operator* call = javascript()->CallRuntime(functionId, arg_count);
1171 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count); 1171 Node* value = ProcessCallRuntimeArguments(call, first_arg, arg_count);
1172 environment()->BindAccumulator(value, &states); 1172 environment()->BindAccumulator(value, &states);
1173 } 1173 }
1174 1174
1175 1175
1176 void BytecodeGraphBuilder::VisitCallRuntimePair(
1177 const interpreter::BytecodeArrayIterator& iterator) {
1178 UNIMPLEMENTED();
1179 }
1180
1181
1176 Node* BytecodeGraphBuilder::ProcessCallNewArguments( 1182 Node* BytecodeGraphBuilder::ProcessCallNewArguments(
1177 const Operator* call_new_op, interpreter::Register callee, 1183 const Operator* call_new_op, interpreter::Register callee,
1178 interpreter::Register first_arg, size_t arity) { 1184 interpreter::Register first_arg, size_t arity) {
1179 Node** all = info()->zone()->NewArray<Node*>(arity); 1185 Node** all = info()->zone()->NewArray<Node*>(arity);
1180 all[0] = environment()->LookupRegister(callee); 1186 all[0] = environment()->LookupRegister(callee);
1181 int first_arg_index = first_arg.index(); 1187 int first_arg_index = first_arg.index();
1182 for (int i = 1; i < static_cast<int>(arity) - 1; ++i) { 1188 for (int i = 1; i < static_cast<int>(arity) - 1; ++i) {
1183 all[i] = environment()->LookupRegister( 1189 all[i] = environment()->LookupRegister(
1184 interpreter::Register(first_arg_index + i - 1)); 1190 interpreter::Register(first_arg_index + i - 1));
1185 } 1191 }
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 1884
1879 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { 1885 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) {
1880 if (environment()->IsMarkedAsUnreachable()) return; 1886 if (environment()->IsMarkedAsUnreachable()) return;
1881 environment()->MarkAsUnreachable(); 1887 environment()->MarkAsUnreachable();
1882 exit_controls_.push_back(exit); 1888 exit_controls_.push_back(exit);
1883 } 1889 }
1884 1890
1885 } // namespace compiler 1891 } // namespace compiler
1886 } // namespace internal 1892 } // namespace internal
1887 } // namespace v8 1893 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698