| 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 : Runtime::kLoadLookupSlotNoReferenceError; | 449 : Runtime::kLoadLookupSlotNoReferenceError; |
| 450 Node* projection = graph()->NewNode(common()->Projection(0), node); | 450 Node* projection = graph()->NewNode(common()->Projection(0), node); |
| 451 NodeProperties::ReplaceUses(node, projection, node, node, node); | 451 NodeProperties::ReplaceUses(node, projection, node, node, node); |
| 452 node->RemoveInput(NodeProperties::FirstValueIndex(node)); | 452 node->RemoveInput(NodeProperties::FirstValueIndex(node)); |
| 453 node->InsertInput(zone(), 1, jsgraph()->Constant(access.name())); | 453 node->InsertInput(zone(), 1, jsgraph()->Constant(access.name())); |
| 454 ReplaceWithRuntimeCall(node, function_id); | 454 ReplaceWithRuntimeCall(node, function_id); |
| 455 projection->ReplaceInput(0, node); | 455 projection->ReplaceInput(0, node); |
| 456 } | 456 } |
| 457 | 457 |
| 458 | 458 |
| 459 void JSGenericLowering::LowerJSCreate(Node* node) { UNIMPLEMENTED(); } | 459 void JSGenericLowering::LowerJSCreate(Node* node) { |
| 460 // TODO(4544): The duplication of the constructor function is only valid if |
| 461 // actual constructor and original constructor coincide. Fix this! |
| 462 node->InsertInput(zone(), 1, node->InputAt(0)); // Duplicate constructor. |
| 463 ReplaceWithRuntimeCall(node, Runtime::kNewObject); |
| 464 } |
| 460 | 465 |
| 461 | 466 |
| 462 void JSGenericLowering::LowerJSCreateArguments(Node* node) { | 467 void JSGenericLowering::LowerJSCreateArguments(Node* node) { |
| 463 const CreateArgumentsParameters& p = CreateArgumentsParametersOf(node->op()); | 468 const CreateArgumentsParameters& p = CreateArgumentsParametersOf(node->op()); |
| 464 switch (p.type()) { | 469 switch (p.type()) { |
| 465 case CreateArgumentsParameters::kMappedArguments: | 470 case CreateArgumentsParameters::kMappedArguments: |
| 466 ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic); | 471 ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic); |
| 467 break; | 472 break; |
| 468 case CreateArgumentsParameters::kUnmappedArguments: | 473 case CreateArgumentsParameters::kUnmappedArguments: |
| 469 ReplaceWithRuntimeCall(node, Runtime::kNewStrictArguments_Generic); | 474 ReplaceWithRuntimeCall(node, Runtime::kNewStrictArguments_Generic); |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 } | 858 } |
| 854 | 859 |
| 855 | 860 |
| 856 MachineOperatorBuilder* JSGenericLowering::machine() const { | 861 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 857 return jsgraph()->machine(); | 862 return jsgraph()->machine(); |
| 858 } | 863 } |
| 859 | 864 |
| 860 } // namespace compiler | 865 } // namespace compiler |
| 861 } // namespace internal | 866 } // namespace internal |
| 862 } // namespace v8 | 867 } // namespace v8 |
| OLD | NEW |