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 "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 #include "allocation.h" | 10 #include "allocation.h" |
(...skipping 6645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6656 ReceiverObjectNeedsWriteBarrier(object(), value(), | 6656 ReceiverObjectNeedsWriteBarrier(object(), value(), |
6657 new_space_dominator()); | 6657 new_space_dominator()); |
6658 } | 6658 } |
6659 | 6659 |
6660 bool NeedsWriteBarrierForMap() { | 6660 bool NeedsWriteBarrierForMap() { |
6661 if (IsSkipWriteBarrier()) return false; | 6661 if (IsSkipWriteBarrier()) return false; |
6662 return ReceiverObjectNeedsWriteBarrier(object(), transition(), | 6662 return ReceiverObjectNeedsWriteBarrier(object(), transition(), |
6663 new_space_dominator()); | 6663 new_space_dominator()); |
6664 } | 6664 } |
6665 | 6665 |
| 6666 SmiCheck SmiCheckForWriteBarrier() const { |
| 6667 if (field_representation().IsHeapObject()) return OMIT_SMI_CHECK; |
| 6668 if (value()->IsHeapObject()) return OMIT_SMI_CHECK; |
| 6669 return INLINE_SMI_CHECK; |
| 6670 } |
| 6671 |
6666 Representation field_representation() const { | 6672 Representation field_representation() const { |
6667 return access_.representation(); | 6673 return access_.representation(); |
6668 } | 6674 } |
6669 | 6675 |
6670 void UpdateValue(HValue* value) { | 6676 void UpdateValue(HValue* value) { |
6671 SetOperandAt(1, value); | 6677 SetOperandAt(1, value); |
6672 } | 6678 } |
6673 | 6679 |
6674 private: | 6680 private: |
6675 HStoreNamedField(HValue* obj, | 6681 HStoreNamedField(HValue* obj, |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7584 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7590 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7585 }; | 7591 }; |
7586 | 7592 |
7587 | 7593 |
7588 #undef DECLARE_INSTRUCTION | 7594 #undef DECLARE_INSTRUCTION |
7589 #undef DECLARE_CONCRETE_INSTRUCTION | 7595 #undef DECLARE_CONCRETE_INSTRUCTION |
7590 | 7596 |
7591 } } // namespace v8::internal | 7597 } } // namespace v8::internal |
7592 | 7598 |
7593 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7599 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |