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 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 case AccessMode::kLoad: { | 999 case AccessMode::kLoad: { |
1000 // We need a FrameState for the getter stub to restore the correct | 1000 // We need a FrameState for the getter stub to restore the correct |
1001 // context before returning to fullcodegen. | 1001 // context before returning to fullcodegen. |
1002 FrameStateFunctionInfo const* frame_info0 = | 1002 FrameStateFunctionInfo const* frame_info0 = |
1003 common()->CreateFrameStateFunctionInfo(FrameStateType::kGetterStub, | 1003 common()->CreateFrameStateFunctionInfo(FrameStateType::kGetterStub, |
1004 1, 0, shared_info); | 1004 1, 0, shared_info); |
1005 Node* frame_state0 = graph()->NewNode( | 1005 Node* frame_state0 = graph()->NewNode( |
1006 common()->FrameState(BailoutId::None(), | 1006 common()->FrameState(BailoutId::None(), |
1007 OutputFrameStateCombine::Ignore(), | 1007 OutputFrameStateCombine::Ignore(), |
1008 frame_info0), | 1008 frame_info0), |
1009 graph()->NewNode(common()->StateValues(1), receiver), | 1009 graph()->NewNode(common()->StateValues(1, SparseInputMask::Dense()), |
| 1010 receiver), |
1010 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), | 1011 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), |
1011 context, target, frame_state); | 1012 context, target, frame_state); |
1012 | 1013 |
1013 // Introduce the call to the getter function. | 1014 // Introduce the call to the getter function. |
1014 if (access_info.constant()->IsJSFunction()) { | 1015 if (access_info.constant()->IsJSFunction()) { |
1015 value = effect = graph()->NewNode( | 1016 value = effect = graph()->NewNode( |
1016 javascript()->CallFunction( | 1017 javascript()->CallFunction( |
1017 2, 0.0f, VectorSlotPair(), | 1018 2, 0.0f, VectorSlotPair(), |
1018 ConvertReceiverMode::kNotNullOrUndefined), | 1019 ConvertReceiverMode::kNotNullOrUndefined), |
1019 target, receiver, context, frame_state0, effect, control); | 1020 target, receiver, context, frame_state0, effect, control); |
(...skipping 16 matching lines...) Expand all Loading... |
1036 case AccessMode::kStore: { | 1037 case AccessMode::kStore: { |
1037 // We need a FrameState for the setter stub to restore the correct | 1038 // We need a FrameState for the setter stub to restore the correct |
1038 // context and return the appropriate value to fullcodegen. | 1039 // context and return the appropriate value to fullcodegen. |
1039 FrameStateFunctionInfo const* frame_info0 = | 1040 FrameStateFunctionInfo const* frame_info0 = |
1040 common()->CreateFrameStateFunctionInfo(FrameStateType::kSetterStub, | 1041 common()->CreateFrameStateFunctionInfo(FrameStateType::kSetterStub, |
1041 2, 0, shared_info); | 1042 2, 0, shared_info); |
1042 Node* frame_state0 = graph()->NewNode( | 1043 Node* frame_state0 = graph()->NewNode( |
1043 common()->FrameState(BailoutId::None(), | 1044 common()->FrameState(BailoutId::None(), |
1044 OutputFrameStateCombine::Ignore(), | 1045 OutputFrameStateCombine::Ignore(), |
1045 frame_info0), | 1046 frame_info0), |
1046 graph()->NewNode(common()->StateValues(2), receiver, value), | 1047 graph()->NewNode(common()->StateValues(2, SparseInputMask::Dense()), |
| 1048 receiver, value), |
1047 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), | 1049 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), |
1048 context, target, frame_state); | 1050 context, target, frame_state); |
1049 | 1051 |
1050 // Introduce the call to the setter function. | 1052 // Introduce the call to the setter function. |
1051 if (access_info.constant()->IsJSFunction()) { | 1053 if (access_info.constant()->IsJSFunction()) { |
1052 effect = graph()->NewNode( | 1054 effect = graph()->NewNode( |
1053 javascript()->CallFunction( | 1055 javascript()->CallFunction( |
1054 3, 0.0f, VectorSlotPair(), | 1056 3, 0.0f, VectorSlotPair(), |
1055 ConvertReceiverMode::kNotNullOrUndefined), | 1057 ConvertReceiverMode::kNotNullOrUndefined), |
1056 target, receiver, value, context, frame_state0, effect, control); | 1058 target, receiver, value, context, frame_state0, effect, control); |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 return jsgraph()->javascript(); | 1834 return jsgraph()->javascript(); |
1833 } | 1835 } |
1834 | 1836 |
1835 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { | 1837 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { |
1836 return jsgraph()->simplified(); | 1838 return jsgraph()->simplified(); |
1837 } | 1839 } |
1838 | 1840 |
1839 } // namespace compiler | 1841 } // namespace compiler |
1840 } // namespace internal | 1842 } // namespace internal |
1841 } // namespace v8 | 1843 } // namespace v8 |
OLD | NEW |