| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 | 2 |
| 3 // Test constant pool array code. | 3 // Test constant pool array code. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/factory.h" | 7 #include "src/factory.h" |
| 8 #include "src/objects.h" | 8 #include "src/objects.h" |
| 9 #include "test/cctest/cctest.h" | 9 #include "test/cctest/cctest.h" |
| 10 | 10 |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 } | 296 } |
| 297 | 297 |
| 298 // Check heap pointers are correctly updated on GC. | 298 // Check heap pointers are correctly updated on GC. |
| 299 Object* old_ptr = array->get_heap_ptr_entry(0); | 299 Object* old_ptr = array->get_heap_ptr_entry(0); |
| 300 Handle<Object> object(old_ptr, isolate); | 300 Handle<Object> object(old_ptr, isolate); |
| 301 CHECK_EQ(old_ptr, *object); | 301 CHECK_EQ(old_ptr, *object); |
| 302 CHECK_EQ(old_ptr, array->get_heap_ptr_entry(1)); | 302 CHECK_EQ(old_ptr, array->get_heap_ptr_entry(1)); |
| 303 | 303 |
| 304 // Force compacting garbage collection. | 304 // Force compacting garbage collection. |
| 305 CHECK(FLAG_always_compact); | 305 CHECK(FLAG_always_compact); |
| 306 heap->CollectAllGarbage(Heap::kNoGCFlags); | 306 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
| 307 | 307 |
| 308 CHECK_NE(old_ptr, *object); | 308 CHECK_NE(old_ptr, *object); |
| 309 CHECK_EQ(*object, array->get_heap_ptr_entry(0)); | 309 CHECK_EQ(*object, array->get_heap_ptr_entry(0)); |
| 310 CHECK_EQ(*object, array->get_heap_ptr_entry(1)); | 310 CHECK_EQ(*object, array->get_heap_ptr_entry(1)); |
| 311 } | 311 } |
| OLD | NEW |