Home | History | Annotate | Download | only in cctest

Lines Matching refs:map

32     Map* map, DescriptorArray* descriptors,
34 map->InitializeDescriptors(descriptors, layout_descriptor);
35 CHECK(layout_descriptor->IsConsistentWithMap(map, true));
175 Handle<Map> map = Map::Create(isolate, kPropsCount);
177 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
180 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
191 Handle<Map> map = Map::Create(isolate, inobject_properties);
194 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
203 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
208 Handle<Map> map = Map::Create(isolate, inobject_properties);
210 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
222 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
230 // Play with the bits but leave it in consistent state with map at the end.
239 CHECK(layout_descriptor->IsConsistentWithMap(*map, true));
498 Handle<Map> map = Map::Create(isolate, 0);
499 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
501 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
505 Handle<Map> map = Map::Create(isolate, 1);
506 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
508 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
512 Handle<Map> map = Map::Create(isolate, 2);
513 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
520 map, *descriptors, *layout_descriptor);
541 Handle<Map> map = Map::Create(isolate, 0);
542 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
544 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
548 Handle<Map> map = Map::Create(isolate, 1);
549 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
551 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
555 Handle<Map> map = Map::Create(isolate, 2);
556 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
563 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
568 Handle<Map> map = Map::Create(isolate, inobject_properties);
569 layout_descriptor = LayoutDescriptor::New(map, descriptors, kPropsCount);
581 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
585 LayoutDescriptor::New(map, descriptors, kPropsCount);
618 Handle<Map> map = Map::Create(isolate, inobject_properties);
619 map->InitializeDescriptors(*descriptors,
632 layout_descriptor = LayoutDescriptor::ShareAppend(map, d.GetDetails());
639 layout_descriptor = LayoutDescriptor::ShareAppend(map, f.GetDetails());
643 bool is_inobject = field_index < map->GetInObjectProperties();
650 map->InitializeDescriptors(*descriptors, *layout_descriptor);
652 Handle<LayoutDescriptor> layout_descriptor(map->layout_descriptor(), isolate);
653 CHECK(layout_descriptor->IsConsistentWithMap(*map, true));
744 Handle<Map> initial_map = Map::Create(isolate, inobject_properties);
753 // and does all the required map-descriptors related book keeping.
754 Handle<Map> last_map = Map::AddMissingTransitionsForTesting(
757 // Follow back pointers to construct a sequence of maps from |map|
760 std::vector<Handle<Map>> maps(descriptors_length);
763 Map* map = *last_map;
765 maps[descriptors_length - 1 - i] = handle(map, isolate);
766 Object* maybe_map = map->GetBackPointer();
768 map = Map::cast(maybe_map);
769 CHECK(!map->is_stable());
774 Handle<Map> map;
778 map = maps[i];
779 LayoutDescriptor* layout_desc = map->layout_descriptor();
791 bool is_inobject = field_index < map->GetInObjectProperties();
799 CHECK(map->layout_descriptor()->IsConsistentWithMap(*map));
802 Handle<LayoutDescriptor> layout_descriptor(map->GetLayoutDescriptor(),
804 CHECK(layout_descriptor->IsConsistentWithMap(*map));
910 Handle<Map> map = Map::Create(isolate, kPropsCount);
912 LayoutDescriptor::New(map, descriptors, kPropsCount);
913 map->InitializeDescriptors(*descriptors, *layout_descriptor);
915 Handle<JSObject> object = factory->NewJSObjectFromMap(map, TENURED);
923 FieldIndex index = FieldIndex::ForDescriptor(*map, i);
924 CHECK(map->IsUnboxedDoubleField(index));
928 CHECK(!object->map()->HasFastPointerLayout());
930 Handle<Map> normalized_map =
931 Map::Normalize(map, KEEP_INOBJECT_PROPERTIES, "testing");
934 CHECK(object->map()->HasFastPointerLayout());
951 Handle<Map> map = Map::Create(isolate, kFieldCount);
953 map = Map::CopyWithField(map, MakeName("prop", i), any_type, NONE,
957 map = Map::CopyWithField(map, MakeName("dbl", kSplitFieldIndex), any_type,
960 CHECK(map->layout_descriptor()->IsConsistentWithMap(*map, true));
961 CHECK(map->layout_descriptor()->IsSlowLayout());
962 CHECK(map->owns_descriptors());
963 CHECK_EQ(2, map->layout_descriptor()->length());
969 Handle<Map> tmp_map = map;
971 tmp_map = Map::CopyWithField(tmp_map, MakeName("dbl", i), any_type, NONE,
978 CHECK_EQ(map->instance_descriptors(), tmp_map->instance_descriptors());
979 CHECK_EQ(map->layout_descriptor(), tmp_map->layout_descriptor());
981 CHECK(map->layout_descriptor()->IsSlowLayout());
982 CHECK_EQ(4, map->layout_descriptor()->length());
985 CHECK(map->layout_descriptor()->IsConsistentWithMap(*map));
987 CHECK(!map->layout_descriptor()->IsTagged(i));
989 CHECK_LT(map->NumberOfOwnDescriptors(),
990 map->instance_descriptors()->number_of_descriptors());
992 // Call GC that should trim both |map|'s descriptor array and layout
997 CHECK(map->layout_descriptor()->IsConsistentWithMap(*map, true));
998 CHECK(map->owns_descriptors());
999 CHECK_EQ(map->NumberOfOwnDescriptors(),
1000 map->instance_descriptors()->number_of_descriptors());
1001 CHECK(map->layout_descriptor()->IsSlowLayout());
1002 CHECK_EQ(2, map->layout_descriptor()->length());
1008 Handle<Map> tmp_map = map;
1010 tmp_map = Map::CopyWithField(tmp_map, MakeName("tagged", i), any_type,
1015 tmp_map = Map::CopyWithField(tmp_map, MakeString("dbl"), any_type, NONE,
1021 CHECK_EQ(map->instance_descriptors(), tmp_map->instance_descriptors());
1023 CHECK(map->layout_descriptor()->IsSlowLayout());
1039 Handle<Map> map = Map::Create(isolate, 10);
1040 map = Map::CopyWithField(map, MakeName("prop", 0), any_type, NONE,
1045 Handle<JSObject> obj = factory->NewJSObjectFromMap(map, NOT_TENURED);
1052 FieldIndex field_index = FieldIndex::ForDescriptor(*map, 0);
1054 CHECK_EQ(FLAG_unbox_double_fields, map->IsUnboxedDoubleField(field_index));
1071 FieldIndex field_index = FieldIndex::ForDescriptor(obj->map(), 0);
1101 Handle<Map> map = Map::Create(isolate, 10);
1102 map = Map::CopyWithField(map, MakeName("prop", 0), any_type, NONE,
1105 map = Map::CopyWithField(map, MakeName("prop", 1), any_type, NONE,
1122 Handle<JSObject> obj = factory->NewJSObjectFromMap(map, NOT_TENURED);
1130 FieldIndex field_index = FieldIndex::ForDescriptor(*map, 0);
1132 CHECK_EQ(FLAG_unbox_double_fields, map->IsUnboxedDoubleField(field_index));
1135 field_index = FieldIndex::ForDescriptor(*map, 1);
1137 CHECK(!map->IsUnboxedDoubleField(field_index));
1171 FieldIndex field_index = FieldIndex::ForDescriptor(*map, 1);
1180 Handle<Map> map = Map::Create(isolate, inobject_properties);
1183 map, descriptors, descriptors->number_of_descriptors());
1184 InitializeVerifiedMapDescriptors(*map, *descriptors, *layout_descriptor);
1186 LayoutDescriptorHelper helper(*map);
1189 int instance_size = map->instance_size();
1196 FieldIndex index = FieldIndex::ForDescriptor(*map, i);
1326 Handle<Map> split_map;
1328 Handle<Map> map = Map::Create(isolate, 64);
1331 map = Map::CopyWithField(map, name, any_type, NONE, Representation::Smi(),
1334 split_map = Map::CopyWithField(map, MakeString("dbl"), any_type, NONE,
1344 Handle<Map> map1 = Map::CopyWithField(split_map, MakeString("foo"), any_type,
1355 Handle<Map> map2 = Map::CopyWithField(split_map, MakeString("bar"), any_type,
1373 Handle<Map> map = Map::Create(isolate, 10);
1374 map = Map::CopyWithField(map, MakeName("prop", 0), any_type, NONE,
1379 Handle<JSObject> obj = factory->NewJSObjectFromMap(map, NOT_TENURED);
1386 DescriptorArray* descriptors = map->instance_descriptors();
1388 FieldIndex field_index = FieldIndex::ForDescriptor(*map, 0);
1390 CHECK_EQ(FLAG_unbox_double_fields, map->IsUnboxedDoubleField(field_index));
1410 FieldIndex field_index = FieldIndex::ForDescriptor(obj->map(), 0);
1425 static void TestWriteBarrier(Handle<Map> map, Handle<Map> new_map,
1435 // The plan: create |obj| by |map| in old space, create |obj_value| in
1446 obj = factory->NewJSObjectFromMap(map, TENURED);
1455 FieldIndex index = FieldIndex::ForDescriptor(*map, tagged_descriptor);
1486 static void TestIncrementalWriteBarrier(Handle<Map> map, Handle<Map> new_map,
1497 // The plan: create |obj| by |map| in old space, create |obj_value| in
1510 obj = factory->NewJSObjectFromMap(map, TENURED);
1539 FieldIndex index = FieldIndex::ForDescriptor(*map, tagged_descriptor);
1589 Handle<Map> map = Map::Create(isolate, 10);
1590 map = Map::CopyWithConstant(map, MakeName("prop", 0), func, NONE,
1592 map = Map::CopyWithField(map, MakeName("prop", 1), any_type, NONE,
1595 map = Map::CopyWithField(map, MakeName("prop", 2), any_type, NONE,
1600 Handle<Map> new_map = Map::ReconfigureProperty(
1601 map, 0, kData, NONE, Representation::Tagged(), any_type, FORCE_FIELD);
1604 TestWriteBarrier(map, new_map, 2, 1);
1607 TestIncrementalWriteBarrier(map, new_map, 2, 1);
1625 // Map::ReconfigureProperty().
1629 // Map::ReconfigureProperty() supports that.