Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Side by Side Diff: test/cctest/heap/test-heap.cc

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/visitors.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4160 matching lines...) Expand 10 before | Expand all | Expand 10 after
4171 // Move the evaucation candidate object. 4171 // Move the evaucation candidate object.
4172 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask); 4172 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
4173 4173
4174 // Verify that the pointers in the large object got updated. 4174 // Verify that the pointers in the large object got updated.
4175 for (int i = 0; i < size; i += kStep) { 4175 for (int i = 0; i < size; i += kStep) {
4176 CHECK_EQ(lo->get(i), *lit); 4176 CHECK_EQ(lo->get(i), *lit);
4177 CHECK(lo->get(i) != old_location); 4177 CHECK(lo->get(i) != old_location);
4178 } 4178 }
4179 } 4179 }
4180 4180
4181 4181 class DummyVisitor : public RootVisitor {
4182 class DummyVisitor : public ObjectVisitor {
4183 public: 4182 public:
4184 void VisitPointers(Object** start, Object** end) override {} 4183 void VisitRootPointers(Root root, Object** start, Object** end) override {}
4185 }; 4184 };
4186 4185
4187 4186
4188 TEST(DeferredHandles) { 4187 TEST(DeferredHandles) {
4189 CcTest::InitializeVM(); 4188 CcTest::InitializeVM();
4190 Isolate* isolate = CcTest::i_isolate(); 4189 Isolate* isolate = CcTest::i_isolate();
4191 Heap* heap = isolate->heap(); 4190 Heap* heap = isolate->heap();
4192 v8::HandleScope scope(reinterpret_cast<v8::Isolate*>(isolate)); 4191 v8::HandleScope scope(reinterpret_cast<v8::Isolate*>(isolate));
4193 HandleScopeData* data = isolate->handle_scope_data(); 4192 HandleScopeData* data = isolate->handle_scope_data();
4194 Handle<Object> init(heap->empty_string(), isolate); 4193 Handle<Object> init(heap->empty_string(), isolate);
(...skipping 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after
6604 CHECK(!heap->code_space()->FirstPage()->Contains(code->address())); 6603 CHECK(!heap->code_space()->FirstPage()->Contains(code->address()));
6605 6604
6606 // Ensure it's not in large object space. 6605 // Ensure it's not in large object space.
6607 MemoryChunk* chunk = MemoryChunk::FromAddress(code->address()); 6606 MemoryChunk* chunk = MemoryChunk::FromAddress(code->address());
6608 CHECK(chunk->owner()->identity() != LO_SPACE); 6607 CHECK(chunk->owner()->identity() != LO_SPACE);
6609 CHECK(chunk->NeverEvacuate()); 6608 CHECK(chunk->NeverEvacuate());
6610 } 6609 }
6611 6610
6612 } // namespace internal 6611 } // namespace internal
6613 } // namespace v8 6612 } // namespace v8
OLDNEW
« no previous file with comments | « src/visitors.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698