diff --git a/common.gypi b/common.gypi index 0d3cdb81b8dd7c..5b84ca43aff2bd 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.58', + 'v8_embedder_string': '-node.59', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/test/cctest/cctest.cc b/deps/v8/test/cctest/cctest.cc index 09e390a6931630..3110681c1037d5 100644 --- a/deps/v8/test/cctest/cctest.cc +++ b/deps/v8/test/cctest/cctest.cc @@ -150,6 +150,18 @@ void CcTest::PreciseCollectAllGarbage(i::Isolate* isolate) { i::GarbageCollectionReason::kTesting); } +i::Handle CcTest::MakeString(const char* str) { + i::Isolate* isolate = CcTest::i_isolate(); + i::Factory* factory = isolate->factory(); + return factory->InternalizeUtf8String(str); +} + +i::Handle CcTest::MakeName(const char* str, int suffix) { + i::EmbeddedVector buffer; + SNPrintF(buffer, "%s%d", str, suffix); + return CcTest::MakeString(buffer.begin()); +} + v8::base::RandomNumberGenerator* CcTest::random_number_generator() { return InitIsolateOnce()->random_number_generator(); } diff --git a/deps/v8/test/cctest/cctest.h b/deps/v8/test/cctest/cctest.h index 74dd9d18225a3e..7bb82294115c7b 100644 --- a/deps/v8/test/cctest/cctest.h +++ b/deps/v8/test/cctest/cctest.h @@ -141,6 +141,9 @@ class CcTest { static void CollectAllAvailableGarbage(i::Isolate* isolate = nullptr); static void PreciseCollectAllGarbage(i::Isolate* isolate = nullptr); + static i::Handle MakeString(const char* str); + static i::Handle MakeName(const char* str, int suffix); + static v8::base::RandomNumberGenerator* random_number_generator(); static v8::Local global(); diff --git a/deps/v8/test/cctest/test-code-stub-assembler.cc b/deps/v8/test/cctest/test-code-stub-assembler.cc index a371325340d177..d0b91de7d2da1d 100644 --- a/deps/v8/test/cctest/test-code-stub-assembler.cc +++ b/deps/v8/test/cctest/test-code-stub-assembler.cc @@ -42,18 +42,6 @@ template using TVariable = TypedCodeAssemblerVariable; using PromiseResolvingFunctions = TorqueStructPromiseResolvingFunctions; -Handle MakeString(const char* str) { - Isolate* isolate = CcTest::i_isolate(); - Factory* factory = isolate->factory(); - return factory->InternalizeUtf8String(str); -} - -Handle MakeName(const char* str, int suffix) { - EmbeddedVector buffer; - SNPrintF(buffer, "%s%d", str, suffix); - return MakeString(buffer.begin()); -} - intptr_t sum10(intptr_t a0, intptr_t a1, intptr_t a2, intptr_t a3, intptr_t a4, intptr_t a5, intptr_t a6, intptr_t a7, intptr_t a8, intptr_t a9) { @@ -1091,7 +1079,7 @@ TEST(TransitionLookup) { name = factory->NewSymbol(); } else { int random_key = rand_gen.NextInt(Smi::kMaxValue); - name = MakeName("p", random_key); + name = CcTest::MakeName("p", random_key); } keys[i] = name; @@ -3646,8 +3634,8 @@ TEST(TestCallBuiltinInlineTrampoline) { options.use_pc_relative_calls_and_jumps = false; options.isolate_independent_code = false; FunctionTester ft(asm_tester.GenerateCode(options), kNumParams); - MaybeHandle result = ft.Call(MakeString("abcdef")); - CHECK(String::Equals(isolate, MakeString("abcdefabcdef"), + MaybeHandle result = ft.Call(CcTest::MakeString("abcdef")); + CHECK(String::Equals(isolate, CcTest::MakeString("abcdefabcdef"), Handle::cast(result.ToHandleChecked()))); } @@ -3672,8 +3660,8 @@ DISABLED_TEST(TestCallBuiltinIndirectLoad) { options.use_pc_relative_calls_and_jumps = false; options.isolate_independent_code = true; FunctionTester ft(asm_tester.GenerateCode(options), kNumParams); - MaybeHandle result = ft.Call(MakeString("abcdef")); - CHECK(String::Equals(isolate, MakeString("abcdefabcdef"), + MaybeHandle result = ft.Call(CcTest::MakeString("abcdef")); + CHECK(String::Equals(isolate, CcTest::MakeString("abcdefabcdef"), Handle::cast(result.ToHandleChecked()))); } diff --git a/deps/v8/test/cctest/test-elements-kind.cc b/deps/v8/test/cctest/test-elements-kind.cc index 2f6ec6c164bd88..a9460a89f97f37 100644 --- a/deps/v8/test/cctest/test-elements-kind.cc +++ b/deps/v8/test/cctest/test-elements-kind.cc @@ -27,19 +27,6 @@ namespace test_elements_kind { namespace { -Handle MakeString(const char* str) { - Isolate* isolate = CcTest::i_isolate(); - Factory* factory = isolate->factory(); - return factory->InternalizeUtf8String(str); -} - - -Handle MakeName(const char* str, int suffix) { - EmbeddedVector buffer; - SNPrintF(buffer, "%s%d", str, suffix); - return MakeString(buffer.begin()); -} - template bool EQUALS(Isolate* isolate, Handle left, Handle right) { if (*left == *right) return true; @@ -127,7 +114,7 @@ TEST(JSObjectAddingProperties) { // for the default constructor function no in-object properties are reserved // hence adding a single property will initialize the property-array - Handle name = MakeName("property", 0); + Handle name = CcTest::MakeName("property", 0); JSObject::DefinePropertyOrElementIgnoreAttributes(object, name, value, NONE) .Check(); CHECK_NE(object->map(), *previous_map); @@ -162,7 +149,7 @@ TEST(JSObjectInObjectAddingProperties) { // we have reserved space for in-object properties, hence adding up to // |nof_inobject_properties| will not create a property store for (int i = 0; i < nof_inobject_properties; i++) { - Handle name = MakeName("property", i); + Handle name = CcTest::MakeName("property", i); JSObject::DefinePropertyOrElementIgnoreAttributes(object, name, value, NONE) .Check(); } @@ -174,7 +161,7 @@ TEST(JSObjectInObjectAddingProperties) { // adding one more property will not fit in the in-object properties, thus // creating a property store int index = nof_inobject_properties + 1; - Handle name = MakeName("property", index); + Handle name = CcTest::MakeName("property", index); JSObject::DefinePropertyOrElementIgnoreAttributes(object, name, value, NONE) .Check(); CHECK_NE(object->map(), *previous_map); @@ -205,7 +192,7 @@ TEST(JSObjectAddingElements) { CHECK(EQUALS(isolate, object->elements(), empty_fixed_array)); // Adding an indexed element initializes the elements array - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(object, name, value, NONE) .Check(); // no change in elements_kind => no map transition @@ -217,7 +204,7 @@ TEST(JSObjectAddingElements) { // Adding more consecutive elements without a change in the backing store int non_dict_backing_store_limit = 100; for (int i = 1; i < non_dict_backing_store_limit; i++) { - name = MakeName("", i); + name = CcTest::MakeName("", i); JSObject::DefinePropertyOrElementIgnoreAttributes(object, name, value, NONE) .Check(); } @@ -229,7 +216,7 @@ TEST(JSObjectAddingElements) { // Adding an element at an very large index causes a change to // DICTIONARY_ELEMENTS - name = MakeString("100000000"); + name = CcTest::MakeString("100000000"); JSObject::DefinePropertyOrElementIgnoreAttributes(object, name, value, NONE) .Check(); // change in elements_kind => map transition @@ -260,7 +247,7 @@ TEST(JSArrayAddingProperties) { // for the default constructor function no in-object properties are reserved // hence adding a single property will initialize the property-array - Handle name = MakeName("property", 0); + Handle name = CcTest::MakeName("property", 0); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value, NONE) .Check(); // No change in elements_kind but added property => new map @@ -292,7 +279,7 @@ TEST(JSArrayAddingElements) { CHECK_EQ(0, Smi::ToInt(array->length())); // Adding an indexed element initializes the elements array - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value, NONE) .Check(); // no change in elements_kind => no map transition @@ -305,7 +292,7 @@ TEST(JSArrayAddingElements) { // Adding more consecutive elements without a change in the backing store int non_dict_backing_store_limit = 100; for (int i = 1; i < non_dict_backing_store_limit; i++) { - name = MakeName("", i); + name = CcTest::MakeName("", i); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value, NONE) .Check(); } @@ -319,7 +306,7 @@ TEST(JSArrayAddingElements) { // Adding an element at an very large index causes a change to // DICTIONARY_ELEMENTS int index = 100000000; - name = MakeName("", index); + name = CcTest::MakeName("", index); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value, NONE) .Check(); // change in elements_kind => map transition @@ -340,7 +327,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastSmiElements) { Handle name; Handle value_smi(Smi::FromInt(42), isolate); - Handle value_string(MakeString("value")); + Handle value_string(CcTest::MakeString("value")); Handle value_double = factory->NewNumber(3.1415); Handle array = @@ -350,7 +337,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastSmiElements) { CHECK_EQ(0, Smi::ToInt(array->length())); // `array[0] = smi_value` doesn't change the elements_kind - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_smi, NONE) .Check(); @@ -360,7 +347,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastSmiElements) { CHECK_EQ(1, Smi::ToInt(array->length())); // `delete array[0]` does not alter length, but changes the elments_kind - name = MakeString("0"); + name = CcTest::MakeString("0"); CHECK(JSReceiver::DeletePropertyOrElement(array, name).FromMaybe(false)); CHECK_NE(array->map(), *previous_map); CHECK_EQ(HOLEY_SMI_ELEMENTS, array->map().elements_kind()); @@ -368,11 +355,11 @@ TEST(JSArrayAddingElementsGeneralizingiFastSmiElements) { previous_map = handle(array->map(), isolate); // add a couple of elements again - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_smi, NONE) .Check(); - name = MakeString("1"); + name = CcTest::MakeString("1"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_smi, NONE) .Check(); @@ -381,7 +368,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastSmiElements) { CHECK_EQ(2, Smi::ToInt(array->length())); // Adding a string to the array changes from FAST_HOLEY_SMI to FAST_HOLEY - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_string, NONE) .Check(); @@ -391,14 +378,14 @@ TEST(JSArrayAddingElementsGeneralizingiFastSmiElements) { previous_map = handle(array->map(), isolate); // We don't transition back to FAST_SMI even if we remove the string - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_smi, NONE) .Check(); CHECK_EQ(array->map(), *previous_map); // Adding a double doesn't change the map either - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_double, NONE) .Check(); @@ -414,7 +401,7 @@ TEST(JSArrayAddingElementsGeneralizingFastElements) { Handle name; Handle value_smi(Smi::FromInt(42), isolate); - Handle value_string(MakeString("value")); + Handle value_string(CcTest::MakeString("value")); Handle array = factory->NewJSArray(ElementsKind::PACKED_ELEMENTS, 0, 0); @@ -423,7 +410,7 @@ TEST(JSArrayAddingElementsGeneralizingFastElements) { CHECK_EQ(0, Smi::ToInt(array->length())); // `array[0] = smi_value` doesn't change the elements_kind - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_smi, NONE) .Check(); @@ -433,7 +420,7 @@ TEST(JSArrayAddingElementsGeneralizingFastElements) { CHECK_EQ(1, Smi::ToInt(array->length())); // `delete array[0]` does not alter length, but changes the elments_kind - name = MakeString("0"); + name = CcTest::MakeString("0"); CHECK(JSReceiver::DeletePropertyOrElement(array, name).FromMaybe(false)); CHECK_NE(array->map(), *previous_map); CHECK_EQ(HOLEY_ELEMENTS, array->map().elements_kind()); @@ -441,11 +428,11 @@ TEST(JSArrayAddingElementsGeneralizingFastElements) { previous_map = handle(array->map(), isolate); // add a couple of elements, elements_kind stays HOLEY - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_string, NONE) .Check(); - name = MakeString("1"); + name = CcTest::MakeString("1"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_smi, NONE) .Check(); @@ -463,7 +450,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastDoubleElements) { Handle name; Handle value_smi(Smi::FromInt(42), isolate); - Handle value_string(MakeString("value")); + Handle value_string(CcTest::MakeString("value")); Handle value_double = factory->NewNumber(3.1415); Handle array = @@ -471,7 +458,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastDoubleElements) { Handle previous_map(array->map(), isolate); // `array[0] = value_double` changes |elements_kind| to PACKED_DOUBLE_ELEMENTS - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_double, NONE) .Check(); @@ -481,7 +468,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastDoubleElements) { previous_map = handle(array->map(), isolate); // `array[1] = value_smi` doesn't alter the |elements_kind| - name = MakeString("1"); + name = CcTest::MakeString("1"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_smi, NONE) .Check(); @@ -490,7 +477,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastDoubleElements) { CHECK_EQ(2, Smi::ToInt(array->length())); // `delete array[0]` does not alter length, but changes the elments_kind - name = MakeString("0"); + name = CcTest::MakeString("0"); CHECK(JSReceiver::DeletePropertyOrElement(array, name).FromMaybe(false)); CHECK_NE(array->map(), *previous_map); CHECK_EQ(HOLEY_DOUBLE_ELEMENTS, array->map().elements_kind()); @@ -498,7 +485,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastDoubleElements) { previous_map = handle(array->map(), isolate); // filling the hole `array[0] = value_smi` again doesn't transition back - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_double, NONE) .Check(); @@ -507,7 +494,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastDoubleElements) { CHECK_EQ(2, Smi::ToInt(array->length())); // Adding a string to the array changes to elements_kind PACKED_ELEMENTS - name = MakeString("1"); + name = CcTest::MakeString("1"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_string, NONE) .Check(); @@ -517,7 +504,7 @@ TEST(JSArrayAddingElementsGeneralizingiFastDoubleElements) { previous_map = handle(array->map(), isolate); // Adding a double doesn't change the map - name = MakeString("0"); + name = CcTest::MakeString("0"); JSObject::DefinePropertyOrElementIgnoreAttributes(array, name, value_double, NONE) .Check(); diff --git a/deps/v8/test/cctest/test-field-type-tracking.cc b/deps/v8/test/cctest/test-field-type-tracking.cc index 5282ab499a4a5b..740ae05c1eaf81 100644 --- a/deps/v8/test/cctest/test-field-type-tracking.cc +++ b/deps/v8/test/cctest/test-field-type-tracking.cc @@ -43,20 +43,6 @@ const int kPropCount = 7; // Helper functions. // -static Handle MakeString(const char* str) { - Isolate* isolate = CcTest::i_isolate(); - Factory* factory = isolate->factory(); - return factory->InternalizeUtf8String(str); -} - - -static Handle MakeName(const char* str, int suffix) { - EmbeddedVector buffer; - SNPrintF(buffer, "%s%d", str, suffix); - return MakeString(buffer.begin()); -} - - static Handle CreateAccessorPair(bool with_getter, bool with_setter) { Isolate* isolate = CcTest::i_isolate(); @@ -339,7 +325,7 @@ class Expectations { SetDataField(property_index, attributes, constness, representation, field_type); - Handle name = MakeName("prop", property_index); + Handle name = CcTest::MakeName("prop", property_index); return Map::CopyWithField(isolate_, map, name, field_type, attributes, constness, representation, INSERT_TRANSITION) .ToHandleChecked(); @@ -351,7 +337,7 @@ class Expectations { int property_index = number_of_properties_++; SetDataConstant(property_index, attributes, value); - Handle name = MakeName("prop", property_index); + Handle name = CcTest::MakeName("prop", property_index); return Map::CopyWithConstant(isolate_, map, name, value, attributes, INSERT_TRANSITION) .ToHandleChecked(); @@ -368,7 +354,7 @@ class Expectations { SetDataField(property_index, attributes, constness, representation, heap_type); - Handle name = MakeName("prop", property_index); + Handle name = CcTest::MakeName("prop", property_index); return Map::TransitionToDataProperty(isolate_, map, name, value, attributes, constness, StoreOrigin::kNamed); } @@ -380,7 +366,7 @@ class Expectations { int property_index = number_of_properties_++; SetDataConstant(property_index, attributes, value); - Handle name = MakeName("prop", property_index); + Handle name = CcTest::MakeName("prop", property_index); return Map::TransitionToDataProperty(isolate_, map, name, value, attributes, PropertyConstness::kConst, StoreOrigin::kNamed); @@ -396,7 +382,7 @@ class Expectations { SetDataField(property_index, attributes, constness, representation, heap_type); - Handle name = MakeName("prop", property_index); + Handle name = CcTest::MakeName("prop", property_index); Map target = TransitionsAccessor(isolate_, map) .SearchTransition(*name, kData, attributes); CHECK(!target.is_null()); @@ -410,7 +396,7 @@ class Expectations { int property_index = number_of_properties_++; SetAccessorConstant(property_index, attributes, pair); - Handle name = MakeName("prop", property_index); + Handle name = CcTest::MakeName("prop", property_index); Descriptor d = Descriptor::AccessorConstant(name, pair, attributes); return Map::CopyInsertDescriptor(isolate_, map, &d, INSERT_TRANSITION); @@ -424,7 +410,7 @@ class Expectations { int property_index = number_of_properties_++; SetAccessorConstant(property_index, attributes, getter, setter); - Handle name = MakeName("prop", property_index); + Handle name = CcTest::MakeName("prop", property_index); CHECK(!getter->IsNull(isolate_) || !setter->IsNull(isolate_)); Factory* factory = isolate_->factory(); @@ -451,7 +437,7 @@ class Expectations { int property_index = number_of_properties_++; SetAccessorConstant(property_index, attributes, pair); - Handle name = MakeName("prop", property_index); + Handle name = CcTest::MakeName("prop", property_index); Isolate* isolate = CcTest::i_isolate(); Handle getter(pair->getter(), isolate); @@ -2136,7 +2122,7 @@ TEST(ReconfigurePropertySplitMapTransitionsOverflow) { split_map = map2; } - Handle name = MakeName("prop", i); + Handle name = CcTest::MakeName("prop", i); Map target = TransitionsAccessor(isolate, map2) .SearchTransition(*name, kData, NONE); CHECK(!target.is_null()); @@ -2163,7 +2149,7 @@ TEST(ReconfigurePropertySplitMapTransitionsOverflow) { // Fill in transition tree of |map2| so that it can't have more transitions. for (int i = 0; i < TransitionsAccessor::kMaxNumberOfTransitions; i++) { CHECK(TransitionsAccessor(isolate, map2).CanHaveMoreTransitions()); - Handle name = MakeName("foo", i); + Handle name = CcTest::MakeName("foo", i); Map::CopyWithField(isolate, map2, name, any_type, NONE, PropertyConstness::kMutable, Representation::Smi(), INSERT_TRANSITION) @@ -2382,9 +2368,9 @@ TEST(ElementsKindTransitionFromMapNotOwningDescriptor) { // Add one more transition to |map| in order to prevent descriptors // ownership. CHECK(map->owns_descriptors()); - Map::CopyWithField(isolate, map, MakeString("foo"), any_type, NONE, - PropertyConstness::kMutable, Representation::Smi(), - INSERT_TRANSITION) + Map::CopyWithField(isolate, map, CcTest::MakeString("foo"), any_type, + NONE, PropertyConstness::kMutable, + Representation::Smi(), INSERT_TRANSITION) .ToHandleChecked(); CHECK(!map->owns_descriptors()); @@ -2495,9 +2481,9 @@ TEST(PrototypeTransitionFromMapNotOwningDescriptor) { // Add one more transition to |map| in order to prevent descriptors // ownership. CHECK(map->owns_descriptors()); - Map::CopyWithField(isolate, map, MakeString("foo"), any_type, NONE, - PropertyConstness::kMutable, Representation::Smi(), - INSERT_TRANSITION) + Map::CopyWithField(isolate, map, CcTest::MakeString("foo"), any_type, + NONE, PropertyConstness::kMutable, + Representation::Smi(), INSERT_TRANSITION) .ToHandleChecked(); CHECK(!map->owns_descriptors()); diff --git a/deps/v8/test/cctest/test-unboxed-doubles.cc b/deps/v8/test/cctest/test-unboxed-doubles.cc index ebeb05597e4da5..525a73a788caec 100644 --- a/deps/v8/test/cctest/test-unboxed-doubles.cc +++ b/deps/v8/test/cctest/test-unboxed-doubles.cc @@ -45,20 +45,6 @@ static void InitializeVerifiedMapDescriptors( CHECK(layout_descriptor.IsConsistentWithMap(map, true)); } -static Handle MakeString(const char* str) { - Isolate* isolate = CcTest::i_isolate(); - Factory* factory = isolate->factory(); - return factory->InternalizeUtf8String(str); -} - - -static Handle MakeName(const char* str, int suffix) { - EmbeddedVector buffer; - SNPrintF(buffer, "%s%d", str, suffix); - return MakeString(buffer.begin()); -} - - Handle GetObject(const char* name) { return Handle::cast( v8::Utils::OpenHandle(*v8::Local::Cast( @@ -995,13 +981,14 @@ TEST(DescriptorArrayTrimming) { Handle any_type = FieldType::Any(isolate); Handle map = Map::Create(isolate, kFieldCount); for (int i = 0; i < kSplitFieldIndex; i++) { - map = Map::CopyWithField(isolate, map, MakeName("prop", i), any_type, NONE, - PropertyConstness::kMutable, Representation::Smi(), - INSERT_TRANSITION) + map = Map::CopyWithField(isolate, map, CcTest::MakeName("prop", i), + any_type, NONE, PropertyConstness::kMutable, + Representation::Smi(), INSERT_TRANSITION) .ToHandleChecked(); } - map = Map::CopyWithField(isolate, map, MakeName("dbl", kSplitFieldIndex), - any_type, NONE, PropertyConstness::kMutable, + map = Map::CopyWithField(isolate, map, + CcTest::MakeName("dbl", kSplitFieldIndex), any_type, + NONE, PropertyConstness::kMutable, Representation::Double(), INSERT_TRANSITION) .ToHandleChecked(); CHECK(map->layout_descriptor().IsConsistentWithMap(*map, true)); @@ -1015,7 +1002,7 @@ TEST(DescriptorArrayTrimming) { Handle tmp_map = map; for (int i = kSplitFieldIndex + 1; i < kFieldCount; i++) { - tmp_map = Map::CopyWithField(isolate, tmp_map, MakeName("dbl", i), + tmp_map = Map::CopyWithField(isolate, tmp_map, CcTest::MakeName("dbl", i), any_type, NONE, PropertyConstness::kMutable, Representation::Double(), INSERT_TRANSITION) .ToHandleChecked(); @@ -1055,14 +1042,15 @@ TEST(DescriptorArrayTrimming) { Handle tmp_map = map; for (int i = kSplitFieldIndex + 1; i < kFieldCount - 1; i++) { - tmp_map = Map::CopyWithField(isolate, tmp_map, MakeName("tagged", i), - any_type, NONE, PropertyConstness::kMutable, - Representation::Tagged(), INSERT_TRANSITION) - .ToHandleChecked(); + tmp_map = + Map::CopyWithField(isolate, tmp_map, CcTest::MakeName("tagged", i), + any_type, NONE, PropertyConstness::kMutable, + Representation::Tagged(), INSERT_TRANSITION) + .ToHandleChecked(); CHECK(tmp_map->layout_descriptor().IsConsistentWithMap(*tmp_map, true)); } - tmp_map = Map::CopyWithField(isolate, tmp_map, MakeString("dbl"), any_type, - NONE, PropertyConstness::kMutable, + tmp_map = Map::CopyWithField(isolate, tmp_map, CcTest::MakeString("dbl"), + any_type, NONE, PropertyConstness::kMutable, Representation::Double(), INSERT_TRANSITION) .ToHandleChecked(); CHECK(tmp_map->layout_descriptor().IsConsistentWithMap(*tmp_map, true)); @@ -1087,8 +1075,8 @@ TEST(DoScavenge) { Handle any_type = FieldType::Any(isolate); Handle map = Map::Create(isolate, 10); - map = Map::CopyWithField(isolate, map, MakeName("prop", 0), any_type, NONE, - PropertyConstness::kMutable, + map = Map::CopyWithField(isolate, map, CcTest::MakeName("prop", 0), any_type, + NONE, PropertyConstness::kMutable, Representation::Double(), INSERT_TRANSITION) .ToHandleChecked(); @@ -1153,12 +1141,12 @@ TEST(DoScavengeWithIncrementalWriteBarrier) { Handle any_type = FieldType::Any(isolate); Handle map = Map::Create(isolate, 10); - map = Map::CopyWithField(isolate, map, MakeName("prop", 0), any_type, NONE, - PropertyConstness::kMutable, + map = Map::CopyWithField(isolate, map, CcTest::MakeName("prop", 0), any_type, + NONE, PropertyConstness::kMutable, Representation::Double(), INSERT_TRANSITION) .ToHandleChecked(); - map = Map::CopyWithField(isolate, map, MakeName("prop", 1), any_type, NONE, - PropertyConstness::kMutable, + map = Map::CopyWithField(isolate, map, CcTest::MakeName("prop", 1), any_type, + NONE, PropertyConstness::kMutable, Representation::Tagged(), INSERT_TRANSITION) .ToHandleChecked(); @@ -1390,14 +1378,14 @@ TEST(LayoutDescriptorSharing) { { Handle map = Map::Create(isolate, 64); for (int i = 0; i < 32; i++) { - Handle name = MakeName("prop", i); + Handle name = CcTest::MakeName("prop", i); map = Map::CopyWithField(isolate, map, name, any_type, NONE, PropertyConstness::kMutable, Representation::Smi(), INSERT_TRANSITION) .ToHandleChecked(); } - split_map = Map::CopyWithField(isolate, map, MakeString("dbl"), any_type, - NONE, PropertyConstness::kMutable, + split_map = Map::CopyWithField(isolate, map, CcTest::MakeString("dbl"), + any_type, NONE, PropertyConstness::kMutable, Representation::Double(), INSERT_TRANSITION) .ToHandleChecked(); } @@ -1408,9 +1396,9 @@ TEST(LayoutDescriptorSharing) { CHECK(split_map->owns_descriptors()); Handle map1 = - Map::CopyWithField(isolate, split_map, MakeString("foo"), any_type, NONE, - PropertyConstness::kMutable, Representation::Double(), - INSERT_TRANSITION) + Map::CopyWithField(isolate, split_map, CcTest::MakeString("foo"), + any_type, NONE, PropertyConstness::kMutable, + Representation::Double(), INSERT_TRANSITION) .ToHandleChecked(); CHECK(!split_map->owns_descriptors()); CHECK_EQ(*split_layout_descriptor, split_map->layout_descriptor()); @@ -1421,9 +1409,9 @@ TEST(LayoutDescriptorSharing) { CHECK(map1->layout_descriptor().IsConsistentWithMap(*map1, true)); Handle map2 = - Map::CopyWithField(isolate, split_map, MakeString("bar"), any_type, NONE, - PropertyConstness::kMutable, Representation::Tagged(), - INSERT_TRANSITION) + Map::CopyWithField(isolate, split_map, CcTest::MakeString("bar"), + any_type, NONE, PropertyConstness::kMutable, + Representation::Tagged(), INSERT_TRANSITION) .ToHandleChecked(); // Layout descriptors should not be shared with |split_map|. @@ -1595,15 +1583,15 @@ static void TestWriteBarrierObjectShiftFieldsRight( Handle func = GetObject("func"); Handle map = Map::Create(isolate, 10); - map = Map::CopyWithConstant(isolate, map, MakeName("prop", 0), func, NONE, - INSERT_TRANSITION) + map = Map::CopyWithConstant(isolate, map, CcTest::MakeName("prop", 0), func, + NONE, INSERT_TRANSITION) .ToHandleChecked(); - map = Map::CopyWithField(isolate, map, MakeName("prop", 1), any_type, NONE, - PropertyConstness::kMutable, + map = Map::CopyWithField(isolate, map, CcTest::MakeName("prop", 1), any_type, + NONE, PropertyConstness::kMutable, Representation::Double(), INSERT_TRANSITION) .ToHandleChecked(); - map = Map::CopyWithField(isolate, map, MakeName("prop", 2), any_type, NONE, - PropertyConstness::kMutable, + map = Map::CopyWithField(isolate, map, CcTest::MakeName("prop", 2), any_type, + NONE, PropertyConstness::kMutable, Representation::Tagged(), INSERT_TRANSITION) .ToHandleChecked();