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 6014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6025 | 6025 |
6026 | 6026 |
6027 void JSProxy::InitializeBody(int object_size, Object* value) { | 6027 void JSProxy::InitializeBody(int object_size, Object* value) { |
6028 ASSERT(!value->IsHeapObject() || !GetHeap()->InNewSpace(value)); | 6028 ASSERT(!value->IsHeapObject() || !GetHeap()->InNewSpace(value)); |
6029 for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) { | 6029 for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) { |
6030 WRITE_FIELD(this, offset, value); | 6030 WRITE_FIELD(this, offset, value); |
6031 } | 6031 } |
6032 } | 6032 } |
6033 | 6033 |
6034 | 6034 |
6035 ACCESSORS(JSCollection, table, Object, kTableOffset) | 6035 ACCESSORS(JSSet, table, Object, kTableOffset) |
| 6036 ACCESSORS(JSMap, table, Object, kTableOffset) |
6036 | 6037 |
6037 | 6038 |
6038 #define ORDERED_HASH_TABLE_ITERATOR_ACCESSORS(name, type, offset) \ | 6039 #define ORDERED_HASH_TABLE_ITERATOR_ACCESSORS(name, type, offset) \ |
6039 template<class Derived, class TableType> \ | 6040 template<class Derived, class TableType> \ |
6040 type* OrderedHashTableIterator<Derived, TableType>::name() const { \ | 6041 type* OrderedHashTableIterator<Derived, TableType>::name() const { \ |
6041 return type::cast(READ_FIELD(this, offset)); \ | 6042 return type::cast(READ_FIELD(this, offset)); \ |
6042 } \ | 6043 } \ |
6043 template<class Derived, class TableType> \ | 6044 template<class Derived, class TableType> \ |
6044 void OrderedHashTableIterator<Derived, TableType>::set_##name( \ | 6045 void OrderedHashTableIterator<Derived, TableType>::set_##name( \ |
6045 type* value, WriteBarrierMode mode) { \ | 6046 type* value, WriteBarrierMode mode) { \ |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7186 #undef READ_SHORT_FIELD | 7187 #undef READ_SHORT_FIELD |
7187 #undef WRITE_SHORT_FIELD | 7188 #undef WRITE_SHORT_FIELD |
7188 #undef READ_BYTE_FIELD | 7189 #undef READ_BYTE_FIELD |
7189 #undef WRITE_BYTE_FIELD | 7190 #undef WRITE_BYTE_FIELD |
7190 #undef NOBARRIER_READ_BYTE_FIELD | 7191 #undef NOBARRIER_READ_BYTE_FIELD |
7191 #undef NOBARRIER_WRITE_BYTE_FIELD | 7192 #undef NOBARRIER_WRITE_BYTE_FIELD |
7192 | 7193 |
7193 } } // namespace v8::internal | 7194 } } // namespace v8::internal |
7194 | 7195 |
7195 #endif // V8_OBJECTS_INL_H_ | 7196 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |