| 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 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3327 CAST_ACCESSOR(ExternalTwoByteString) |  3327 CAST_ACCESSOR(ExternalTwoByteString) | 
|  3328 CAST_ACCESSOR(ExternalUint16Array) |  3328 CAST_ACCESSOR(ExternalUint16Array) | 
|  3329 CAST_ACCESSOR(ExternalUint32Array) |  3329 CAST_ACCESSOR(ExternalUint32Array) | 
|  3330 CAST_ACCESSOR(ExternalUint8Array) |  3330 CAST_ACCESSOR(ExternalUint8Array) | 
|  3331 CAST_ACCESSOR(ExternalUint8ClampedArray) |  3331 CAST_ACCESSOR(ExternalUint8ClampedArray) | 
|  3332 CAST_ACCESSOR(FixedArray) |  3332 CAST_ACCESSOR(FixedArray) | 
|  3333 CAST_ACCESSOR(FixedArrayBase) |  3333 CAST_ACCESSOR(FixedArrayBase) | 
|  3334 CAST_ACCESSOR(FixedDoubleArray) |  3334 CAST_ACCESSOR(FixedDoubleArray) | 
|  3335 CAST_ACCESSOR(FixedTypedArrayBase) |  3335 CAST_ACCESSOR(FixedTypedArrayBase) | 
|  3336 CAST_ACCESSOR(Foreign) |  3336 CAST_ACCESSOR(Foreign) | 
|  3337 CAST_ACCESSOR(FreeSpace) |  | 
|  3338 CAST_ACCESSOR(GlobalObject) |  3337 CAST_ACCESSOR(GlobalObject) | 
|  3339 CAST_ACCESSOR(HeapObject) |  3338 CAST_ACCESSOR(HeapObject) | 
|  3340 CAST_ACCESSOR(JSArray) |  3339 CAST_ACCESSOR(JSArray) | 
|  3341 CAST_ACCESSOR(JSArrayBuffer) |  3340 CAST_ACCESSOR(JSArrayBuffer) | 
|  3342 CAST_ACCESSOR(JSArrayBufferView) |  3341 CAST_ACCESSOR(JSArrayBufferView) | 
|  3343 CAST_ACCESSOR(JSBuiltinsObject) |  3342 CAST_ACCESSOR(JSBuiltinsObject) | 
|  3344 CAST_ACCESSOR(JSDataView) |  3343 CAST_ACCESSOR(JSDataView) | 
|  3345 CAST_ACCESSOR(JSDate) |  3344 CAST_ACCESSOR(JSDate) | 
|  3346 CAST_ACCESSOR(JSFunction) |  3345 CAST_ACCESSOR(JSFunction) | 
|  3347 CAST_ACCESSOR(JSFunctionProxy) |  3346 CAST_ACCESSOR(JSFunctionProxy) | 
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3436 SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) |  3435 SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) | 
|  3437 SYNCHRONIZED_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) |  3436 SYNCHRONIZED_SMI_ACCESSORS(FixedArrayBase, length, kLengthOffset) | 
|  3438  |  3437  | 
|  3439 SMI_ACCESSORS(FreeSpace, size, kSizeOffset) |  3438 SMI_ACCESSORS(FreeSpace, size, kSizeOffset) | 
|  3440 NOBARRIER_SMI_ACCESSORS(FreeSpace, size, kSizeOffset) |  3439 NOBARRIER_SMI_ACCESSORS(FreeSpace, size, kSizeOffset) | 
|  3441  |  3440  | 
|  3442 SMI_ACCESSORS(String, length, kLengthOffset) |  3441 SMI_ACCESSORS(String, length, kLengthOffset) | 
|  3443 SYNCHRONIZED_SMI_ACCESSORS(String, length, kLengthOffset) |  3442 SYNCHRONIZED_SMI_ACCESSORS(String, length, kLengthOffset) | 
|  3444  |  3443  | 
|  3445  |  3444  | 
 |  3445 FreeSpace* FreeSpace::next() { | 
 |  3446   DCHECK(map() == GetHeap()->raw_unchecked_free_space_map() || | 
 |  3447          (!GetHeap()->deserialization_complete() && map() == NULL)); | 
 |  3448   DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); | 
 |  3449   return reinterpret_cast<FreeSpace*>( | 
 |  3450       Memory::Address_at(address() + kNextOffset)); | 
 |  3451 } | 
 |  3452  | 
 |  3453  | 
 |  3454 FreeSpace** FreeSpace::next_address() { | 
 |  3455   DCHECK(map() == GetHeap()->raw_unchecked_free_space_map() || | 
 |  3456          (!GetHeap()->deserialization_complete() && map() == NULL)); | 
 |  3457   DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); | 
 |  3458   return reinterpret_cast<FreeSpace**>(address() + kNextOffset); | 
 |  3459 } | 
 |  3460  | 
 |  3461  | 
 |  3462 void FreeSpace::set_next(FreeSpace* next) { | 
 |  3463   DCHECK(map() == GetHeap()->raw_unchecked_free_space_map() || | 
 |  3464          (!GetHeap()->deserialization_complete() && map() == NULL)); | 
 |  3465   DCHECK_LE(kNextOffset + kPointerSize, nobarrier_size()); | 
 |  3466   base::NoBarrier_Store( | 
 |  3467       reinterpret_cast<base::AtomicWord*>(address() + kNextOffset), | 
 |  3468       reinterpret_cast<base::AtomicWord>(next)); | 
 |  3469 } | 
 |  3470  | 
 |  3471  | 
 |  3472 FreeSpace* FreeSpace::cast(HeapObject* o) { | 
 |  3473   SLOW_DCHECK(!o->GetHeap()->deserialization_complete() || o->IsFreeSpace()); | 
 |  3474   return reinterpret_cast<FreeSpace*>(o); | 
 |  3475 } | 
 |  3476  | 
 |  3477  | 
