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 6530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6541 | 6541 |
6542 void JSRegExp::SetDataAt(int index, Object* value) { | 6542 void JSRegExp::SetDataAt(int index, Object* value) { |
6543 DCHECK(TypeTag() != NOT_COMPILED); | 6543 DCHECK(TypeTag() != NOT_COMPILED); |
6544 DCHECK(index >= kDataIndex); // Only implementation data can be set this way. | 6544 DCHECK(index >= kDataIndex); // Only implementation data can be set this way. |
6545 FixedArray::cast(data())->set(index, value); | 6545 FixedArray::cast(data())->set(index, value); |
6546 } | 6546 } |
6547 | 6547 |
6548 | 6548 |
6549 ElementsKind JSObject::GetElementsKind() { | 6549 ElementsKind JSObject::GetElementsKind() { |
6550 ElementsKind kind = map()->elements_kind(); | 6550 ElementsKind kind = map()->elements_kind(); |
6551 #if DEBUG | 6551 #if VERIFY_HEAP |
6552 FixedArrayBase* fixed_array = | 6552 FixedArrayBase* fixed_array = |
6553 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset)); | 6553 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset)); |
6554 | 6554 |
6555 // If a GC was caused while constructing this object, the elements | 6555 // If a GC was caused while constructing this object, the elements |
6556 // pointer may point to a one pointer filler map. | 6556 // pointer may point to a one pointer filler map. |
6557 if (ElementsAreSafeToExamine()) { | 6557 if (ElementsAreSafeToExamine()) { |
6558 Map* map = fixed_array->map(); | 6558 Map* map = fixed_array->map(); |
6559 DCHECK((IsFastSmiOrObjectElementsKind(kind) && | 6559 DCHECK((IsFastSmiOrObjectElementsKind(kind) && |
6560 (map == GetHeap()->fixed_array_map() || | 6560 (map == GetHeap()->fixed_array_map() || |
6561 map == GetHeap()->fixed_cow_array_map())) || | 6561 map == GetHeap()->fixed_cow_array_map())) || |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7515 #undef READ_SHORT_FIELD | 7515 #undef READ_SHORT_FIELD |
7516 #undef WRITE_SHORT_FIELD | 7516 #undef WRITE_SHORT_FIELD |
7517 #undef READ_BYTE_FIELD | 7517 #undef READ_BYTE_FIELD |
7518 #undef WRITE_BYTE_FIELD | 7518 #undef WRITE_BYTE_FIELD |
7519 #undef NOBARRIER_READ_BYTE_FIELD | 7519 #undef NOBARRIER_READ_BYTE_FIELD |
7520 #undef NOBARRIER_WRITE_BYTE_FIELD | 7520 #undef NOBARRIER_WRITE_BYTE_FIELD |
7521 | 7521 |
7522 } } // namespace v8::internal | 7522 } } // namespace v8::internal |
7523 | 7523 |
7524 #endif // V8_OBJECTS_INL_H_ | 7524 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |