| 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 6384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6395 set_literals_or_bindings(bindings); | 6395 set_literals_or_bindings(bindings); |
| 6396 } | 6396 } |
| 6397 | 6397 |
| 6398 | 6398 |
| 6399 int JSFunction::NumberOfLiterals() { | 6399 int JSFunction::NumberOfLiterals() { |
| 6400 DCHECK(!shared()->bound()); | 6400 DCHECK(!shared()->bound()); |
| 6401 return literals()->length(); | 6401 return literals()->length(); |
| 6402 } | 6402 } |
| 6403 | 6403 |
| 6404 | 6404 |
| 6405 ACCESSORS(JSProxy, target, Object, kTargetOffset) |
| 6405 ACCESSORS(JSProxy, handler, Object, kHandlerOffset) | 6406 ACCESSORS(JSProxy, handler, Object, kHandlerOffset) |
| 6406 ACCESSORS(JSProxy, hash, Object, kHashOffset) | 6407 ACCESSORS(JSProxy, hash, Object, kHashOffset) |
| 6407 ACCESSORS(JSFunctionProxy, call_trap, JSReceiver, kCallTrapOffset) | 6408 ACCESSORS(JSFunctionProxy, call_trap, JSReceiver, kCallTrapOffset) |
| 6408 ACCESSORS(JSFunctionProxy, construct_trap, Object, kConstructTrapOffset) | 6409 ACCESSORS(JSFunctionProxy, construct_trap, Object, kConstructTrapOffset) |
| 6409 | 6410 |
| 6410 | 6411 |
| 6411 void JSProxy::InitializeBody(int object_size, Object* value) { | |
| 6412 DCHECK(!value->IsHeapObject() || !GetHeap()->InNewSpace(value)); | |
| 6413 for (int offset = kHeaderSize; offset < object_size; offset += kPointerSize) { | |
| 6414 WRITE_FIELD(this, offset, value); | |
| 6415 } | |
| 6416 } | |
| 6417 | |
| 6418 | |
| 6419 ACCESSORS(JSCollection, table, Object, kTableOffset) | 6412 ACCESSORS(JSCollection, table, Object, kTableOffset) |
| 6420 | 6413 |
| 6421 | 6414 |
| 6422 #define ORDERED_HASH_TABLE_ITERATOR_ACCESSORS(name, type, offset) \ | 6415 #define ORDERED_HASH_TABLE_ITERATOR_ACCESSORS(name, type, offset) \ |
| 6423 template<class Derived, class TableType> \ | 6416 template<class Derived, class TableType> \ |
| 6424 type* OrderedHashTableIterator<Derived, TableType>::name() const { \ | 6417 type* OrderedHashTableIterator<Derived, TableType>::name() const { \ |
| 6425 return type::cast(READ_FIELD(this, offset)); \ | 6418 return type::cast(READ_FIELD(this, offset)); \ |
| 6426 } \ | 6419 } \ |
| 6427 template<class Derived, class TableType> \ | 6420 template<class Derived, class TableType> \ |
| 6428 void OrderedHashTableIterator<Derived, TableType>::set_##name( \ | 6421 void OrderedHashTableIterator<Derived, TableType>::set_##name( \ |
| (...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8151 #undef WRITE_INT64_FIELD | 8144 #undef WRITE_INT64_FIELD |
| 8152 #undef READ_BYTE_FIELD | 8145 #undef READ_BYTE_FIELD |
| 8153 #undef WRITE_BYTE_FIELD | 8146 #undef WRITE_BYTE_FIELD |
| 8154 #undef NOBARRIER_READ_BYTE_FIELD | 8147 #undef NOBARRIER_READ_BYTE_FIELD |
| 8155 #undef NOBARRIER_WRITE_BYTE_FIELD | 8148 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8156 | 8149 |
| 8157 } // namespace internal | 8150 } // namespace internal |
| 8158 } // namespace v8 | 8151 } // namespace v8 |
| 8159 | 8152 |
| 8160 #endif // V8_OBJECTS_INL_H_ | 8153 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |