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

Unified Diff: test/cctest/test-transitions.cc

Issue 2598543003: [runtime][ic] Constant field tracking support. (Closed)
Patch Set: Addressing comments Created 3 years, 10 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-field-type-tracking.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-transitions.cc
diff --git a/test/cctest/test-transitions.cc b/test/cctest/test-transitions.cc
index 842a6ca47f089e480ad7571d23b42089c147688a..a38c6b2aa514e51aa3123dc7fd7e773cf195d1a4 100644
--- a/test/cctest/test-transitions.cc
+++ b/test/cctest/test-transitions.cc
@@ -38,11 +38,13 @@ TEST(TransitionArray_SimpleFieldTransitions) {
Handle<Map> map0 = Map::Create(isolate, 0);
Handle<Map> map1 =
Map::CopyWithField(map0, name1, handle(FieldType::Any(), isolate),
- attributes, Representation::Tagged(), OMIT_TRANSITION)
+ attributes, kMutable, Representation::Tagged(),
+ OMIT_TRANSITION)
.ToHandleChecked();
Handle<Map> map2 =
Map::CopyWithField(map0, name2, handle(FieldType::Any(), isolate),
- attributes, Representation::Tagged(), OMIT_TRANSITION)
+ attributes, kMutable, Representation::Tagged(),
+ OMIT_TRANSITION)
.ToHandleChecked();
CHECK(map0->raw_transitions()->IsSmi());
@@ -89,11 +91,13 @@ TEST(TransitionArray_FullFieldTransitions) {
Handle<Map> map0 = Map::Create(isolate, 0);
Handle<Map> map1 =
Map::CopyWithField(map0, name1, handle(FieldType::Any(), isolate),
- attributes, Representation::Tagged(), OMIT_TRANSITION)
+ attributes, kMutable, Representation::Tagged(),
+ OMIT_TRANSITION)
.ToHandleChecked();
Handle<Map> map2 =
Map::CopyWithField(map0, name2, handle(FieldType::Any(), isolate),
- attributes, Representation::Tagged(), OMIT_TRANSITION)
+ attributes, kMutable, Representation::Tagged(),
+ OMIT_TRANSITION)
.ToHandleChecked();
CHECK(map0->raw_transitions()->IsSmi());
@@ -145,10 +149,11 @@ TEST(TransitionArray_DifferentFieldNames) {
EmbeddedVector<char, 64> buffer;
SNPrintF(buffer, "prop%d", i);
Handle<String> name = factory->InternalizeUtf8String(buffer.start());
- Handle<Map> map = Map::CopyWithField(
- map0, name, handle(FieldType::Any(), isolate),
- attributes, Representation::Tagged(), OMIT_TRANSITION)
- .ToHandleChecked();
+ Handle<Map> map =
+ Map::CopyWithField(map0, name, handle(FieldType::Any(), isolate),
+ attributes, kMutable, Representation::Tagged(),
+ OMIT_TRANSITION)
+ .ToHandleChecked();
names[i] = name;
maps[i] = map;
@@ -194,10 +199,10 @@ TEST(TransitionArray_SameFieldNamesDifferentAttributesSimple) {
for (int i = 0; i < ATTRS_COUNT; i++) {
PropertyAttributes attributes = static_cast<PropertyAttributes>(i);
- Handle<Map> map = Map::CopyWithField(
- map0, name, handle(FieldType::Any(), isolate),
- attributes, Representation::Tagged(), OMIT_TRANSITION)
- .ToHandleChecked();
+ Handle<Map> map =
+ Map::CopyWithField(map0, name, FieldType::Any(isolate), attributes,
+ kMutable, Representation::Tagged(), OMIT_TRANSITION)
+ .ToHandleChecked();
attr_maps[i] = map;
TransitionArray::Insert(map0, name, map, PROPERTY_TRANSITION);
@@ -239,7 +244,7 @@ TEST(TransitionArray_SameFieldNamesDifferentAttributes) {
Handle<String> name = factory->InternalizeUtf8String(buffer.start());
Handle<Map> map =
Map::CopyWithField(map0, name, handle(FieldType::Any(), isolate), NONE,
- Representation::Tagged(), OMIT_TRANSITION)
+ kMutable, Representation::Tagged(), OMIT_TRANSITION)
.ToHandleChecked();
names[i] = name;
maps[i] = map;
@@ -256,10 +261,11 @@ TEST(TransitionArray_SameFieldNamesDifferentAttributes) {
for (int i = 0; i < ATTRS_COUNT; i++) {
PropertyAttributes attributes = static_cast<PropertyAttributes>(i);
- Handle<Map> map = Map::CopyWithField(
- map0, name, handle(FieldType::Any(), isolate),
- attributes, Representation::Tagged(), OMIT_TRANSITION)
- .ToHandleChecked();
+ Handle<Map> map =
+ Map::CopyWithField(map0, name, handle(FieldType::Any(), isolate),
+ attributes, kMutable, Representation::Tagged(),
+ OMIT_TRANSITION)
+ .ToHandleChecked();
attr_maps[i] = map;
TransitionArray::Insert(map0, name, map, PROPERTY_TRANSITION);
« no previous file with comments | « test/cctest/test-field-type-tracking.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698