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 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 5107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5118 STATIC_ASSERT(holder::offset % kPointerSize == 0); \ | 5118 STATIC_ASSERT(holder::offset % kPointerSize == 0); \ |
5119 int holder::name() { \ | 5119 int holder::name() { \ |
5120 int value = READ_INT_FIELD(this, offset); \ | 5120 int value = READ_INT_FIELD(this, offset); \ |
5121 ASSERT(kHeapObjectTag == 1); \ | 5121 ASSERT(kHeapObjectTag == 1); \ |
5122 ASSERT((value & kHeapObjectTag) == 0); \ | 5122 ASSERT((value & kHeapObjectTag) == 0); \ |
5123 return value >> 1; \ | 5123 return value >> 1; \ |
5124 } \ | 5124 } \ |
5125 void holder::set_##name(int value) { \ | 5125 void holder::set_##name(int value) { \ |
5126 ASSERT(kHeapObjectTag == 1); \ | 5126 ASSERT(kHeapObjectTag == 1); \ |
5127 ASSERT((value & 0xC0000000) == 0xC0000000 || \ | 5127 ASSERT((value & 0xC0000000) == 0xC0000000 || \ |
5128 (value & 0xC0000000) == 0x000000000); \ | 5128 (value & 0xC0000000) == 0x0); \ |
5129 WRITE_INT_FIELD(this, \ | 5129 WRITE_INT_FIELD(this, \ |
5130 offset, \ | 5130 offset, \ |
5131 (value << 1) & ~kHeapObjectTag); \ | 5131 (value << 1) & ~kHeapObjectTag); \ |
5132 } | 5132 } |
5133 | 5133 |
5134 #define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \ | 5134 #define PSEUDO_SMI_ACCESSORS_HI(holder, name, offset) \ |
5135 STATIC_ASSERT(holder::offset % kPointerSize == kIntSize); \ | 5135 STATIC_ASSERT(holder::offset % kPointerSize == kIntSize); \ |
5136 INT_ACCESSORS(holder, name, offset) | 5136 INT_ACCESSORS(holder, name, offset) |
5137 | 5137 |
5138 | 5138 |
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6855 #undef READ_SHORT_FIELD | 6855 #undef READ_SHORT_FIELD |
6856 #undef WRITE_SHORT_FIELD | 6856 #undef WRITE_SHORT_FIELD |
6857 #undef READ_BYTE_FIELD | 6857 #undef READ_BYTE_FIELD |
6858 #undef WRITE_BYTE_FIELD | 6858 #undef WRITE_BYTE_FIELD |
6859 #undef NOBARRIER_READ_BYTE_FIELD | 6859 #undef NOBARRIER_READ_BYTE_FIELD |
6860 #undef NOBARRIER_WRITE_BYTE_FIELD | 6860 #undef NOBARRIER_WRITE_BYTE_FIELD |
6861 | 6861 |
6862 } } // namespace v8::internal | 6862 } } // namespace v8::internal |
6863 | 6863 |
6864 #endif // V8_OBJECTS_INL_H_ | 6864 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |