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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 return heap; | 1450 return heap; |
1451 } | 1451 } |
1452 | 1452 |
1453 | 1453 |
1454 Isolate* HeapObject::GetIsolate() const { | 1454 Isolate* HeapObject::GetIsolate() const { |
1455 return GetHeap()->isolate(); | 1455 return GetHeap()->isolate(); |
1456 } | 1456 } |
1457 | 1457 |
1458 | 1458 |
1459 Map* HeapObject::map() const { | 1459 Map* HeapObject::map() const { |
1460 #ifdef DEBUG | |
1461 // Clear mark potentially added by PathTracer. | |
1462 uintptr_t raw_value = | |
1463 map_word().ToRawValue() & ~static_cast<uintptr_t>(PathTracer::kMarkTag); | |
1464 return MapWord::FromRawValue(raw_value).ToMap(); | |
1465 #else | |
1466 return map_word().ToMap(); | 1460 return map_word().ToMap(); |
1467 #endif | |
1468 } | 1461 } |
1469 | 1462 |
1470 | 1463 |
1471 void HeapObject::set_map(Map* value) { | 1464 void HeapObject::set_map(Map* value) { |
1472 set_map_word(MapWord::FromMap(value)); | 1465 set_map_word(MapWord::FromMap(value)); |
1473 if (value != nullptr) { | 1466 if (value != nullptr) { |
1474 // TODO(1600) We are passing NULL as a slot because maps can never be on | 1467 // TODO(1600) We are passing NULL as a slot because maps can never be on |
1475 // evacuation candidate. | 1468 // evacuation candidate. |
1476 value->GetHeap()->incremental_marking()->RecordWrite(this, nullptr, value); | 1469 value->GetHeap()->incremental_marking()->RecordWrite(this, nullptr, value); |
1477 #ifdef VERIFY_HEAP | 1470 #ifdef VERIFY_HEAP |
(...skipping 6799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8277 #undef WRITE_INT64_FIELD | 8270 #undef WRITE_INT64_FIELD |
8278 #undef READ_BYTE_FIELD | 8271 #undef READ_BYTE_FIELD |
8279 #undef WRITE_BYTE_FIELD | 8272 #undef WRITE_BYTE_FIELD |
8280 #undef NOBARRIER_READ_BYTE_FIELD | 8273 #undef NOBARRIER_READ_BYTE_FIELD |
8281 #undef NOBARRIER_WRITE_BYTE_FIELD | 8274 #undef NOBARRIER_WRITE_BYTE_FIELD |
8282 | 8275 |
8283 } // namespace internal | 8276 } // namespace internal |
8284 } // namespace v8 | 8277 } // namespace v8 |
8285 | 8278 |
8286 #endif // V8_OBJECTS_INL_H_ | 8279 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |