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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 709033002: Teach TurboFan to call C functions with result_size > 1. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/compiler/js-graph.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/graph-inl.h" 8 #include "src/compiler/graph-inl.h"
9 #include "src/compiler/js-generic-lowering.h" 9 #include "src/compiler/js-generic-lowering.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, 216 void JSGenericLowering::ReplaceWithRuntimeCall(Node* node,
217 Runtime::FunctionId f, 217 Runtime::FunctionId f,
218 int nargs_override) { 218 int nargs_override) {
219 Operator::Properties properties = node->op()->properties(); 219 Operator::Properties properties = node->op()->properties();
220 const Runtime::Function* fun = Runtime::FunctionForId(f); 220 const Runtime::Function* fun = Runtime::FunctionForId(f);
221 int nargs = (nargs_override < 0) ? fun->nargs : nargs_override; 221 int nargs = (nargs_override < 0) ? fun->nargs : nargs_override;
222 CallDescriptor* desc = 222 CallDescriptor* desc =
223 linkage()->GetRuntimeCallDescriptor(f, nargs, properties); 223 linkage()->GetRuntimeCallDescriptor(f, nargs, properties);
224 Node* ref = ExternalConstant(ExternalReference(f, isolate())); 224 Node* ref = ExternalConstant(ExternalReference(f, isolate()));
225 Node* arity = Int32Constant(nargs); 225 Node* arity = Int32Constant(nargs);
226 PatchInsertInput(node, 0, jsgraph()->CEntryStubConstant()); 226 PatchInsertInput(node, 0, jsgraph()->CEntryStubConstant(fun->result_size));
227 PatchInsertInput(node, nargs + 1, ref); 227 PatchInsertInput(node, nargs + 1, ref);
228 PatchInsertInput(node, nargs + 2, arity); 228 PatchInsertInput(node, nargs + 2, arity);
229 PatchOperator(node, common()->Call(desc)); 229 PatchOperator(node, common()->Call(desc));
230 } 230 }
231 231
232 232
233 void JSGenericLowering::LowerBranch(Node* node) { 233 void JSGenericLowering::LowerBranch(Node* node) {
234 if (!info()->is_typing_enabled()) { 234 if (!info()->is_typing_enabled()) {
235 // TODO(mstarzinger): If typing is enabled then simplified lowering will 235 // TODO(mstarzinger): If typing is enabled then simplified lowering will
236 // have inserted the correct ChangeBoolToBit, otherwise we need to perform 236 // have inserted the correct ChangeBoolToBit, otherwise we need to perform
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 444
445 void JSGenericLowering::LowerJSCallRuntime(Node* node) { 445 void JSGenericLowering::LowerJSCallRuntime(Node* node) {
446 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); 446 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op());
447 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); 447 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity()));
448 } 448 }
449 449
450 } // namespace compiler 450 } // namespace compiler
451 } // namespace internal 451 } // namespace internal
452 } // namespace v8 452 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-graph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698