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

Side by Side Diff: src/compiler/raw-machine-assembler.cc

Issue 2503523002: [Interpreter] Add CallRuntime() for 5 arguments. (Closed)
Patch Set: Created 4 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/compiler/raw-machine-assembler.h ('k') | no next file » | 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/compiler/raw-machine-assembler.h" 5 #include "src/compiler/raw-machine-assembler.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 #include "src/compiler/pipeline.h" 9 #include "src/compiler/pipeline.h"
10 #include "src/compiler/scheduler.h" 10 #include "src/compiler/scheduler.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode()); 270 Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode());
271 Node* ref = AddNode( 271 Node* ref = AddNode(
272 common()->ExternalConstant(ExternalReference(function, isolate()))); 272 common()->ExternalConstant(ExternalReference(function, isolate())));
273 Node* arity = Int32Constant(4); 273 Node* arity = Int32Constant(4);
274 274
275 return AddNode(common()->Call(descriptor), centry, arg1, arg2, arg3, arg4, 275 return AddNode(common()->Call(descriptor), centry, arg1, arg2, arg3, arg4,
276 ref, arity, context); 276 ref, arity, context);
277 } 277 }
278 278
279 Node* RawMachineAssembler::CallRuntime5(Runtime::FunctionId function,
280 Node* arg1, Node* arg2, Node* arg3,
281 Node* arg4, Node* arg5, Node* context) {
282 CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor(
283 zone(), function, 5, Operator::kNoProperties, CallDescriptor::kNoFlags);
284 int return_count = static_cast<int>(descriptor->ReturnCount());
285
286 Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode());
287 Node* ref = AddNode(
288 common()->ExternalConstant(ExternalReference(function, isolate())));
289 Node* arity = Int32Constant(5);
290
291 return AddNode(common()->Call(descriptor), centry, arg1, arg2, arg3, arg4,
292 arg5, ref, arity, context);
293 }
279 294
280 Node* RawMachineAssembler::TailCallN(CallDescriptor* desc, Node* function, 295 Node* RawMachineAssembler::TailCallN(CallDescriptor* desc, Node* function,
281 Node** args) { 296 Node** args) {
282 int param_count = static_cast<int>(desc->ParameterCount()); 297 int param_count = static_cast<int>(desc->ParameterCount());
283 int input_count = param_count + 1; 298 int input_count = param_count + 1;
284 Node** buffer = zone()->NewArray<Node*>(input_count); 299 Node** buffer = zone()->NewArray<Node*>(input_count);
285 int index = 0; 300 int index = 0;
286 buffer[index++] = function; 301 buffer[index++] = function;
287 for (int i = 0; i < param_count; i++) { 302 for (int i = 0; i < param_count; i++) {
288 buffer[index++] = args[i]; 303 buffer[index++] = args[i];
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 // The raw machine assembler nodes do not have effect and control inputs, 582 // The raw machine assembler nodes do not have effect and control inputs,
568 // so we disable checking input counts here. 583 // so we disable checking input counts here.
569 return graph()->NewNodeUnchecked(op, input_count, inputs); 584 return graph()->NewNodeUnchecked(op, input_count, inputs);
570 } 585 }
571 586
572 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); } 587 RawMachineLabel::~RawMachineLabel() { DCHECK(bound_ || !used_); }
573 588
574 } // namespace compiler 589 } // namespace compiler
575 } // namespace internal 590 } // namespace internal
576 } // namespace v8 591 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698