OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 6925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6936 } | 6936 } |
6937 | 6937 |
6938 void SetTransition(HConstant* transition) { | 6938 void SetTransition(HConstant* transition) { |
6939 DCHECK(!has_transition()); // Only set once. | 6939 DCHECK(!has_transition()); // Only set once. |
6940 SetOperandAt(2, transition); | 6940 SetOperandAt(2, transition); |
6941 bit_field_ = HasTransitionField::update(bit_field_, true); | 6941 bit_field_ = HasTransitionField::update(bit_field_, true); |
6942 SetChangesFlag(kMaps); | 6942 SetChangesFlag(kMaps); |
6943 } | 6943 } |
6944 | 6944 |
6945 bool NeedsWriteBarrier() const { | 6945 bool NeedsWriteBarrier() const { |
6946 DCHECK(!field_representation().IsDouble() || !has_transition()); | 6946 DCHECK(!field_representation().IsDouble() || |
| 6947 (FLAG_unbox_double_fields && access_.IsInobject()) || |
| 6948 !has_transition()); |
6947 if (field_representation().IsDouble()) return false; | 6949 if (field_representation().IsDouble()) return false; |
6948 if (field_representation().IsSmi()) return false; | 6950 if (field_representation().IsSmi()) return false; |
6949 if (field_representation().IsInteger32()) return false; | 6951 if (field_representation().IsInteger32()) return false; |
6950 if (field_representation().IsExternal()) return false; | 6952 if (field_representation().IsExternal()) return false; |
6951 return StoringValueNeedsWriteBarrier(value()) && | 6953 return StoringValueNeedsWriteBarrier(value()) && |
6952 ReceiverObjectNeedsWriteBarrier(object(), value(), dominator()); | 6954 ReceiverObjectNeedsWriteBarrier(object(), value(), dominator()); |
6953 } | 6955 } |
6954 | 6956 |
6955 bool NeedsWriteBarrierForMap() { | 6957 bool NeedsWriteBarrierForMap() { |
6956 return ReceiverObjectNeedsWriteBarrier(object(), transition(), | 6958 return ReceiverObjectNeedsWriteBarrier(object(), transition(), |
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7978 }; | 7980 }; |
7979 | 7981 |
7980 | 7982 |
7981 | 7983 |
7982 #undef DECLARE_INSTRUCTION | 7984 #undef DECLARE_INSTRUCTION |
7983 #undef DECLARE_CONCRETE_INSTRUCTION | 7985 #undef DECLARE_CONCRETE_INSTRUCTION |
7984 | 7986 |
7985 } } // namespace v8::internal | 7987 } } // namespace v8::internal |
7986 | 7988 |
7987 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7989 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |