| 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 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 common()->FrameState(BailoutId::None(), | 842 common()->FrameState(BailoutId::None(), |
| 843 OutputFrameStateCombine::Ignore(), | 843 OutputFrameStateCombine::Ignore(), |
| 844 frame_info0), | 844 frame_info0), |
| 845 graph()->NewNode(common()->StateValues(1), receiver), | 845 graph()->NewNode(common()->StateValues(1), receiver), |
| 846 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), | 846 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), |
| 847 context, target, frame_state); | 847 context, target, frame_state); |
| 848 | 848 |
| 849 // Introduce the call to the getter function. | 849 // Introduce the call to the getter function. |
| 850 value = effect = graph()->NewNode( | 850 value = effect = graph()->NewNode( |
| 851 javascript()->CallFunction( | 851 javascript()->CallFunction( |
| 852 2, VectorSlotPair(), ConvertReceiverMode::kNotNullOrUndefined), | 852 2, 0.0f, VectorSlotPair(), |
| 853 ConvertReceiverMode::kNotNullOrUndefined), |
| 853 target, receiver, context, frame_state0, effect, control); | 854 target, receiver, context, frame_state0, effect, control); |
| 854 control = graph()->NewNode(common()->IfSuccess(), value); | 855 control = graph()->NewNode(common()->IfSuccess(), value); |
| 855 break; | 856 break; |
| 856 } | 857 } |
| 857 case AccessMode::kStore: { | 858 case AccessMode::kStore: { |
| 858 // We need a FrameState for the setter stub to restore the correct | 859 // We need a FrameState for the setter stub to restore the correct |
| 859 // context and return the appropriate value to fullcodegen. | 860 // context and return the appropriate value to fullcodegen. |
| 860 FrameStateFunctionInfo const* frame_info0 = | 861 FrameStateFunctionInfo const* frame_info0 = |
| 861 common()->CreateFrameStateFunctionInfo(FrameStateType::kSetterStub, | 862 common()->CreateFrameStateFunctionInfo(FrameStateType::kSetterStub, |
| 862 2, 0, shared_info); | 863 2, 0, shared_info); |
| 863 Node* frame_state0 = graph()->NewNode( | 864 Node* frame_state0 = graph()->NewNode( |
| 864 common()->FrameState(BailoutId::None(), | 865 common()->FrameState(BailoutId::None(), |
| 865 OutputFrameStateCombine::Ignore(), | 866 OutputFrameStateCombine::Ignore(), |
| 866 frame_info0), | 867 frame_info0), |
| 867 graph()->NewNode(common()->StateValues(2), receiver, value), | 868 graph()->NewNode(common()->StateValues(2), receiver, value), |
| 868 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), | 869 jsgraph()->EmptyStateValues(), jsgraph()->EmptyStateValues(), |
| 869 context, target, frame_state); | 870 context, target, frame_state); |
| 870 | 871 |
| 871 // Introduce the call to the setter function. | 872 // Introduce the call to the setter function. |
| 872 effect = graph()->NewNode( | 873 effect = graph()->NewNode(javascript()->CallFunction( |
| 873 javascript()->CallFunction( | 874 3, 0.0f, VectorSlotPair(), |
| 874 3, VectorSlotPair(), ConvertReceiverMode::kNotNullOrUndefined), | 875 ConvertReceiverMode::kNotNullOrUndefined), |
| 875 target, receiver, value, context, frame_state0, effect, control); | 876 target, receiver, value, context, |
| 877 frame_state0, effect, control); |
| 876 control = graph()->NewNode(common()->IfSuccess(), effect); | 878 control = graph()->NewNode(common()->IfSuccess(), effect); |
| 877 break; | 879 break; |
| 878 } | 880 } |
| 879 } | 881 } |
| 880 } else { | 882 } else { |
| 881 DCHECK(access_info.IsDataField()); | 883 DCHECK(access_info.IsDataField()); |
| 882 FieldIndex const field_index = access_info.field_index(); | 884 FieldIndex const field_index = access_info.field_index(); |
| 883 Type* const field_type = access_info.field_type(); | 885 Type* const field_type = access_info.field_type(); |
| 884 MachineRepresentation const field_representation = | 886 MachineRepresentation const field_representation = |
| 885 access_info.field_representation(); | 887 access_info.field_representation(); |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 } | 1515 } |
| 1514 | 1516 |
| 1515 | 1517 |
| 1516 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { | 1518 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { |
| 1517 return jsgraph()->simplified(); | 1519 return jsgraph()->simplified(); |
| 1518 } | 1520 } |
| 1519 | 1521 |
| 1520 } // namespace compiler | 1522 } // namespace compiler |
| 1521 } // namespace internal | 1523 } // namespace internal |
| 1522 } // namespace v8 | 1524 } // namespace v8 |
| OLD | NEW |