Commit 80ae1b37 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[test] Remove CompilationInfo from test-field-type-tracking.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2286593003
Cr-Commit-Position: refs/heads/master@{#38939}
parent 25cdfd79
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "src/v8.h" #include "src/v8.h"
#include "src/compilation-cache.h" #include "src/compilation-cache.h"
#include "src/compiler.h" #include "src/compilation-dependencies.h"
#include "src/execution.h" #include "src/execution.h"
#include "src/factory.h" #include "src/factory.h"
#include "src/field-type.h" #include "src/field-type.h"
...@@ -603,11 +603,10 @@ static void TestGeneralizeRepresentation( ...@@ -603,11 +603,10 @@ static void TestGeneralizeRepresentation(
// Create new maps by generalizing representation of propX field. // Create new maps by generalizing representation of propX field.
Handle<Map> field_owner(map->FindFieldOwner(property_index), isolate); Handle<Map> field_owner(map->FindFieldOwner(property_index), isolate);
CompilationInfo info(ArrayVector("testing"), isolate, &zone, CompilationDependencies dependencies(isolate, &zone);
Code::ComputeFlags(Code::STUB)); CHECK(!dependencies.HasAborted());
CHECK(!info.dependencies()->HasAborted());
info.dependencies()->AssumeFieldType(field_owner); dependencies.AssumeFieldType(field_owner);
Handle<Map> new_map = Handle<Map> new_map =
Map::ReconfigureProperty(map, property_index, kData, NONE, Map::ReconfigureProperty(map, property_index, kData, NONE,
...@@ -624,21 +623,21 @@ static void TestGeneralizeRepresentation( ...@@ -624,21 +623,21 @@ static void TestGeneralizeRepresentation(
CHECK(map->is_deprecated()); CHECK(map->is_deprecated());
CHECK_NE(*map, *new_map); CHECK_NE(*map, *new_map);
CHECK_EQ(expected_field_type_dependency && !field_owner->is_deprecated(), CHECK_EQ(expected_field_type_dependency && !field_owner->is_deprecated(),
info.dependencies()->HasAborted()); dependencies.HasAborted());
} else if (expected_deprecation) { } else if (expected_deprecation) {
CHECK(!map->is_stable()); CHECK(!map->is_stable());
CHECK(map->is_deprecated()); CHECK(map->is_deprecated());
CHECK(field_owner->is_deprecated()); CHECK(field_owner->is_deprecated());
CHECK_NE(*map, *new_map); CHECK_NE(*map, *new_map);
CHECK(!info.dependencies()->HasAborted()); CHECK(!dependencies.HasAborted());
} else { } else {
CHECK(!field_owner->is_deprecated()); CHECK(!field_owner->is_deprecated());
CHECK(map->is_stable()); // Map did not change, must be left stable. CHECK(map->is_stable()); // Map did not change, must be left stable.
CHECK_EQ(*map, *new_map); CHECK_EQ(*map, *new_map);
CHECK_EQ(expected_field_type_dependency, info.dependencies()->HasAborted()); CHECK_EQ(expected_field_type_dependency, dependencies.HasAborted());
} }
{ {
...@@ -652,7 +651,7 @@ static void TestGeneralizeRepresentation( ...@@ -652,7 +651,7 @@ static void TestGeneralizeRepresentation(
} }
} }
info.dependencies()->Rollback(); // Properly cleanup compilation info. dependencies.Rollback(); // Properly cleanup compilation info.
// Update all deprecated maps and check that they are now the same. // Update all deprecated maps and check that they are now the same.
Handle<Map> updated_map = Map::Update(map); Handle<Map> updated_map = Map::Update(map);
...@@ -983,10 +982,9 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation( ...@@ -983,10 +982,9 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
Zone zone(isolate->allocator()); Zone zone(isolate->allocator());
Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate); Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
CompilationInfo info(ArrayVector("testing"), isolate, &zone, CompilationDependencies dependencies(isolate, &zone);
Code::ComputeFlags(Code::STUB)); CHECK(!dependencies.HasAborted());
CHECK(!info.dependencies()->HasAborted()); dependencies.AssumeFieldType(field_owner);
info.dependencies()->AssumeFieldType(field_owner);
// Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which // Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which
// should generalize representations in |map1|. // should generalize representations in |map1|.
...@@ -1004,8 +1002,8 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation( ...@@ -1004,8 +1002,8 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
expectations.SetDataField(i, expected_representation, expected_type); expectations.SetDataField(i, expected_representation, expected_type);
} }
CHECK(map->is_deprecated()); CHECK(map->is_deprecated());
CHECK(!info.dependencies()->HasAborted()); CHECK(!dependencies.HasAborted());
info.dependencies()->Rollback(); // Properly cleanup compilation info. dependencies.Rollback(); // Properly cleanup compilation info.
CHECK_NE(*map, *new_map); CHECK_NE(*map, *new_map);
CHECK(!new_map->is_deprecated()); CHECK(!new_map->is_deprecated());
...@@ -1069,10 +1067,9 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial( ...@@ -1069,10 +1067,9 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
Zone zone(isolate->allocator()); Zone zone(isolate->allocator());
Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate); Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
CompilationInfo info(ArrayVector("testing"), isolate, &zone, CompilationDependencies dependencies(isolate, &zone);
Code::ComputeFlags(Code::STUB)); CHECK(!dependencies.HasAborted());
CHECK(!info.dependencies()->HasAborted()); dependencies.AssumeFieldType(field_owner);
info.dependencies()->AssumeFieldType(field_owner);
// Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which // Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which
// should generalize representations in |map1|. // should generalize representations in |map1|.
...@@ -1094,8 +1091,8 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial( ...@@ -1094,8 +1091,8 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
} }
CHECK(!map->is_deprecated()); CHECK(!map->is_deprecated());
CHECK_EQ(*map, *new_map); CHECK_EQ(*map, *new_map);
CHECK_EQ(expected_field_type_dependency, info.dependencies()->HasAborted()); CHECK_EQ(expected_field_type_dependency, dependencies.HasAborted());
info.dependencies()->Rollback(); // Properly cleanup compilation info. dependencies.Rollback(); // Properly cleanup compilation info.
CHECK(!new_map->is_deprecated()); CHECK(!new_map->is_deprecated());
CHECK(expectations.Check(*new_map)); CHECK(expectations.Check(*new_map));
...@@ -1601,10 +1598,9 @@ static void TestReconfigureElementsKind_GeneralizeRepresentation( ...@@ -1601,10 +1598,9 @@ static void TestReconfigureElementsKind_GeneralizeRepresentation(
Zone zone(isolate->allocator()); Zone zone(isolate->allocator());
Handle<Map> field_owner(map->FindFieldOwner(kDiffProp), isolate); Handle<Map> field_owner(map->FindFieldOwner(kDiffProp), isolate);
CompilationInfo info(ArrayVector("testing"), isolate, &zone, CompilationDependencies dependencies(isolate, &zone);
Code::ComputeFlags(Code::STUB)); CHECK(!dependencies.HasAborted());
CHECK(!info.dependencies()->HasAborted()); dependencies.AssumeFieldType(field_owner);
info.dependencies()->AssumeFieldType(field_owner);
// Reconfigure elements kinds of |map2|, which should generalize // Reconfigure elements kinds of |map2|, which should generalize
// representations in |map|. // representations in |map|.
...@@ -1620,8 +1616,8 @@ static void TestReconfigureElementsKind_GeneralizeRepresentation( ...@@ -1620,8 +1616,8 @@ static void TestReconfigureElementsKind_GeneralizeRepresentation(
expectations.SetDataField(kDiffProp, expected_representation, expected_type); expectations.SetDataField(kDiffProp, expected_representation, expected_type);
CHECK(map->is_deprecated()); CHECK(map->is_deprecated());
CHECK(!info.dependencies()->HasAborted()); CHECK(!dependencies.HasAborted());
info.dependencies()->Rollback(); // Properly cleanup compilation info. dependencies.Rollback(); // Properly cleanup compilation info.
CHECK_NE(*map, *new_map); CHECK_NE(*map, *new_map);
CHECK(!new_map->is_deprecated()); CHECK(!new_map->is_deprecated());
...@@ -1695,10 +1691,9 @@ static void TestReconfigureElementsKind_GeneralizeRepresentationTrivial( ...@@ -1695,10 +1691,9 @@ static void TestReconfigureElementsKind_GeneralizeRepresentationTrivial(
Zone zone(isolate->allocator()); Zone zone(isolate->allocator());
Handle<Map> field_owner(map->FindFieldOwner(kDiffProp), isolate); Handle<Map> field_owner(map->FindFieldOwner(kDiffProp), isolate);
CompilationInfo info(ArrayVector("testing"), isolate, &zone, CompilationDependencies dependencies(isolate, &zone);
Code::ComputeFlags(Code::STUB)); CHECK(!dependencies.HasAborted());
CHECK(!info.dependencies()->HasAborted()); dependencies.AssumeFieldType(field_owner);
info.dependencies()->AssumeFieldType(field_owner);
// Reconfigure elements kinds of |map2|, which should generalize // Reconfigure elements kinds of |map2|, which should generalize
// representations in |map|. // representations in |map|.
...@@ -1717,8 +1712,8 @@ static void TestReconfigureElementsKind_GeneralizeRepresentationTrivial( ...@@ -1717,8 +1712,8 @@ static void TestReconfigureElementsKind_GeneralizeRepresentationTrivial(
expectations.SetDataField(kDiffProp, expected_representation, expected_type); expectations.SetDataField(kDiffProp, expected_representation, expected_type);
CHECK(!map->is_deprecated()); CHECK(!map->is_deprecated());
CHECK_EQ(*map, *new_map); CHECK_EQ(*map, *new_map);
CHECK_EQ(expected_field_type_dependency, info.dependencies()->HasAborted()); CHECK_EQ(expected_field_type_dependency, dependencies.HasAborted());
info.dependencies()->Rollback(); // Properly cleanup compilation info. dependencies.Rollback(); // Properly cleanup compilation info.
CHECK(!new_map->is_deprecated()); CHECK(!new_map->is_deprecated());
CHECK(expectations.Check(*new_map)); CHECK(expectations.Check(*new_map));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment