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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 } | 765 } |
766 } | 766 } |
767 } | 767 } |
768 | 768 |
769 | 769 |
770 void JSGenericLowering::LowerJSForInStep(Node* node) { | 770 void JSGenericLowering::LowerJSForInStep(Node* node) { |
771 ReplaceWithRuntimeCall(node, Runtime::kForInStep); | 771 ReplaceWithRuntimeCall(node, Runtime::kForInStep); |
772 } | 772 } |
773 | 773 |
774 | 774 |
| 775 void JSGenericLowering::LowerJSLoadMessage(Node* node) { |
| 776 ExternalReference message_address = |
| 777 ExternalReference::address_of_pending_message_obj(isolate()); |
| 778 node->RemoveInput(NodeProperties::FirstContextIndex(node)); |
| 779 node->InsertInput(zone(), 0, jsgraph()->ExternalConstant(message_address)); |
| 780 node->InsertInput(zone(), 1, jsgraph()->IntPtrConstant(0)); |
| 781 NodeProperties::ChangeOp(node, machine()->Load(kMachAnyTagged)); |
| 782 } |
| 783 |
| 784 |
| 785 void JSGenericLowering::LowerJSStoreMessage(Node* node) { |
| 786 ExternalReference message_address = |
| 787 ExternalReference::address_of_pending_message_obj(isolate()); |
| 788 node->RemoveInput(NodeProperties::FirstContextIndex(node)); |
| 789 node->InsertInput(zone(), 0, jsgraph()->ExternalConstant(message_address)); |
| 790 node->InsertInput(zone(), 1, jsgraph()->IntPtrConstant(0)); |
| 791 StoreRepresentation representation(kMachAnyTagged, kNoWriteBarrier); |
| 792 NodeProperties::ChangeOp(node, machine()->Store(representation)); |
| 793 } |
| 794 |
| 795 |
775 void JSGenericLowering::LowerJSYield(Node* node) { UNIMPLEMENTED(); } | 796 void JSGenericLowering::LowerJSYield(Node* node) { UNIMPLEMENTED(); } |
776 | 797 |
777 | 798 |
778 void JSGenericLowering::LowerJSStackCheck(Node* node) { | 799 void JSGenericLowering::LowerJSStackCheck(Node* node) { |
779 Node* effect = NodeProperties::GetEffectInput(node); | 800 Node* effect = NodeProperties::GetEffectInput(node); |
780 Node* control = NodeProperties::GetControlInput(node); | 801 Node* control = NodeProperties::GetControlInput(node); |
781 | 802 |
782 Node* limit = graph()->NewNode( | 803 Node* limit = graph()->NewNode( |
783 machine()->Load(kMachPtr), | 804 machine()->Load(kMachPtr), |
784 jsgraph()->ExternalConstant( | 805 jsgraph()->ExternalConstant( |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 } | 853 } |
833 | 854 |
834 | 855 |
835 MachineOperatorBuilder* JSGenericLowering::machine() const { | 856 MachineOperatorBuilder* JSGenericLowering::machine() const { |
836 return jsgraph()->machine(); | 857 return jsgraph()->machine(); |
837 } | 858 } |
838 | 859 |
839 } // namespace compiler | 860 } // namespace compiler |
840 } // namespace internal | 861 } // namespace internal |
841 } // namespace v8 | 862 } // namespace v8 |
OLD | NEW |