|  3446 uint32_t Name::hash_field() { |  3478 uint32_t Name::hash_field() { | 
|  3447   return READ_UINT32_FIELD(this, kHashFieldOffset); |  3479   return READ_UINT32_FIELD(this, kHashFieldOffset); | 
|  3448 } |  3480 } | 
|  3449  |  3481  | 
|  3450  |  3482  | 
|  3451 void Name::set_hash_field(uint32_t value) { |  3483 void Name::set_hash_field(uint32_t value) { | 
|  3452   WRITE_UINT32_FIELD(this, kHashFieldOffset, value); |  3484   WRITE_UINT32_FIELD(this, kHashFieldOffset, value); | 
|  3453 #if V8_HOST_ARCH_64_BIT |  3485 #if V8_HOST_ARCH_64_BIT | 
|  3454 #if V8_TARGET_LITTLE_ENDIAN |  3486 #if V8_TARGET_LITTLE_ENDIAN | 
|  3455   WRITE_UINT32_FIELD(this, kHashFieldSlot + kIntSize, 0); |  3487   WRITE_UINT32_FIELD(this, kHashFieldSlot + kIntSize, 0); | 
| (...skipping 4062 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  7518 #undef READ_SHORT_FIELD |  7550 #undef READ_SHORT_FIELD | 
|  7519 #undef WRITE_SHORT_FIELD |  7551 #undef WRITE_SHORT_FIELD | 
|  7520 #undef READ_BYTE_FIELD |  7552 #undef READ_BYTE_FIELD | 
|  7521 #undef WRITE_BYTE_FIELD |  7553 #undef WRITE_BYTE_FIELD | 
|  7522 #undef NOBARRIER_READ_BYTE_FIELD |  7554 #undef NOBARRIER_READ_BYTE_FIELD | 
|  7523 #undef NOBARRIER_WRITE_BYTE_FIELD |  7555 #undef NOBARRIER_WRITE_BYTE_FIELD | 
|  7524  |  7556  | 
|  7525 } }  // namespace v8::internal |  7557 } }  // namespace v8::internal | 
|  7526  |  7558  | 
|  7527 #endif  // V8_OBJECTS_INL_H_ |  7559 #endif  // V8_OBJECTS_INL_H_ | 
| OLD | NEW |