From 53149e101593ca78814e1494e8a3f34182d05d40 Mon Sep 17 00:00:00 2001 From: Frank Tang Date: Mon, 11 Mar 2019 14:40:39 -0700 Subject: [PATCH] [Intl] add heap-symbols Bug: v8:7684 Change-Id: Id27d6c9d011c6093b89c11edca71fbc6e5d9a0fb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1514192 Commit-Queue: Frank Tang Reviewed-by: Jakob Kummerow Cr-Commit-Position: refs/heads/master@{#60174} --- src/bootstrapper.cc | 65 ++++++++++++----------------------- src/heap-symbols.h | 10 +++++- tools/v8heapconst.py | 80 ++++++++++++++++++++++---------------------- 3 files changed, 71 insertions(+), 84 deletions(-) diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 1c11b15c1b..d272fa6e76 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -2841,8 +2841,7 @@ void Genesis::InitializeGlobal(Handle global_object, Builtins::kDateTimeFormatPrototypeFormatToParts, 1, false); - SimpleInstallGetter(isolate_, prototype, - factory->InternalizeUtf8String("format"), + SimpleInstallGetter(isolate_, prototype, factory->format_string(), Builtins::kDateTimeFormatPrototypeFormat, false); } @@ -2873,8 +2872,7 @@ void Genesis::InitializeGlobal(Handle global_object, SimpleInstallFunction(isolate_, prototype, "formatToParts", Builtins::kNumberFormatPrototypeFormatToParts, 1, false); - SimpleInstallGetter(isolate_, prototype, - factory->InternalizeUtf8String("format"), + SimpleInstallGetter(isolate_, prototype, factory->format_string(), Builtins::kNumberFormatPrototypeFormatNumber, false); } @@ -2899,8 +2897,7 @@ void Genesis::InitializeGlobal(Handle global_object, Builtins::kCollatorPrototypeResolvedOptions, 0, false); - SimpleInstallGetter(isolate_, prototype, - factory->InternalizeUtf8String("compare"), + SimpleInstallGetter(isolate_, prototype, factory->compare_string(), Builtins::kCollatorPrototypeCompare, false); } @@ -2924,24 +2921,19 @@ void Genesis::InitializeGlobal(Handle global_object, Builtins::kV8BreakIteratorPrototypeResolvedOptions, 0, false); - SimpleInstallGetter(isolate_, prototype, - factory->InternalizeUtf8String("adoptText"), + SimpleInstallGetter(isolate_, prototype, factory->adoptText_string(), Builtins::kV8BreakIteratorPrototypeAdoptText, false); - SimpleInstallGetter(isolate_, prototype, - factory->InternalizeUtf8String("first"), + SimpleInstallGetter(isolate_, prototype, factory->first_string(), Builtins::kV8BreakIteratorPrototypeFirst, false); - SimpleInstallGetter(isolate_, prototype, - factory->InternalizeUtf8String("next"), + SimpleInstallGetter(isolate_, prototype, factory->next_string(), Builtins::kV8BreakIteratorPrototypeNext, false); - SimpleInstallGetter(isolate_, prototype, - factory->InternalizeUtf8String("current"), + SimpleInstallGetter(isolate_, prototype, factory->current_string(), Builtins::kV8BreakIteratorPrototypeCurrent, false); - SimpleInstallGetter(isolate_, prototype, - factory->InternalizeUtf8String("breakType"), + SimpleInstallGetter(isolate_, prototype, factory->breakType_string(), Builtins::kV8BreakIteratorPrototypeBreakType, false); } @@ -4390,36 +4382,26 @@ void Genesis::InitializeGlobal_harmony_locale() { SimpleInstallFunction(isolate(), prototype, "minimize", Builtins::kLocalePrototypeMinimize, 0, false); // Base locale getters. - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("language"), + SimpleInstallGetter(isolate(), prototype, factory()->language_string(), Builtins::kLocalePrototypeLanguage, true); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("script"), + SimpleInstallGetter(isolate(), prototype, factory()->script_string(), Builtins::kLocalePrototypeScript, true); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("region"), + SimpleInstallGetter(isolate(), prototype, factory()->region_string(), Builtins::kLocalePrototypeRegion, true); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("baseName"), + SimpleInstallGetter(isolate(), prototype, factory()->baseName_string(), Builtins::kLocalePrototypeBaseName, true); // Unicode extension getters. - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("calendar"), + SimpleInstallGetter(isolate(), prototype, factory()->calendar_string(), Builtins::kLocalePrototypeCalendar, true); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("caseFirst"), + SimpleInstallGetter(isolate(), prototype, factory()->caseFirst_string(), Builtins::kLocalePrototypeCaseFirst, true); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("collation"), + SimpleInstallGetter(isolate(), prototype, factory()->collation_string(), Builtins::kLocalePrototypeCollation, true); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("hourCycle"), + SimpleInstallGetter(isolate(), prototype, factory()->hourCycle_string(), Builtins::kLocalePrototypeHourCycle, true); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("numeric"), + SimpleInstallGetter(isolate(), prototype, factory()->numeric_string(), Builtins::kLocalePrototypeNumeric, true); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("numberingSystem"), + SimpleInstallGetter(isolate(), prototype, factory()->numberingSystem_string(), Builtins::kLocalePrototypeNumberingSystem, true); } @@ -4479,19 +4461,16 @@ void Genesis::InitializeGlobal_harmony_intl_segmenter() { Builtins::kSegmentIteratorPrototypePreceding, 0, false); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("index"), + SimpleInstallGetter(isolate(), prototype, factory()->index_string(), Builtins::kSegmentIteratorPrototypeIndex, false); - SimpleInstallGetter(isolate(), prototype, - factory()->InternalizeUtf8String("breakType"), + SimpleInstallGetter(isolate(), prototype, factory()->breakType_string(), Builtins::kSegmentIteratorPrototypeBreakType, false); // Setup SegmentIterator constructor. Handle name_string = - Name::ToFunctionName( - isolate(), - isolate()->factory()->InternalizeUtf8String("SegmentIterator")) + Name::ToFunctionName(isolate(), + isolate()->factory()->SegmentIterator_string()) .ToHandleChecked(); Handle segment_iterator_fun = CreateFunction( isolate(), name_string, JS_INTL_SEGMENT_ITERATOR_TYPE, diff --git a/src/heap-symbols.h b/src/heap-symbols.h index c08b4aafdd..ccb3ac8e64 100644 --- a/src/heap-symbols.h +++ b/src/heap-symbols.h @@ -7,15 +7,21 @@ #ifdef V8_INTL_SUPPORT #define INTERNALIZED_STRING_LIST_GENERATOR_INTL(V, _) \ + V(_, adoptText_string, "adoptText") \ + V(_, baseName_string, "baseName") \ V(_, breakType_string, "breakType") \ V(_, calendar_string, "calendar") \ V(_, cardinal_string, "cardinal") \ V(_, caseFirst_string, "caseFirst") \ + V(_, compare_string, "compare") \ + V(_, current_string, "current") \ V(_, dateStyle_string, "dateStyle") \ V(_, day_string, "day") \ V(_, dayPeriod_string, "dayPeriod") \ V(_, decimal_string, "decimal") \ V(_, era_string, "era") \ + V(_, first_string, "first") \ + V(_, format_string, "format") \ V(_, fraction_string, "fraction") \ V(_, full_string, "full") \ V(_, granularity_string, "granularity") \ @@ -36,6 +42,7 @@ V(_, Invalid_Date_string, "Invalid Date") \ V(_, integer_string, "integer") \ V(_, kana_string, "kana") \ + V(_, language_string, "language") \ V(_, letter_string, "letter") \ V(_, list_string, "list") \ V(_, literal_string, "literal") \ @@ -44,13 +51,13 @@ V(_, lower_string, "lower") \ V(_, maximumFractionDigits_string, "maximumFractionDigits") \ V(_, maximumSignificantDigits_string, "maximumSignificantDigits") \ - V(_, nan_string, "nan") \ V(_, minimumFractionDigits_string, "minimumFractionDigits") \ V(_, minimumIntegerDigits_string, "minimumIntegerDigits") \ V(_, minimumSignificantDigits_string, "minimumSignificantDigits") \ V(_, minusSign_string, "minusSign") \ V(_, minute_string, "minute") \ V(_, month_string, "month") \ + V(_, nan_string, "nan") \ V(_, none_string, "none") \ V(_, normal_string, "normal") \ V(_, numberingSystem_string, "numberingSystem") \ @@ -59,6 +66,7 @@ V(_, percentSign_string, "percentSign") \ V(_, plusSign_string, "plusSign") \ V(_, quarter_string, "quarter") \ + V(_, region_string, "region") \ V(_, second_string, "second") \ V(_, segment_string, "segment") \ V(_, SegmentIterator_string, "Segment Iterator") \ diff --git a/tools/v8heapconst.py b/tools/v8heapconst.py index 9a0f323a0b..dcd09531b6 100644 --- a/tools/v8heapconst.py +++ b/tools/v8heapconst.py @@ -302,46 +302,46 @@ KNOWN_MAPS = { ("RO_SPACE", 0x026e1): (111, "Tuple2Map"), ("RO_SPACE", 0x02781): (113, "ArrayBoilerplateDescriptionMap"), ("RO_SPACE", 0x02ac1): (100, "InterceptorInfoMap"), - ("RO_SPACE", 0x04fe1): (89, "AccessCheckInfoMap"), - ("RO_SPACE", 0x05031): (90, "AccessorInfoMap"), - ("RO_SPACE", 0x05081): (91, "AccessorPairMap"), - ("RO_SPACE", 0x050d1): (92, "AliasedArgumentsEntryMap"), - ("RO_SPACE", 0x05121): (93, "AllocationMementoMap"), - ("RO_SPACE", 0x05171): (94, "AsmWasmDataMap"), - ("RO_SPACE", 0x051c1): (95, "AsyncGeneratorRequestMap"), - ("RO_SPACE", 0x05211): (96, "ClassPositionsMap"), - ("RO_SPACE", 0x05261): (97, "DebugInfoMap"), - ("RO_SPACE", 0x052b1): (98, "FunctionTemplateInfoMap"), - ("RO_SPACE", 0x05301): (99, "FunctionTemplateRareDataMap"), - ("RO_SPACE", 0x05351): (101, "InterpreterDataMap"), - ("RO_SPACE", 0x053a1): (102, "ModuleInfoEntryMap"), - ("RO_SPACE", 0x053f1): (103, "ModuleMap"), - ("RO_SPACE", 0x05441): (104, "ObjectTemplateInfoMap"), - ("RO_SPACE", 0x05491): (105, "PromiseCapabilityMap"), - ("RO_SPACE", 0x054e1): (106, "PromiseReactionMap"), - ("RO_SPACE", 0x05531): (107, "PrototypeInfoMap"), - ("RO_SPACE", 0x05581): (108, "ScriptMap"), - ("RO_SPACE", 0x055d1): (109, "StackFrameInfoMap"), - ("RO_SPACE", 0x05621): (110, "StackTraceFrameMap"), - ("RO_SPACE", 0x05671): (112, "Tuple3Map"), - ("RO_SPACE", 0x056c1): (114, "WasmDebugInfoMap"), - ("RO_SPACE", 0x05711): (115, "WasmExceptionTagMap"), - ("RO_SPACE", 0x05761): (116, "WasmExportedFunctionDataMap"), - ("RO_SPACE", 0x057b1): (117, "CallableTaskMap"), - ("RO_SPACE", 0x05801): (118, "CallbackTaskMap"), - ("RO_SPACE", 0x05851): (119, "PromiseFulfillReactionJobTaskMap"), - ("RO_SPACE", 0x058a1): (120, "PromiseRejectReactionJobTaskMap"), - ("RO_SPACE", 0x058f1): (121, "PromiseResolveThenableJobTaskMap"), - ("RO_SPACE", 0x05941): (122, "FinalizationGroupCleanupJobTaskMap"), - ("RO_SPACE", 0x05991): (123, "AllocationSiteWithWeakNextMap"), - ("RO_SPACE", 0x059e1): (123, "AllocationSiteWithoutWeakNextMap"), - ("RO_SPACE", 0x05a31): (157, "LoadHandler1Map"), - ("RO_SPACE", 0x05a81): (157, "LoadHandler2Map"), - ("RO_SPACE", 0x05ad1): (157, "LoadHandler3Map"), - ("RO_SPACE", 0x05b21): (165, "StoreHandler0Map"), - ("RO_SPACE", 0x05b71): (165, "StoreHandler1Map"), - ("RO_SPACE", 0x05bc1): (165, "StoreHandler2Map"), - ("RO_SPACE", 0x05c11): (165, "StoreHandler3Map"), + ("RO_SPACE", 0x050a9): (89, "AccessCheckInfoMap"), + ("RO_SPACE", 0x050f9): (90, "AccessorInfoMap"), + ("RO_SPACE", 0x05149): (91, "AccessorPairMap"), + ("RO_SPACE", 0x05199): (92, "AliasedArgumentsEntryMap"), + ("RO_SPACE", 0x051e9): (93, "AllocationMementoMap"), + ("RO_SPACE", 0x05239): (94, "AsmWasmDataMap"), + ("RO_SPACE", 0x05289): (95, "AsyncGeneratorRequestMap"), + ("RO_SPACE", 0x052d9): (96, "ClassPositionsMap"), + ("RO_SPACE", 0x05329): (97, "DebugInfoMap"), + ("RO_SPACE", 0x05379): (98, "FunctionTemplateInfoMap"), + ("RO_SPACE", 0x053c9): (99, "FunctionTemplateRareDataMap"), + ("RO_SPACE", 0x05419): (101, "InterpreterDataMap"), + ("RO_SPACE", 0x05469): (102, "ModuleInfoEntryMap"), + ("RO_SPACE", 0x054b9): (103, "ModuleMap"), + ("RO_SPACE", 0x05509): (104, "ObjectTemplateInfoMap"), + ("RO_SPACE", 0x05559): (105, "PromiseCapabilityMap"), + ("RO_SPACE", 0x055a9): (106, "PromiseReactionMap"), + ("RO_SPACE", 0x055f9): (107, "PrototypeInfoMap"), + ("RO_SPACE", 0x05649): (108, "ScriptMap"), + ("RO_SPACE", 0x05699): (109, "StackFrameInfoMap"), + ("RO_SPACE", 0x056e9): (110, "StackTraceFrameMap"), + ("RO_SPACE", 0x05739): (112, "Tuple3Map"), + ("RO_SPACE", 0x05789): (114, "WasmDebugInfoMap"), + ("RO_SPACE", 0x057d9): (115, "WasmExceptionTagMap"), + ("RO_SPACE", 0x05829): (116, "WasmExportedFunctionDataMap"), + ("RO_SPACE", 0x05879): (117, "CallableTaskMap"), + ("RO_SPACE", 0x058c9): (118, "CallbackTaskMap"), + ("RO_SPACE", 0x05919): (119, "PromiseFulfillReactionJobTaskMap"), + ("RO_SPACE", 0x05969): (120, "PromiseRejectReactionJobTaskMap"), + ("RO_SPACE", 0x059b9): (121, "PromiseResolveThenableJobTaskMap"), + ("RO_SPACE", 0x05a09): (122, "FinalizationGroupCleanupJobTaskMap"), + ("RO_SPACE", 0x05a59): (123, "AllocationSiteWithWeakNextMap"), + ("RO_SPACE", 0x05aa9): (123, "AllocationSiteWithoutWeakNextMap"), + ("RO_SPACE", 0x05af9): (157, "LoadHandler1Map"), + ("RO_SPACE", 0x05b49): (157, "LoadHandler2Map"), + ("RO_SPACE", 0x05b99): (157, "LoadHandler3Map"), + ("RO_SPACE", 0x05be9): (165, "StoreHandler0Map"), + ("RO_SPACE", 0x05c39): (165, "StoreHandler1Map"), + ("RO_SPACE", 0x05c89): (165, "StoreHandler2Map"), + ("RO_SPACE", 0x05cd9): (165, "StoreHandler3Map"), ("MAP_SPACE", 0x00139): (1057, "ExternalMap"), ("MAP_SPACE", 0x00189): (1073, "JSMessageObjectMap"), }