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

Unified Diff: test/cctest/test-field-type-tracking.cc

Issue 1636013002: Replace HeapType with a non-templated FieldType class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tracing of generalizations Created 4 years, 11 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
Index: test/cctest/test-field-type-tracking.cc
diff --git a/test/cctest/test-field-type-tracking.cc b/test/cctest/test-field-type-tracking.cc
index 89456bd6baa193fb82f9e9b339d637a201c7c672..0ca7ea4673c0c27e03ae1d1cacd26edeb175ad5c 100644
--- a/test/cctest/test-field-type-tracking.cc
+++ b/test/cctest/test-field-type-tracking.cc
@@ -88,7 +88,7 @@ class Expectations {
PropertyType types_[MAX_PROPERTIES];
PropertyAttributes attributes_[MAX_PROPERTIES];
Representation representations_[MAX_PROPERTIES];
- // HeapType for kField, value for DATA_CONSTANT and getter for
+ // FieldType for kField, value for DATA_CONSTANT and getter for
// ACCESSOR_CONSTANT.
Handle<Object> values_[MAX_PROPERTIES];
// Setter for ACCESSOR_CONSTANT.
@@ -142,25 +142,25 @@ class Expectations {
os << "\n";
}
- Handle<HeapType> GetFieldType(int index) {
+ Handle<FieldType> GetFieldType(int index) {
CHECK(index < MAX_PROPERTIES);
CHECK(types_[index] == DATA || types_[index] == ACCESSOR);
- return Handle<HeapType>::cast(values_[index]);
+ return Handle<FieldType>::cast(values_[index]);
}
void SetDataField(int index, PropertyAttributes attrs,
- Representation representation, Handle<HeapType> value) {
+ Representation representation, Handle<FieldType> value) {
Init(index, DATA, attrs, representation, value);
}
void SetDataField(int index, Representation representation,
- Handle<HeapType> value) {
+ Handle<FieldType> value) {
SetDataField(index, attributes_[index], representation, value);
}
void SetAccessorField(int index, PropertyAttributes attrs) {
Init(index, ACCESSOR, attrs, Representation::Tagged(),
- HeapType::Any(isolate_));
+ FieldType::Any(isolate_));
}
void SetAccessorField(int index) {
@@ -216,7 +216,7 @@ class Expectations {
CHECK(index < number_of_properties_);
representations_[index] = Representation::Tagged();
if (types_[index] == DATA || types_[index] == ACCESSOR) {
- values_[index] = HeapType::Any(isolate_);
+ values_[index] = FieldType::Any(isolate_);
}
}
@@ -232,8 +232,8 @@ class Expectations {
switch (type) {
case DATA:
case ACCESSOR: {
- HeapType* type = descriptors->GetFieldType(descriptor);
- return HeapType::cast(expected_value)->Equals(type);
+ FieldType* type = descriptors->GetFieldType(descriptor);
+ return FieldType::cast(expected_value) == type;
}
case DATA_CONSTANT:
@@ -280,7 +280,7 @@ class Expectations {
Handle<Map> AddDataField(Handle<Map> map, PropertyAttributes attributes,
Representation representation,
- Handle<HeapType> heap_type) {
+ Handle<FieldType> heap_type) {
CHECK_EQ(number_of_properties_, map->NumberOfOwnDescriptors());
int property_index = number_of_properties_++;
SetDataField(property_index, attributes, representation, heap_type);
@@ -306,7 +306,7 @@ class Expectations {
Handle<Map> TransitionToDataField(Handle<Map> map,
PropertyAttributes attributes,
Representation representation,
- Handle<HeapType> heap_type,
+ Handle<FieldType> heap_type,
Handle<Object> value) {
CHECK_EQ(number_of_properties_, map->NumberOfOwnDescriptors());
int property_index = number_of_properties_++;
@@ -332,7 +332,7 @@ class Expectations {
Handle<Map> FollowDataTransition(Handle<Map> map,
PropertyAttributes attributes,
Representation representation,
- Handle<HeapType> heap_type) {
+ Handle<FieldType> heap_type) {
CHECK_EQ(number_of_properties_, map->NumberOfOwnDescriptors());
int property_index = number_of_properties_++;
SetDataField(property_index, attributes, representation, heap_type);
@@ -421,8 +421,8 @@ TEST(ReconfigureAccessorToNonExistingDataField) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> none_type = HeapType::None(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> none_type = FieldType::None(isolate);
Handle<AccessorPair> pair = CreateAccessorPair(true, true);
Expectations expectations(isolate);
@@ -533,12 +533,12 @@ TEST(ReconfigureAccessorToNonExistingDataFieldHeavy) {
//
static void TestGeneralizeRepresentation(
int detach_property_at_index, int property_index,
- Representation from_representation, Handle<HeapType> from_type,
- Representation to_representation, Handle<HeapType> to_type,
- Representation expected_representation, Handle<HeapType> expected_type,
+ Representation from_representation, Handle<FieldType> from_type,
+ Representation to_representation, Handle<FieldType> to_type,
+ Representation expected_representation, Handle<FieldType> expected_type,
bool expected_deprecation, bool expected_field_type_dependency) {
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
CHECK(detach_property_at_index >= -1 &&
detach_property_at_index < kPropCount);
@@ -639,11 +639,10 @@ static void TestGeneralizeRepresentation(
CHECK_EQ(*new_map, *updated_map);
}
-
static void TestGeneralizeRepresentation(
- Representation from_representation, Handle<HeapType> from_type,
- Representation to_representation, Handle<HeapType> to_type,
- Representation expected_representation, Handle<HeapType> expected_type,
+ Representation from_representation, Handle<FieldType> from_type,
+ Representation to_representation, Handle<FieldType> to_type,
+ Representation expected_representation, Handle<FieldType> expected_type,
bool expected_deprecation, bool expected_field_type_dependency) {
// Check the cases when the map being reconfigured is a part of the
// transition tree.
@@ -670,19 +669,18 @@ static void TestGeneralizeRepresentation(
// Check that reconfiguration to the very same field works correctly.
Representation representation = from_representation;
- Handle<HeapType> type = from_type;
+ Handle<FieldType> type = from_type;
TestGeneralizeRepresentation(-1, 2, representation, type, representation,
type, representation, type, false, false);
}
}
-
static void TestGeneralizeRepresentation(Representation from_representation,
- Handle<HeapType> from_type,
+ Handle<FieldType> from_type,
Representation to_representation,
- Handle<HeapType> to_type,
+ Handle<FieldType> to_type,
Representation expected_representation,
- Handle<HeapType> expected_type) {
+ Handle<FieldType> expected_type) {
const bool expected_deprecation = true;
const bool expected_field_type_dependency = false;
@@ -692,11 +690,10 @@ static void TestGeneralizeRepresentation(Representation from_representation,
expected_field_type_dependency);
}
-
static void TestGeneralizeRepresentationTrivial(
- Representation from_representation, Handle<HeapType> from_type,
- Representation to_representation, Handle<HeapType> to_type,
- Representation expected_representation, Handle<HeapType> expected_type,
+ Representation from_representation, Handle<FieldType> from_type,
+ Representation to_representation, Handle<FieldType> to_type,
+ Representation expected_representation, Handle<FieldType> expected_type,
bool expected_field_type_dependency = true) {
const bool expected_deprecation = false;
@@ -711,7 +708,7 @@ TEST(GeneralizeRepresentationSmiToDouble) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
TestGeneralizeRepresentation(Representation::Smi(), any_type,
Representation::Double(), any_type,
@@ -723,9 +720,9 @@ TEST(GeneralizeRepresentationSmiToTagged) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
TestGeneralizeRepresentation(Representation::Smi(), any_type,
Representation::HeapObject(), value_type,
@@ -737,9 +734,9 @@ TEST(GeneralizeRepresentationDoubleToTagged) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
TestGeneralizeRepresentation(Representation::Double(), any_type,
Representation::HeapObject(), value_type,
@@ -751,9 +748,9 @@ TEST(GeneralizeRepresentationHeapObjectToTagged) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
TestGeneralizeRepresentation(Representation::HeapObject(), value_type,
Representation::Smi(), any_type,
@@ -765,29 +762,23 @@ TEST(GeneralizeRepresentationHeapObjectToHeapObject) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
- const int kMaxClassesPerFieldType = 1;
- Handle<HeapType> current_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> current_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
- for (int i = 0; i < kMaxClassesPerFieldType; i++) {
- Handle<HeapType> new_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> new_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
- Handle<HeapType> expected_type =
- (i < kMaxClassesPerFieldType - 1)
- ? HeapType::Union(current_type, new_type, isolate)
- : any_type;
+ Handle<FieldType> expected_type = any_type;
TestGeneralizeRepresentationTrivial(
Representation::HeapObject(), current_type,
Representation::HeapObject(), new_type, Representation::HeapObject(),
expected_type);
current_type = expected_type;
- }
- Handle<HeapType> new_type = HeapType::Class(Map::Create(isolate, 0), isolate);
+ new_type = FieldType::Class(Map::Create(isolate, 0), isolate);
TestGeneralizeRepresentationTrivial(
Representation::HeapObject(), any_type, Representation::HeapObject(),
@@ -799,8 +790,8 @@ TEST(GeneralizeRepresentationNoneToSmi) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> none_type = HeapType::None(isolate);
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> none_type = FieldType::None(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
// None -> Smi representation change is trivial.
TestGeneralizeRepresentationTrivial(Representation::None(), none_type,
@@ -813,8 +804,8 @@ TEST(GeneralizeRepresentationNoneToDouble) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> none_type = HeapType::None(isolate);
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> none_type = FieldType::None(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
// None -> Double representation change is NOT trivial.
TestGeneralizeRepresentation(Representation::None(), none_type,
@@ -827,9 +818,9 @@ TEST(GeneralizeRepresentationNoneToHeapObject) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> none_type = HeapType::None(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> none_type = FieldType::None(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
// None -> HeapObject representation change is trivial.
TestGeneralizeRepresentationTrivial(Representation::None(), none_type,
@@ -842,8 +833,8 @@ TEST(GeneralizeRepresentationNoneToTagged) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> none_type = HeapType::None(isolate);
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> none_type = FieldType::None(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
// None -> HeapObject representation change is trivial.
TestGeneralizeRepresentationTrivial(Representation::None(), none_type,
@@ -861,7 +852,7 @@ TEST(GeneralizeRepresentationWithAccessorProperties) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
Handle<AccessorPair> pair = CreateAccessorPair(true, true);
const int kAccessorProp = kPropCount / 2;
@@ -932,9 +923,9 @@ TEST(GeneralizeRepresentationWithAccessorProperties) {
// where "p2A" and "p2B" differ only in the attributes.
//
static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
- Representation from_representation, Handle<HeapType> from_type,
- Representation to_representation, Handle<HeapType> to_type,
- Representation expected_representation, Handle<HeapType> expected_type) {
+ Representation from_representation, Handle<FieldType> from_type,
+ Representation to_representation, Handle<FieldType> to_type,
+ Representation expected_representation, Handle<FieldType> expected_type) {
Isolate* isolate = CcTest::i_isolate();
Expectations expectations(isolate);
@@ -1016,9 +1007,9 @@ static void TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
// where "p2A" and "p2B" differ only in the attributes.
//
static void TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
- Representation from_representation, Handle<HeapType> from_type,
- Representation to_representation, Handle<HeapType> to_type,
- Representation expected_representation, Handle<HeapType> expected_type,
+ Representation from_representation, Handle<FieldType> from_type,
+ Representation to_representation, Handle<FieldType> to_type,
+ Representation expected_representation, Handle<FieldType> expected_type,
bool expected_field_type_dependency = true) {
Isolate* isolate = CcTest::i_isolate();
@@ -1096,7 +1087,7 @@ TEST(ReconfigureDataFieldAttribute_GeneralizeRepresentationSmiToDouble) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
Representation::Smi(), any_type, Representation::Double(), any_type,
@@ -1108,9 +1099,9 @@ TEST(ReconfigureDataFieldAttribute_GeneralizeRepresentationSmiToTagged) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
Representation::Smi(), any_type, Representation::HeapObject(), value_type,
@@ -1122,9 +1113,9 @@ TEST(ReconfigureDataFieldAttribute_GeneralizeRepresentationDoubleToTagged) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
Representation::Double(), any_type, Representation::HeapObject(),
@@ -1136,29 +1127,22 @@ TEST(ReconfigureDataFieldAttribute_GeneralizeRepresentationHeapObjToHeapObj) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
- const int kMaxClassesPerFieldType = 1;
- Handle<HeapType> current_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> current_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
- for (int i = 0; i < kMaxClassesPerFieldType; i++) {
- Handle<HeapType> new_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> new_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
- Handle<HeapType> expected_type =
- (i < kMaxClassesPerFieldType - 1)
- ? HeapType::Union(current_type, new_type, isolate)
- : any_type;
+ Handle<FieldType> expected_type = any_type;
- TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
- Representation::HeapObject(), current_type,
- Representation::HeapObject(), new_type, Representation::HeapObject(),
- expected_type);
- current_type = expected_type;
- }
+ TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
+ Representation::HeapObject(), current_type, Representation::HeapObject(),
+ new_type, Representation::HeapObject(), expected_type);
+ current_type = expected_type;
- Handle<HeapType> new_type = HeapType::Class(Map::Create(isolate, 0), isolate);
+ new_type = FieldType::Class(Map::Create(isolate, 0), isolate);
TestReconfigureDataFieldAttribute_GeneralizeRepresentationTrivial(
Representation::HeapObject(), any_type, Representation::HeapObject(),
@@ -1170,9 +1154,9 @@ TEST(ReconfigureDataFieldAttribute_GeneralizeRepresentationHeapObjectToTagged) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
TestReconfigureDataFieldAttribute_GeneralizeRepresentation(
Representation::HeapObject(), value_type, Representation::Smi(), any_type,
@@ -1268,7 +1252,7 @@ template <typename TestConfig, typename Checker>
static void TestReconfigureProperty_CustomPropertyAfterTargetMap(
TestConfig& config, Checker& checker) {
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
const int kCustomPropIndex = kPropCount - 2;
Expectations expectations(isolate);
@@ -1391,8 +1375,8 @@ TEST(ReconfigureDataFieldAttribute_DataConstantToDataFieldAfterTargetMap) {
void UpdateExpectations(int property_index, Expectations& expectations) {
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> function_type =
- HeapType::Class(isolate->sloppy_function_map(), isolate);
+ Handle<FieldType> function_type =
+ FieldType::Class(isolate->sloppy_function_map(), isolate);
expectations.SetDataField(property_index, Representation::HeapObject(),
function_type);
}
@@ -1523,7 +1507,7 @@ TEST(ReconfigureDataFieldAttribute_AccConstantToDataFieldAfterTargetMap) {
return expectations.AddAccessorConstant(map, NONE, pair_);
} else {
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
return expectations.AddDataField(map, NONE, Representation::Smi(),
any_type);
}
@@ -1547,7 +1531,7 @@ TEST(ReconfigurePropertySplitMapTransitionsOverflow) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
Expectations expectations(isolate);
@@ -1638,9 +1622,9 @@ TEST(ReconfigurePropertySplitMapTransitionsOverflow) {
template <typename TestConfig>
static void TestGeneralizeRepresentationWithSpecialTransition(
TestConfig& config, Representation from_representation,
- Handle<HeapType> from_type, Representation to_representation,
- Handle<HeapType> to_type, Representation expected_representation,
- Handle<HeapType> expected_type) {
+ Handle<FieldType> from_type, Representation to_representation,
+ Handle<FieldType> to_type, Representation expected_representation,
+ Handle<FieldType> expected_type) {
Isolate* isolate = CcTest::i_isolate();
Expectations expectations(isolate);
@@ -1730,9 +1714,9 @@ TEST(ElementsKindTransitionFromMapOwningDescriptor) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
struct TestConfig {
Handle<Map> Transition(Handle<Map> map) {
@@ -1754,14 +1738,14 @@ TEST(ElementsKindTransitionFromMapNotOwningDescriptor) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
struct TestConfig {
Handle<Map> Transition(Handle<Map> map) {
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
// Add one more transition to |map| in order to prevent descriptors
// ownership.
@@ -1789,9 +1773,9 @@ TEST(ForObservedTransitionFromMapOwningDescriptor) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
struct TestConfig {
Handle<Map> Transition(Handle<Map> map) {
@@ -1812,14 +1796,14 @@ TEST(ForObservedTransitionFromMapNotOwningDescriptor) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
struct TestConfig {
Handle<Map> Transition(Handle<Map> map) {
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
// Add one more transition to |map| in order to prevent descriptors
// ownership.
@@ -1847,9 +1831,9 @@ TEST(PrototypeTransitionFromMapOwningDescriptor) {
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
struct TestConfig {
Handle<JSObject> prototype_;
@@ -1881,9 +1865,9 @@ TEST(PrototypeTransitionFromMapNotOwningDescriptor) {
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
- Handle<HeapType> value_type =
- HeapType::Class(Map::Create(isolate, 0), isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
+ Handle<FieldType> value_type =
+ FieldType::Class(Map::Create(isolate, 0), isolate);
struct TestConfig {
Handle<JSObject> prototype_;
@@ -1896,7 +1880,7 @@ TEST(PrototypeTransitionFromMapNotOwningDescriptor) {
Handle<Map> Transition(Handle<Map> map) {
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
// Add one more transition to |map| in order to prevent descriptors
// ownership.
@@ -1928,11 +1912,11 @@ TEST(PrototypeTransitionFromMapNotOwningDescriptor) {
struct TransitionToDataFieldOperator {
Representation representation_;
PropertyAttributes attributes_;
- Handle<HeapType> heap_type_;
+ Handle<FieldType> heap_type_;
Handle<Object> value_;
TransitionToDataFieldOperator(Representation representation,
- Handle<HeapType> heap_type,
+ Handle<FieldType> heap_type,
Handle<Object> value,
PropertyAttributes attributes = NONE)
: representation_(representation),
@@ -1979,11 +1963,11 @@ struct ReconfigureAsDataPropertyOperator {
int descriptor_;
Representation representation_;
PropertyAttributes attributes_;
- Handle<HeapType> heap_type_;
+ Handle<FieldType> heap_type_;
ReconfigureAsDataPropertyOperator(int descriptor,
Representation representation,
- Handle<HeapType> heap_type,
+ Handle<FieldType> heap_type,
PropertyAttributes attributes = NONE)
: descriptor_(descriptor),
representation_(representation),
@@ -2019,10 +2003,10 @@ struct FieldGeneralizationChecker {
int descriptor_;
Representation representation_;
PropertyAttributes attributes_;
- Handle<HeapType> heap_type_;
+ Handle<FieldType> heap_type_;
FieldGeneralizationChecker(int descriptor, Representation representation,
- Handle<HeapType> heap_type,
+ Handle<FieldType> heap_type,
PropertyAttributes attributes = NONE)
: descriptor_(descriptor),
representation_(representation),
@@ -2085,7 +2069,7 @@ template <typename TransitionOp1, typename TransitionOp2, typename Checker>
static void TestTransitionTo(TransitionOp1& transition_op1,
TransitionOp2& transition_op2, Checker& checker) {
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
Expectations expectations(isolate);
@@ -2113,7 +2097,7 @@ TEST(TransitionDataFieldToDataField) {
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
Handle<Object> value1 = handle(Smi::FromInt(0), isolate);
TransitionToDataFieldOperator transition_op1(Representation::Smi(), any_type,
@@ -2148,8 +2132,8 @@ TEST(TransitionDataConstantToAnotherDataConstant) {
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory();
- Handle<HeapType> function_type =
- HeapType::Class(isolate->sloppy_function_map(), isolate);
+ Handle<FieldType> function_type =
+ FieldType::Class(isolate->sloppy_function_map(), isolate);
Handle<JSFunction> js_func1 = factory->NewFunction(factory->empty_string());
TransitionToDataConstantOperator transition_op1(js_func1);
@@ -2168,7 +2152,7 @@ TEST(TransitionDataConstantToDataField) {
v8::HandleScope scope(CcTest::isolate());
Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory();
- Handle<HeapType> any_type = HeapType::Any(isolate);
+ Handle<FieldType> any_type = FieldType::Any(isolate);
Handle<JSFunction> js_func1 = factory->NewFunction(factory->empty_string());
TransitionToDataConstantOperator transition_op1(js_func1);

Powered by Google App Engine
This is Rietveld 408576698