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

Unified Diff: test/cctest/test-mark-compact.cc

Issue 13341: Improve mark-compact object grouping interface. (Closed)
Patch Set: Tests. Created 12 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-mark-compact.cc
diff --git a/test/cctest/test-mark-compact.cc b/test/cctest/test-mark-compact.cc
index d468c24ad3958ab3b9858dc612323a0cd742d74a..53cff688af4f8777db217b8d87c684f7341111f6 100644
--- a/test/cctest/test-mark-compact.cc
+++ b/test/cctest/test-mark-compact.cc
@@ -282,10 +282,12 @@ TEST(ObjectGroups) {
Handle<FixedArray>::cast(g1s2)->set(0, *g2s2);
Handle<FixedArray>::cast(g2s1)->set(0, *g1s1);
- GlobalHandles::AddToGroup(reinterpret_cast<void*>(1), g1s1.location());
- GlobalHandles::AddToGroup(reinterpret_cast<void*>(1), g1s2.location());
- GlobalHandles::AddToGroup(reinterpret_cast<void*>(2), g2s1.location());
- GlobalHandles::AddToGroup(reinterpret_cast<void*>(2), g2s2.location());
+ {
+ Object** g1_objects[] = { g1s1.location(), g1s2.location() };
+ Object** g2_objects[] = { g2s1.location(), g2s2.location() };
+ GlobalHandles::AddGroup(g1_objects, 2);
+ GlobalHandles::AddGroup(g2_objects, 2);
+ }
// Do a full GC
CHECK(Heap::CollectGarbage(0, OLD_POINTER_SPACE));
@@ -298,10 +300,12 @@ TEST(ObjectGroups) {
&WeakPointerCallback);
// Groups are deleted, rebuild groups.
- GlobalHandles::AddToGroup(reinterpret_cast<void*>(1), g1s1.location());
- GlobalHandles::AddToGroup(reinterpret_cast<void*>(1), g1s2.location());
- GlobalHandles::AddToGroup(reinterpret_cast<void*>(2), g2s1.location());
- GlobalHandles::AddToGroup(reinterpret_cast<void*>(2), g2s2.location());
+ {
+ Object** g1_objects[] = { g1s1.location(), g1s2.location() };
+ Object** g2_objects[] = { g2s1.location(), g2s2.location() };
+ GlobalHandles::AddGroup(g1_objects, 2);
+ GlobalHandles::AddGroup(g2_objects, 2);
+ }
CHECK(Heap::CollectGarbage(0, OLD_POINTER_SPACE));
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698