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

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

Issue 14175005: New GC related APIs: Implicit references. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Code review (mstarzinger) + test update Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-heap-profiler.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 5f017310d01bddb707c6697700e8940015c88492..ee1481f4e0a063a0854f9758c9985f822a6cecc8 100644
--- a/test/cctest/test-mark-compact.cc
+++ b/test/cctest/test-mark-compact.cc
@@ -370,7 +370,7 @@ TEST(ObjectGroupsOldApi) {
Handle<HeapObject>::cast(g1s1).location(), g1_children, 1);
global_handles->AddObjectGroup(g2_objects, 2, NULL);
global_handles->AddImplicitReferences(
- Handle<HeapObject>::cast(g2s2).location(), g2_children, 1);
+ Handle<HeapObject>::cast(g2s1).location(), g2_children, 1);
}
// Do a full GC
HEAP->CollectGarbage(OLD_POINTER_SPACE);
@@ -399,7 +399,7 @@ TEST(ObjectGroupsOldApi) {
Handle<HeapObject>::cast(g1s1).location(), g1_children, 1);
global_handles->AddObjectGroup(g2_objects, 2, NULL);
global_handles->AddImplicitReferences(
- Handle<HeapObject>::cast(g2s2).location(), g2_children, 1);
+ Handle<HeapObject>::cast(g2s1).location(), g2_children, 1);
}
HEAP->CollectGarbage(OLD_POINTER_SPACE);
@@ -477,16 +477,16 @@ TEST(ObjectGroups) {
Handle<FixedArray>::cast(g2s1)->set(0, *g1s1);
{
- Object** g1_children[] = { g1c1.location() };
- Object** g2_children[] = { g2c1.location() };
global_handles->SetObjectGroupId(g1s1.location(), v8::UniqueId(1));
global_handles->SetObjectGroupId(g1s2.location(), v8::UniqueId(1));
- global_handles->AddImplicitReferences(
- Handle<HeapObject>::cast(g1s1).location(), g1_children, 1);
+ global_handles->SetObjectGroupRepresentative(
+ v8::UniqueId(1), reinterpret_cast<HeapObject**>(g1s1.location()));
+ global_handles->AddImplicitReference(v8::UniqueId(1), g1c1.location());
global_handles->SetObjectGroupId(g2s1.location(), v8::UniqueId(2));
global_handles->SetObjectGroupId(g2s2.location(), v8::UniqueId(2));
- global_handles->AddImplicitReferences(
- Handle<HeapObject>::cast(g2s2).location(), g2_children, 1);
+ global_handles->SetObjectGroupRepresentative(
+ v8::UniqueId(2), reinterpret_cast<HeapObject**>(g2s1.location()));
+ global_handles->AddImplicitReference(v8::UniqueId(2), g2c1.location());
}
// Do a full GC
heap->CollectGarbage(OLD_POINTER_SPACE);
@@ -506,16 +506,16 @@ TEST(ObjectGroups) {
// Groups are deleted, rebuild groups.
{
- Object** g1_children[] = { g1c1.location() };
- Object** g2_children[] = { g2c1.location() };
global_handles->SetObjectGroupId(g1s1.location(), v8::UniqueId(1));
global_handles->SetObjectGroupId(g1s2.location(), v8::UniqueId(1));
- global_handles->AddImplicitReferences(
- Handle<HeapObject>::cast(g1s1).location(), g1_children, 1);
+ global_handles->SetObjectGroupRepresentative(
+ v8::UniqueId(1), reinterpret_cast<HeapObject**>(g1s1.location()));
+ global_handles->AddImplicitReference(v8::UniqueId(1), g1c1.location());
global_handles->SetObjectGroupId(g2s1.location(), v8::UniqueId(2));
global_handles->SetObjectGroupId(g2s2.location(), v8::UniqueId(2));
- global_handles->AddImplicitReferences(
- Handle<HeapObject>::cast(g2s2).location(), g2_children, 1);
+ global_handles->SetObjectGroupRepresentative(
+ v8::UniqueId(2), reinterpret_cast<HeapObject**>(g2s1.location()));
+ global_handles->AddImplicitReference(v8::UniqueId(2), g2c1.location());
}
heap->CollectGarbage(OLD_POINTER_SPACE);
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698