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 #ifndef V8_HEAP_HEAP_INL_H_ | 5 #ifndef V8_HEAP_HEAP_INL_H_ |
6 #define V8_HEAP_HEAP_INL_H_ | 6 #define V8_HEAP_HEAP_INL_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 obj->IsExternalString()); | 451 obj->IsExternalString()); |
452 case OLD_DATA_SPACE: | 452 case OLD_DATA_SPACE: |
453 return dst == src && dst == TargetSpaceId(type); | 453 return dst == src && dst == TargetSpaceId(type); |
454 case CODE_SPACE: | 454 case CODE_SPACE: |
455 return dst == src && type == CODE_TYPE; | 455 return dst == src && type == CODE_TYPE; |
456 case MAP_SPACE: | 456 case MAP_SPACE: |
457 case CELL_SPACE: | 457 case CELL_SPACE: |
458 case PROPERTY_CELL_SPACE: | 458 case PROPERTY_CELL_SPACE: |
459 case LO_SPACE: | 459 case LO_SPACE: |
460 return false; | 460 return false; |
461 case INVALID_SPACE: | |
462 break; | |
463 } | 461 } |
464 UNREACHABLE(); | 462 UNREACHABLE(); |
465 return false; | 463 return false; |
466 } | 464 } |
467 | 465 |
468 | 466 |
469 void Heap::CopyBlock(Address dst, Address src, int byte_size) { | 467 void Heap::CopyBlock(Address dst, Address src, int byte_size) { |
470 CopyWords(reinterpret_cast<Object**>(dst), reinterpret_cast<Object**>(src), | 468 CopyWords(reinterpret_cast<Object**>(dst), reinterpret_cast<Object**>(src), |
471 static_cast<size_t>(byte_size / kPointerSize)); | 469 static_cast<size_t>(byte_size / kPointerSize)); |
472 } | 470 } |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 | 769 |
772 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 770 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
773 for (Object** current = start; current < end; current++) { | 771 for (Object** current = start; current < end; current++) { |
774 CHECK((*current)->IsSmi()); | 772 CHECK((*current)->IsSmi()); |
775 } | 773 } |
776 } | 774 } |
777 } | 775 } |
778 } // namespace v8::internal | 776 } // namespace v8::internal |
779 | 777 |
780 #endif // V8_HEAP_HEAP_INL_H_ | 778 #endif // V8_HEAP_HEAP_INL_H_ |
OLD | NEW |