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-migrations.cc

Issue 1095433002: Refactor compilation dependency handling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/objects.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-migrations.cc
diff --git a/test/cctest/test-migrations.cc b/test/cctest/test-migrations.cc
index 3be173453a5b407b6614af55f0dd348594df0030..544278575ce1e189bbe00a71abbf60e28f5d6328 100644
--- a/test/cctest/test-migrations.cc
+++ b/test/cctest/test-migrations.cc
@@ -591,10 +591,9 @@ static void TestGeneralizeRepresentation(
// Create new maps by generalizing representation of propX field.
Handle<Map> field_owner(map->FindFieldOwner(property_index), isolate);
CompilationInfo info(&stub, isolate, &zone);
- CHECK(!info.HasAbortedDueToDependencyChange());
+ CHECK(!info.dependencies()->HasAborted());
- Map::AddDependentCompilationInfo(field_owner, DependentCode::kFieldTypeGroup,
- &info);
+ info.dependencies()->AssumeFieldType(field_owner);
Handle<Map> new_map =
Map::ReconfigureProperty(map, property_index, kData, NONE,
@@ -610,23 +609,22 @@ static void TestGeneralizeRepresentation(
CHECK(map->is_deprecated());
CHECK_NE(*map, *new_map);
CHECK_EQ(expected_field_type_dependency && !field_owner->is_deprecated(),
- info.HasAbortedDueToDependencyChange());
+ info.dependencies()->HasAborted());
} else if (expected_deprecation) {
CHECK(map->is_deprecated());
CHECK(field_owner->is_deprecated());
CHECK_NE(*map, *new_map);
- CHECK(!info.HasAbortedDueToDependencyChange());
+ CHECK(!info.dependencies()->HasAborted());
} else {
CHECK(!field_owner->is_deprecated());
CHECK_EQ(*map, *new_map);
- CHECK_EQ(expected_field_type_dependency,
- info.HasAbortedDueToDependencyChange());
+ CHECK_EQ(expected_field_type_dependency, info.dependencies()->HasAborted());
}
- info.RollbackDependencies(); // Properly cleanup compilation info.
+ info.dependencies()->Rollback(); // Properly cleanup compilation info.
// Update all deprecated maps and check that they are now the same.
Handle<Map> updated_map = Map::Update(map);
@@ -961,9 +959,8 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
FakeStubForTesting stub(isolate);
Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
CompilationInfo info(&stub, isolate, &zone);
- CHECK(!info.HasAbortedDueToDependencyChange());
- Map::AddDependentCompilationInfo(field_owner, DependentCode::kFieldTypeGroup,
- &info);
+ CHECK(!info.dependencies()->HasAborted());
+ info.dependencies()->AssumeFieldType(field_owner);
// Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which
// should generalize representations in |map1|.
@@ -980,8 +977,8 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
expectations.SetDataField(i, expected_representation, expected_type);
}
CHECK(map->is_deprecated());
- CHECK(!info.HasAbortedDueToDependencyChange());
- info.RollbackDependencies(); // Properly cleanup compilation info.
+ CHECK(!info.dependencies()->HasAborted());
+ info.dependencies()->Rollback(); // Properly cleanup compilation info.
CHECK_NE(*map, *new_map);
CHECK(!new_map->is_deprecated());
@@ -1047,9 +1044,8 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
FakeStubForTesting stub(isolate);
Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
CompilationInfo info(&stub, isolate, &zone);
- CHECK(!info.HasAbortedDueToDependencyChange());
- Map::AddDependentCompilationInfo(field_owner, DependentCode::kFieldTypeGroup,
- &info);
+ CHECK(!info.dependencies()->HasAborted());
+ info.dependencies()->AssumeFieldType(field_owner);
// Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which
// should generalize representations in |map1|.
@@ -1070,9 +1066,8 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
}
CHECK(!map->is_deprecated());
CHECK_EQ(*map, *new_map);
- CHECK_EQ(expected_field_type_dependency,
- info.HasAbortedDueToDependencyChange());
- info.RollbackDependencies(); // Properly cleanup compilation info.
+ CHECK_EQ(expected_field_type_dependency, info.dependencies()->HasAborted());
+ info.dependencies()->Rollback(); // Properly cleanup compilation info.
CHECK(!new_map->is_deprecated());
CHECK(expectations.Check(*new_map));
« no previous file with comments | « src/objects.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698