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

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

Issue 1543253002: Basic TurboFan support for rest arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code 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/compiler/ast-graph-builder.cc ('k') | src/runtime/runtime.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/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 void JSGenericLowering::LowerJSCreateArguments(Node* node) { 456 void JSGenericLowering::LowerJSCreateArguments(Node* node) {
457 const CreateArgumentsParameters& p = CreateArgumentsParametersOf(node->op()); 457 const CreateArgumentsParameters& p = CreateArgumentsParametersOf(node->op());
458 switch (p.type()) { 458 switch (p.type()) {
459 case CreateArgumentsParameters::kMappedArguments: 459 case CreateArgumentsParameters::kMappedArguments:
460 ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic); 460 ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic);
461 break; 461 break;
462 case CreateArgumentsParameters::kUnmappedArguments: 462 case CreateArgumentsParameters::kUnmappedArguments:
463 ReplaceWithRuntimeCall(node, Runtime::kNewStrictArguments_Generic); 463 ReplaceWithRuntimeCall(node, Runtime::kNewStrictArguments_Generic);
464 break; 464 break;
465 case CreateArgumentsParameters::kRestArray: 465 case CreateArgumentsParameters::kRestArray:
466 UNIMPLEMENTED(); 466 node->InsertInput(zone(), 1, jsgraph()->Constant(p.start_index()));
467 ReplaceWithRuntimeCall(node, Runtime::kNewRestArguments_Generic);
467 break; 468 break;
468 } 469 }
469 } 470 }
470 471
471 472
472 void JSGenericLowering::LowerJSCreateArray(Node* node) { 473 void JSGenericLowering::LowerJSCreateArray(Node* node) {
473 CreateArrayParameters const& p = CreateArrayParametersOf(node->op()); 474 CreateArrayParameters const& p = CreateArrayParametersOf(node->op());
474 int const arity = static_cast<int>(p.arity()); 475 int const arity = static_cast<int>(p.arity());
475 Node* new_target = node->InputAt(1); 476 Node* new_target = node->InputAt(1);
476 // TODO(turbofan): We embed the AllocationSite from the Operator at this 477 // TODO(turbofan): We embed the AllocationSite from the Operator at this
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 } 871 }
871 872
872 873
873 MachineOperatorBuilder* JSGenericLowering::machine() const { 874 MachineOperatorBuilder* JSGenericLowering::machine() const {
874 return jsgraph()->machine(); 875 return jsgraph()->machine();
875 } 876 }
876 877
877 } // namespace compiler 878 } // namespace compiler
878 } // namespace internal 879 } // namespace internal
879 } // namespace v8 880 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698