| 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 "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 6775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6786 } | 6786 } |
| 6787 | 6787 |
| 6788 void SetTransition(HConstant* transition) { | 6788 void SetTransition(HConstant* transition) { |
| 6789 ASSERT(!has_transition()); // Only set once. | 6789 ASSERT(!has_transition()); // Only set once. |
| 6790 SetOperandAt(2, transition); | 6790 SetOperandAt(2, transition); |
| 6791 has_transition_ = true; | 6791 has_transition_ = true; |
| 6792 SetChangesFlag(kMaps); | 6792 SetChangesFlag(kMaps); |
| 6793 } | 6793 } |
| 6794 | 6794 |
| 6795 bool NeedsWriteBarrier() const { | 6795 bool NeedsWriteBarrier() const { |
| 6796 ASSERT(!field_representation().IsDouble() || !has_transition()); | 6796 ASSERT(!field_representation().IsDouble() || |
| 6797 (FLAG_unbox_double_fields && access_.IsInobject()) || |
| 6798 !has_transition()); |
| 6797 if (field_representation().IsDouble()) return false; | 6799 if (field_representation().IsDouble()) return false; |
| 6798 if (field_representation().IsSmi()) return false; | 6800 if (field_representation().IsSmi()) return false; |
| 6799 if (field_representation().IsInteger32()) return false; | 6801 if (field_representation().IsInteger32()) return false; |
| 6800 if (field_representation().IsExternal()) return false; | 6802 if (field_representation().IsExternal()) return false; |
| 6801 return StoringValueNeedsWriteBarrier(value()) && | 6803 return StoringValueNeedsWriteBarrier(value()) && |
| 6802 ReceiverObjectNeedsWriteBarrier(object(), value(), dominator()); | 6804 ReceiverObjectNeedsWriteBarrier(object(), value(), dominator()); |
| 6803 } | 6805 } |
| 6804 | 6806 |
| 6805 bool NeedsWriteBarrierForMap() { | 6807 bool NeedsWriteBarrierForMap() { |
| 6806 return ReceiverObjectNeedsWriteBarrier(object(), transition(), | 6808 return ReceiverObjectNeedsWriteBarrier(object(), transition(), |
| (...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7814 }; | 7816 }; |
| 7815 | 7817 |
| 7816 | 7818 |
| 7817 | 7819 |
| 7818 #undef DECLARE_INSTRUCTION | 7820 #undef DECLARE_INSTRUCTION |
| 7819 #undef DECLARE_CONCRETE_INSTRUCTION | 7821 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7820 | 7822 |
| 7821 } } // namespace v8::internal | 7823 } } // namespace v8::internal |
| 7822 | 7824 |
| 7823 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7825 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |