| 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 NodeProperties::GetValueInput(node, 0), | 421 NodeProperties::GetValueInput(node, 0), |
| 422 jsgraph()->Int32Constant( | 422 jsgraph()->Int32Constant( |
| 423 Context::SlotOffset(Context::PREVIOUS_INDEX)), | 423 Context::SlotOffset(Context::PREVIOUS_INDEX)), |
| 424 NodeProperties::GetEffectInput(node), | 424 NodeProperties::GetEffectInput(node), |
| 425 graph()->start())); | 425 graph()->start())); |
| 426 } | 426 } |
| 427 node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1)); | 427 node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1)); |
| 428 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset( | 428 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset( |
| 429 static_cast<int>(access.index())))); | 429 static_cast<int>(access.index())))); |
| 430 NodeProperties::ChangeOp( | 430 NodeProperties::ChangeOp( |
| 431 node, machine()->Store(StoreRepresentation(MachineType::AnyTagged(), | 431 node, machine()->Store(StoreRepresentation(MachineRepresentation::kTagged, |
| 432 kFullWriteBarrier))); | 432 kFullWriteBarrier))); |
| 433 } | 433 } |
| 434 | 434 |
| 435 | 435 |
| 436 void JSGenericLowering::LowerJSLoadDynamic(Node* node) { | 436 void JSGenericLowering::LowerJSLoadDynamic(Node* node) { |
| 437 const DynamicAccess& access = DynamicAccessOf(node->op()); | 437 const DynamicAccess& access = DynamicAccessOf(node->op()); |
| 438 Runtime::FunctionId function_id = | 438 Runtime::FunctionId function_id = |
| 439 (access.typeof_mode() == NOT_INSIDE_TYPEOF) | 439 (access.typeof_mode() == NOT_INSIDE_TYPEOF) |
| 440 ? Runtime::kLoadLookupSlot | 440 ? Runtime::kLoadLookupSlot |
| 441 : Runtime::kLoadLookupSlotNoReferenceError; | 441 : Runtime::kLoadLookupSlotNoReferenceError; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 NodeProperties::ChangeOp(node, machine()->Load(MachineType::AnyTagged())); | 813 NodeProperties::ChangeOp(node, machine()->Load(MachineType::AnyTagged())); |
| 814 } | 814 } |
| 815 | 815 |
| 816 | 816 |
| 817 void JSGenericLowering::LowerJSStoreMessage(Node* node) { | 817 void JSGenericLowering::LowerJSStoreMessage(Node* node) { |
| 818 ExternalReference message_address = | 818 ExternalReference message_address = |
| 819 ExternalReference::address_of_pending_message_obj(isolate()); | 819 ExternalReference::address_of_pending_message_obj(isolate()); |
| 820 node->RemoveInput(NodeProperties::FirstContextIndex(node)); | 820 node->RemoveInput(NodeProperties::FirstContextIndex(node)); |
| 821 node->InsertInput(zone(), 0, jsgraph()->ExternalConstant(message_address)); | 821 node->InsertInput(zone(), 0, jsgraph()->ExternalConstant(message_address)); |
| 822 node->InsertInput(zone(), 1, jsgraph()->IntPtrConstant(0)); | 822 node->InsertInput(zone(), 1, jsgraph()->IntPtrConstant(0)); |
| 823 StoreRepresentation representation(MachineType::AnyTagged(), kNoWriteBarrier); | 823 StoreRepresentation representation(MachineRepresentation::kTagged, |
| 824 kNoWriteBarrier); |
| 824 NodeProperties::ChangeOp(node, machine()->Store(representation)); | 825 NodeProperties::ChangeOp(node, machine()->Store(representation)); |
| 825 } | 826 } |
| 826 | 827 |
| 827 | 828 |
| 828 void JSGenericLowering::LowerJSYield(Node* node) { UNIMPLEMENTED(); } | 829 void JSGenericLowering::LowerJSYield(Node* node) { UNIMPLEMENTED(); } |
| 829 | 830 |
| 830 | 831 |
| 831 void JSGenericLowering::LowerJSStackCheck(Node* node) { | 832 void JSGenericLowering::LowerJSStackCheck(Node* node) { |
| 832 Node* effect = NodeProperties::GetEffectInput(node); | 833 Node* effect = NodeProperties::GetEffectInput(node); |
| 833 Node* control = NodeProperties::GetControlInput(node); | 834 Node* control = NodeProperties::GetControlInput(node); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 } | 886 } |
| 886 | 887 |
| 887 | 888 |
| 888 MachineOperatorBuilder* JSGenericLowering::machine() const { | 889 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 889 return jsgraph()->machine(); | 890 return jsgraph()->machine(); |
| 890 } | 891 } |
| 891 | 892 |
| 892 } // namespace compiler | 893 } // namespace compiler |
| 893 } // namespace internal | 894 } // namespace internal |
| 894 } // namespace v8 | 895 } // namespace v8 |
| OLD | NEW |