| 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 6518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6529 | 6529 |
| 6530 void JSRegExp::SetDataAt(int index, Object* value) { | 6530 void JSRegExp::SetDataAt(int index, Object* value) { |
| 6531 DCHECK(TypeTag() != NOT_COMPILED); | 6531 DCHECK(TypeTag() != NOT_COMPILED); |
| 6532 DCHECK(index >= kDataIndex); // Only implementation data can be set this way. | 6532 DCHECK(index >= kDataIndex); // Only implementation data can be set this way. |
| 6533 FixedArray::cast(data())->set(index, value); | 6533 FixedArray::cast(data())->set(index, value); |
| 6534 } | 6534 } |
| 6535 | 6535 |
| 6536 | 6536 |
| 6537 ElementsKind JSObject::GetElementsKind() { | 6537 ElementsKind JSObject::GetElementsKind() { |
| 6538 ElementsKind kind = map()->elements_kind(); | 6538 ElementsKind kind = map()->elements_kind(); |
| 6539 #if VERIFY_HEAP | 6539 #if VERIFY_HEAP && DEBUG |
| 6540 FixedArrayBase* fixed_array = | 6540 FixedArrayBase* fixed_array = |
| 6541 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset)); | 6541 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset)); |
| 6542 | 6542 |
| 6543 // If a GC was caused while constructing this object, the elements | 6543 // If a GC was caused while constructing this object, the elements |
| 6544 // pointer may point to a one pointer filler map. | 6544 // pointer may point to a one pointer filler map. |
| 6545 if (ElementsAreSafeToExamine()) { | 6545 if (ElementsAreSafeToExamine()) { |
| 6546 Map* map = fixed_array->map(); | 6546 Map* map = fixed_array->map(); |
| 6547 DCHECK((IsFastSmiOrObjectElementsKind(kind) && | 6547 DCHECK((IsFastSmiOrObjectElementsKind(kind) && |
| 6548 (map == GetHeap()->fixed_array_map() || | 6548 (map == GetHeap()->fixed_array_map() || |
| 6549 map == GetHeap()->fixed_cow_array_map())) || | 6549 map == GetHeap()->fixed_cow_array_map())) || |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7503 #undef READ_SHORT_FIELD | 7503 #undef READ_SHORT_FIELD |
| 7504 #undef WRITE_SHORT_FIELD | 7504 #undef WRITE_SHORT_FIELD |
| 7505 #undef READ_BYTE_FIELD | 7505 #undef READ_BYTE_FIELD |
| 7506 #undef WRITE_BYTE_FIELD | 7506 #undef WRITE_BYTE_FIELD |
| 7507 #undef NOBARRIER_READ_BYTE_FIELD | 7507 #undef NOBARRIER_READ_BYTE_FIELD |
| 7508 #undef NOBARRIER_WRITE_BYTE_FIELD | 7508 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7509 | 7509 |
| 7510 } } // namespace v8::internal | 7510 } } // namespace v8::internal |
| 7511 | 7511 |
| 7512 #endif // V8_OBJECTS_INL_H_ | 7512 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |