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 6869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6880 } | 6880 } |
6881 | 6881 |
6882 void SetTransition(HConstant* transition) { | 6882 void SetTransition(HConstant* transition) { |
6883 DCHECK(!has_transition()); // Only set once. | 6883 DCHECK(!has_transition()); // Only set once. |
6884 SetOperandAt(2, transition); | 6884 SetOperandAt(2, transition); |
6885 has_transition_ = true; | 6885 has_transition_ = true; |
6886 SetChangesFlag(kMaps); | 6886 SetChangesFlag(kMaps); |
6887 } | 6887 } |
6888 | 6888 |
6889 bool NeedsWriteBarrier() const { | 6889 bool NeedsWriteBarrier() const { |
6890 DCHECK(!field_representation().IsDouble() || !has_transition()); | 6890 DCHECK(!field_representation().IsDouble() || |
| 6891 (FLAG_unbox_double_fields && access_.IsInobject()) || |
| 6892 !has_transition()); |
6891 if (field_representation().IsDouble()) return false; | 6893 if (field_representation().IsDouble()) return false; |
6892 if (field_representation().IsSmi()) return false; | 6894 if (field_representation().IsSmi()) return false; |
6893 if (field_representation().IsInteger32()) return false; | 6895 if (field_representation().IsInteger32()) return false; |
6894 if (field_representation().IsExternal()) return false; | 6896 if (field_representation().IsExternal()) return false; |
6895 return StoringValueNeedsWriteBarrier(value()) && | 6897 return StoringValueNeedsWriteBarrier(value()) && |
6896 ReceiverObjectNeedsWriteBarrier(object(), value(), dominator()); | 6898 ReceiverObjectNeedsWriteBarrier(object(), value(), dominator()); |
6897 } | 6899 } |
6898 | 6900 |
6899 bool NeedsWriteBarrierForMap() { | 6901 bool NeedsWriteBarrierForMap() { |
6900 return ReceiverObjectNeedsWriteBarrier(object(), transition(), | 6902 return ReceiverObjectNeedsWriteBarrier(object(), transition(), |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7906 }; | 7908 }; |
7907 | 7909 |
7908 | 7910 |
7909 | 7911 |
7910 #undef DECLARE_INSTRUCTION | 7912 #undef DECLARE_INSTRUCTION |
7911 #undef DECLARE_CONCRETE_INSTRUCTION | 7913 #undef DECLARE_CONCRETE_INSTRUCTION |
7912 | 7914 |
7913 } } // namespace v8::internal | 7915 } } // namespace v8::internal |
7914 | 7916 |
7915 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7917 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |