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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1)); | 501 node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1)); |
502 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset( | 502 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset( |
503 static_cast<int>(access.index())))); | 503 static_cast<int>(access.index())))); |
504 NodeProperties::ChangeOp( | 504 NodeProperties::ChangeOp( |
505 node, machine()->Store(StoreRepresentation(MachineRepresentation::kTagged, | 505 node, machine()->Store(StoreRepresentation(MachineRepresentation::kTagged, |
506 kFullWriteBarrier))); | 506 kFullWriteBarrier))); |
507 } | 507 } |
508 | 508 |
509 | 509 |
510 void JSGenericLowering::LowerJSCreate(Node* node) { | 510 void JSGenericLowering::LowerJSCreate(Node* node) { |
511 ReplaceWithRuntimeCall(node, Runtime::kNewObject); | 511 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); |
| 512 Callable callable = CodeFactory::FastNewObject(isolate()); |
| 513 ReplaceWithStubCall(node, callable, flags); |
512 } | 514 } |
513 | 515 |
514 | 516 |
515 void JSGenericLowering::LowerJSCreateArguments(Node* node) { | 517 void JSGenericLowering::LowerJSCreateArguments(Node* node) { |
516 CreateArgumentsType const type = CreateArgumentsTypeOf(node->op()); | 518 CreateArgumentsType const type = CreateArgumentsTypeOf(node->op()); |
517 switch (type) { | 519 switch (type) { |
518 case CreateArgumentsType::kMappedArguments: | 520 case CreateArgumentsType::kMappedArguments: |
519 ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic); | 521 ReplaceWithRuntimeCall(node, Runtime::kNewSloppyArguments_Generic); |
520 break; | 522 break; |
521 case CreateArgumentsType::kUnmappedArguments: | 523 case CreateArgumentsType::kUnmappedArguments: |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 } | 861 } |
860 | 862 |
861 | 863 |
862 MachineOperatorBuilder* JSGenericLowering::machine() const { | 864 MachineOperatorBuilder* JSGenericLowering::machine() const { |
863 return jsgraph()->machine(); | 865 return jsgraph()->machine(); |
864 } | 866 } |
865 | 867 |
866 } // namespace compiler | 868 } // namespace compiler |
867 } // namespace internal | 869 } // namespace internal |
868 } // namespace v8 | 870 } // namespace v8 |
OLD | NEW |