| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |