| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler/js-native-context-specialization.h" | 5 #include "src/compiler/js-native-context-specialization.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
| 10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 case AccessMode::kLoad: { | 885 case AccessMode::kLoad: { |
| 886 // We need a FrameState for the getter stub to restore the correct | 886 // We need a FrameState for the getter stub to restore the correct |
| 887 // context before returning to fullcodegen. | 887 // context before returning to fullcodegen. |
| 888 FrameStateFunctionInfo const* frame_info0 = | 888 FrameStateFunctionInfo const* frame_info0 = |
| 889 common()->CreateFrameStateFunctionInfo(FrameStateType::kGetterStub, | 889 common()->CreateFrameStateFunctionInfo(FrameStateType::kGetterStub, |
| 890 1, 0, shared_info); | 890 1, 0, shared_info); |
| 891 Node* frame_state0 = graph()->NewNode( | 891 Node* frame_state0 = graph()->NewNode( |
| 892 common()->FrameState(BailoutId::None(), | 892 common()->FrameState(BailoutId::None(), |
| 893 OutputFrameStateCombine::Ignore(), | 893 OutputFrameStateCombine::Ignore(), |
| 894 frame_info0), | 894 frame_info0), |
| 895 graph()->NewNode(common()->StateValues(1), receiver), | 895 graph()->NewNode(common()->StateValues(1, 0u), receiver), |
| 896 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), | 896 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), |
| 897 context, target, frame_state); | 897 context, target, frame_state); |
| 898 | 898 |
| 899 // Introduce the call to the getter function. | 899 // Introduce the call to the getter function. |
| 900 if (access_info.constant()->IsJSFunction()) { | 900 if (access_info.constant()->IsJSFunction()) { |
| 901 value = effect = graph()->NewNode( | 901 value = effect = graph()->NewNode( |
| 902 javascript()->CallFunction( | 902 javascript()->CallFunction( |
| 903 2, 0.0f, VectorSlotPair(), | 903 2, 0.0f, VectorSlotPair(), |
| 904 ConvertReceiverMode::kNotNullOrUndefined), | 904 ConvertReceiverMode::kNotNullOrUndefined), |
| 905 target, receiver, context, frame_state0, effect, control); | 905 target, receiver, context, frame_state0, effect, control); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 922 case AccessMode::kStore: { | 922 case AccessMode::kStore: { |
| 923 // We need a FrameState for the setter stub to restore the correct | 923 // We need a FrameState for the setter stub to restore the correct |
| 924 // context and return the appropriate value to fullcodegen. | 924 // context and return the appropriate value to fullcodegen. |
| 925 FrameStateFunctionInfo const* frame_info0 = | 925 FrameStateFunctionInfo const* frame_info0 = |
| 926 common()->CreateFrameStateFunctionInfo(FrameStateType::kSetterStub, | 926 common()->CreateFrameStateFunctionInfo(FrameStateType::kSetterStub, |
| 927 2, 0, shared_info); | 927 2, 0, shared_info); |
| 928 Node* frame_state0 = graph()->NewNode( | 928 Node* frame_state0 = graph()->NewNode( |
| 929 common()->FrameState(BailoutId::None(), | 929 common()->FrameState(BailoutId::None(), |
| 930 OutputFrameStateCombine::Ignore(), | 930 OutputFrameStateCombine::Ignore(), |
| 931 frame_info0), | 931 frame_info0), |
| 932 graph()->NewNode(common()->StateValues(2), receiver, value), | 932 graph()->NewNode(common()->StateValues(2, 0u), receiver, value), |
| 933 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), | 933 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), |
| 934 context, target, frame_state); | 934 context, target, frame_state); |
| 935 | 935 |
| 936 // Introduce the call to the setter function. | 936 // Introduce the call to the setter function. |
| 937 if (access_info.constant()->IsJSFunction()) { | 937 if (access_info.constant()->IsJSFunction()) { |
| 938 effect = graph()->NewNode( | 938 effect = graph()->NewNode( |
| 939 javascript()->CallFunction( | 939 javascript()->CallFunction( |
| 940 3, 0.0f, VectorSlotPair(), | 940 3, 0.0f, VectorSlotPair(), |
| 941 ConvertReceiverMode::kNotNullOrUndefined), | 941 ConvertReceiverMode::kNotNullOrUndefined), |
| 942 target, receiver, value, context, frame_state0, effect, control); | 942 target, receiver, value, context, frame_state0, effect, control); |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 return jsgraph()->javascript(); | 1653 return jsgraph()->javascript(); |
| 1654 } | 1654 } |
| 1655 | 1655 |
| 1656 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { | 1656 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { |
| 1657 return jsgraph()->simplified(); | 1657 return jsgraph()->simplified(); |
| 1658 } | 1658 } |
| 1659 | 1659 |
| 1660 } // namespace compiler | 1660 } // namespace compiler |
| 1661 } // namespace internal | 1661 } // namespace internal |
| 1662 } // namespace v8 | 1662 } // namespace v8 |
| OLD | NEW |