Commit f3ea8f46 authored by Linshizhi's avatar Linshizhi

Add Encoder

parent 4ad6b5b6
......@@ -4314,6 +4314,7 @@ v8_source_set("v8_base_without_compiler") {
"src/builtins/builtins-internal.cc",
"src/builtins/builtins-intl.cc",
"src/builtins/builtins-json.cc",
"src/builtins/builtins-encoder.cc",
"src/builtins/builtins-number.cc",
"src/builtins/builtins-object.cc",
"src/builtins/builtins-reflect.cc",
......
......@@ -620,6 +620,9 @@ namespace internal {
CPP(JsonParse) \
CPP(JsonStringify) \
\
/* ENCODER */ \
CPP(Encode) \
\
/* Web snapshots */ \
CPP(WebSnapshotSerialize) \
CPP(WebSnapshotDeserialize) \
......@@ -1704,204 +1707,204 @@ namespace internal {
TFJ(StringFixedArrayFromIterable, kJSArgcReceiverSlots, kIterable) \
TFJ(TemporalInstantFixedArrayFromIterable, kJSArgcReceiverSlots, kIterable)
#define BUILTIN_LIST_BASE(CPP, TFJ, TFC, TFS, TFH, ASM) \
BUILTIN_LIST_BASE_TIER0(CPP, TFJ, TFC, TFS, TFH, ASM) \
#define BUILTIN_LIST_BASE(CPP, TFJ, TFC, TFS, TFH, ASM) \
BUILTIN_LIST_BASE_TIER0(CPP, TFJ, TFC, TFS, TFH, ASM) \
BUILTIN_LIST_BASE_TIER1(CPP, TFJ, TFC, TFS, TFH, ASM)
#ifdef V8_INTL_SUPPORT
#define BUILTIN_LIST_INTL(CPP, TFJ, TFS) \
/* ecma402 #sec-intl.collator */ \
CPP(CollatorConstructor) \
/* ecma 402 #sec-collator-compare-functions*/ \
CPP(CollatorInternalCompare) \
/* ecma402 #sec-intl.collator.prototype.compare */ \
CPP(CollatorPrototypeCompare) \
/* ecma402 #sec-intl.collator.supportedlocalesof */ \
CPP(CollatorSupportedLocalesOf) \
/* ecma402 #sec-intl.collator.prototype.resolvedoptions */ \
CPP(CollatorPrototypeResolvedOptions) \
/* ecma402 #sup-date.prototype.tolocaledatestring */ \
CPP(DatePrototypeToLocaleDateString) \
/* ecma402 #sup-date.prototype.tolocalestring */ \
CPP(DatePrototypeToLocaleString) \
/* ecma402 #sup-date.prototype.tolocaletimestring */ \
CPP(DatePrototypeToLocaleTimeString) \
/* ecma402 #sec-intl.datetimeformat */ \
CPP(DateTimeFormatConstructor) \
/* ecma402 #sec-datetime-format-functions */ \
CPP(DateTimeFormatInternalFormat) \
/* ecma402 #sec-intl.datetimeformat.prototype.format */ \
CPP(DateTimeFormatPrototypeFormat) \
/* ecma402 #sec-intl.datetimeformat.prototype.formatrange */ \
CPP(DateTimeFormatPrototypeFormatRange) \
/* ecma402 #sec-intl.datetimeformat.prototype.formatrangetoparts */ \
CPP(DateTimeFormatPrototypeFormatRangeToParts) \
/* ecma402 #sec-intl.datetimeformat.prototype.formattoparts */ \
CPP(DateTimeFormatPrototypeFormatToParts) \
/* ecma402 #sec-intl.datetimeformat.prototype.resolvedoptions */ \
CPP(DateTimeFormatPrototypeResolvedOptions) \
/* ecma402 #sec-intl.datetimeformat.supportedlocalesof */ \
CPP(DateTimeFormatSupportedLocalesOf) \
/* ecma402 #sec-Intl.DisplayNames */ \
CPP(DisplayNamesConstructor) \
/* ecma402 #sec-Intl.DisplayNames.prototype.of */ \
CPP(DisplayNamesPrototypeOf) \
/* ecma402 #sec-Intl.DisplayNames.prototype.resolvedOptions */ \
CPP(DisplayNamesPrototypeResolvedOptions) \
/* ecma402 #sec-Intl.DisplayNames.supportedLocalesOf */ \
CPP(DisplayNamesSupportedLocalesOf) \
/* ecma402 #sec-intl.getcanonicallocales */ \
CPP(IntlGetCanonicalLocales) \
/* ecma402 #sec-intl.supportedvaluesof */ \
CPP(IntlSupportedValuesOf) \
/* ecma402 #sec-intl-listformat-constructor */ \
CPP(ListFormatConstructor) \
/* ecma402 #sec-intl-list-format.prototype.format */ \
TFJ(ListFormatPrototypeFormat, kDontAdaptArgumentsSentinel) \
/* ecma402 #sec-intl-list-format.prototype.formattoparts */ \
TFJ(ListFormatPrototypeFormatToParts, kDontAdaptArgumentsSentinel) \
/* ecma402 #sec-intl.listformat.prototype.resolvedoptions */ \
CPP(ListFormatPrototypeResolvedOptions) \
/* ecma402 #sec-intl.ListFormat.supportedlocalesof */ \
CPP(ListFormatSupportedLocalesOf) \
/* ecma402 #sec-intl-locale-constructor */ \
CPP(LocaleConstructor) \
/* ecma402 #sec-Intl.Locale.prototype.baseName */ \
CPP(LocalePrototypeBaseName) \
/* ecma402 #sec-Intl.Locale.prototype.calendar */ \
CPP(LocalePrototypeCalendar) \
/* ecma402 #sec-Intl.Locale.prototype.calendars */ \
CPP(LocalePrototypeCalendars) \
/* ecma402 #sec-Intl.Locale.prototype.caseFirst */ \
CPP(LocalePrototypeCaseFirst) \
/* ecma402 #sec-Intl.Locale.prototype.collation */ \
CPP(LocalePrototypeCollation) \
/* ecma402 #sec-Intl.Locale.prototype.collations */ \
CPP(LocalePrototypeCollations) \
/* ecma402 #sec-Intl.Locale.prototype.hourCycle */ \
CPP(LocalePrototypeHourCycle) \
/* ecma402 #sec-Intl.Locale.prototype.hourCycles */ \
CPP(LocalePrototypeHourCycles) \
/* ecma402 #sec-Intl.Locale.prototype.language */ \
CPP(LocalePrototypeLanguage) \
/* ecma402 #sec-Intl.Locale.prototype.maximize */ \
CPP(LocalePrototypeMaximize) \
/* ecma402 #sec-Intl.Locale.prototype.minimize */ \
CPP(LocalePrototypeMinimize) \
/* ecma402 #sec-Intl.Locale.prototype.numeric */ \
CPP(LocalePrototypeNumeric) \
/* ecma402 #sec-Intl.Locale.prototype.numberingSystem */ \
CPP(LocalePrototypeNumberingSystem) \
/* ecma402 #sec-Intl.Locale.prototype.numberingSystems */ \
CPP(LocalePrototypeNumberingSystems) \
/* ecma402 #sec-Intl.Locale.prototype.region */ \
CPP(LocalePrototypeRegion) \
/* ecma402 #sec-Intl.Locale.prototype.script */ \
CPP(LocalePrototypeScript) \
/* ecma402 #sec-Intl.Locale.prototype.textInfo */ \
CPP(LocalePrototypeTextInfo) \
/* ecma402 #sec-Intl.Locale.prototype.timezones */ \
CPP(LocalePrototypeTimeZones) \
/* ecma402 #sec-Intl.Locale.prototype.toString */ \
CPP(LocalePrototypeToString) \
/* ecma402 #sec-Intl.Locale.prototype.weekInfo */ \
CPP(LocalePrototypeWeekInfo) \
/* ecma402 #sec-intl.numberformat */ \
CPP(NumberFormatConstructor) \
/* ecma402 #sec-number-format-functions */ \
CPP(NumberFormatInternalFormatNumber) \
/* ecma402 #sec-intl.numberformat.prototype.format */ \
CPP(NumberFormatPrototypeFormatNumber) \
/* ecma402 #sec-intl.numberformat.prototype.formatrange */ \
CPP(NumberFormatPrototypeFormatRange) \
/* ecma402 #sec-intl.numberformat.prototype.formatrangetoparts */ \
CPP(NumberFormatPrototypeFormatRangeToParts) \
/* ecma402 #sec-intl.numberformat.prototype.formattoparts */ \
CPP(NumberFormatPrototypeFormatToParts) \
/* ecma402 #sec-intl.numberformat.prototype.resolvedoptions */ \
CPP(NumberFormatPrototypeResolvedOptions) \
/* ecma402 #sec-intl.numberformat.supportedlocalesof */ \
CPP(NumberFormatSupportedLocalesOf) \
/* ecma402 #sec-intl.pluralrules */ \
CPP(PluralRulesConstructor) \
/* ecma402 #sec-intl.pluralrules.prototype.resolvedoptions */ \
CPP(PluralRulesPrototypeResolvedOptions) \
/* ecma402 #sec-intl.pluralrules.prototype.select */ \
CPP(PluralRulesPrototypeSelect) \
/* ecma402 #sec-intl.pluralrules.prototype.selectrange */ \
CPP(PluralRulesPrototypeSelectRange) \
/* ecma402 #sec-intl.pluralrules.supportedlocalesof */ \
CPP(PluralRulesSupportedLocalesOf) \
/* ecma402 #sec-intl.RelativeTimeFormat.constructor */ \
CPP(RelativeTimeFormatConstructor) \
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.format */ \
CPP(RelativeTimeFormatPrototypeFormat) \
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.formatToParts */ \
CPP(RelativeTimeFormatPrototypeFormatToParts) \
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.resolvedOptions */ \
CPP(RelativeTimeFormatPrototypeResolvedOptions) \
/* ecma402 #sec-intl.RelativeTimeFormat.supportedlocalesof */ \
CPP(RelativeTimeFormatSupportedLocalesOf) \
/* ecma402 #sec-Intl.Segmenter */ \
CPP(SegmenterConstructor) \
/* ecma402 #sec-Intl.Segmenter.prototype.resolvedOptions */ \
CPP(SegmenterPrototypeResolvedOptions) \
/* ecma402 #sec-Intl.Segmenter.prototype.segment */ \
CPP(SegmenterPrototypeSegment) \
/* ecma402 #sec-Intl.Segmenter.supportedLocalesOf */ \
CPP(SegmenterSupportedLocalesOf) \
/* ecma402 #sec-segment-iterator-prototype-next */ \
CPP(SegmentIteratorPrototypeNext) \
/* ecma402 #sec-%segmentsprototype%.containing */ \
CPP(SegmentsPrototypeContaining) \
/* ecma402 #sec-%segmentsprototype%-@@iterator */ \
CPP(SegmentsPrototypeIterator) \
/* ES #sec-string.prototype.normalize */ \
CPP(StringPrototypeNormalizeIntl) \
/* ecma402 #sup-string.prototype.tolocalelowercase */ \
CPP(StringPrototypeToLocaleLowerCase) \
/* ecma402 #sup-string.prototype.tolocaleuppercase */ \
CPP(StringPrototypeToLocaleUpperCase) \
/* ES #sec-string.prototype.tolowercase */ \
TFJ(StringPrototypeToLowerCaseIntl, kJSArgcReceiverSlots, kReceiver) \
/* ES #sec-string.prototype.touppercase */ \
CPP(StringPrototypeToUpperCaseIntl) \
TFS(StringToLowerCaseIntl, kString) \
\
/* Temporal */ \
/* Temporal #sec-temporal.calendar.prototype.era */ \
CPP(TemporalCalendarPrototypeEra) \
/* Temporal #sec-temporal.calendar.prototype.erayear */ \
CPP(TemporalCalendarPrototypeEraYear) \
/* Temporal #sec-get-temporal.plaindate.prototype.era */ \
CPP(TemporalPlainDatePrototypeEra) \
/* Temporal #sec-get-temporal.plaindate.prototype.erayear */ \
CPP(TemporalPlainDatePrototypeEraYear) \
/* Temporal #sec-get-temporal.plaindatetime.prototype.era */ \
CPP(TemporalPlainDateTimePrototypeEra) \
/* Temporal #sec-get-temporal.plaindatetime.prototype.erayear */ \
CPP(TemporalPlainDateTimePrototypeEraYear) \
/* Temporal #sec-get-temporal.plainyearmonth.prototype.era */ \
CPP(TemporalPlainYearMonthPrototypeEra) \
/* Temporal #sec-get-temporal.plainyearmonth.prototype.erayear */ \
CPP(TemporalPlainYearMonthPrototypeEraYear) \
/* Temporal #sec-get-temporal.zoneddatetime.prototype.era */ \
CPP(TemporalZonedDateTimePrototypeEra) \
/* Temporal #sec-get-temporal.zoneddatetime.prototype.erayear */ \
CPP(TemporalZonedDateTimePrototypeEraYear) \
\
CPP(V8BreakIteratorConstructor) \
CPP(V8BreakIteratorInternalAdoptText) \
CPP(V8BreakIteratorInternalBreakType) \
CPP(V8BreakIteratorInternalCurrent) \
CPP(V8BreakIteratorInternalFirst) \
CPP(V8BreakIteratorInternalNext) \
CPP(V8BreakIteratorPrototypeAdoptText) \
CPP(V8BreakIteratorPrototypeBreakType) \
CPP(V8BreakIteratorPrototypeCurrent) \
CPP(V8BreakIteratorPrototypeFirst) \
CPP(V8BreakIteratorPrototypeNext) \
CPP(V8BreakIteratorPrototypeResolvedOptions) \
#define BUILTIN_LIST_INTL(CPP, TFJ, TFS) \
/* ecma402 #sec-intl.collator */ \
CPP(CollatorConstructor) \
/* ecma 402 #sec-collator-compare-functions*/ \
CPP(CollatorInternalCompare) \
/* ecma402 #sec-intl.collator.prototype.compare */ \
CPP(CollatorPrototypeCompare) \
/* ecma402 #sec-intl.collator.supportedlocalesof */ \
CPP(CollatorSupportedLocalesOf) \
/* ecma402 #sec-intl.collator.prototype.resolvedoptions */ \
CPP(CollatorPrototypeResolvedOptions) \
/* ecma402 #sup-date.prototype.tolocaledatestring */ \
CPP(DatePrototypeToLocaleDateString) \
/* ecma402 #sup-date.prototype.tolocalestring */ \
CPP(DatePrototypeToLocaleString) \
/* ecma402 #sup-date.prototype.tolocaletimestring */ \
CPP(DatePrototypeToLocaleTimeString) \
/* ecma402 #sec-intl.datetimeformat */ \
CPP(DateTimeFormatConstructor) \
/* ecma402 #sec-datetime-format-functions */ \
CPP(DateTimeFormatInternalFormat) \
/* ecma402 #sec-intl.datetimeformat.prototype.format */ \
CPP(DateTimeFormatPrototypeFormat) \
/* ecma402 #sec-intl.datetimeformat.prototype.formatrange */ \
CPP(DateTimeFormatPrototypeFormatRange) \
/* ecma402 #sec-intl.datetimeformat.prototype.formatrangetoparts */ \
CPP(DateTimeFormatPrototypeFormatRangeToParts) \
/* ecma402 #sec-intl.datetimeformat.prototype.formattoparts */ \
CPP(DateTimeFormatPrototypeFormatToParts) \
/* ecma402 #sec-intl.datetimeformat.prototype.resolvedoptions */ \
CPP(DateTimeFormatPrototypeResolvedOptions) \
/* ecma402 #sec-intl.datetimeformat.supportedlocalesof */ \
CPP(DateTimeFormatSupportedLocalesOf) \
/* ecma402 #sec-Intl.DisplayNames */ \
CPP(DisplayNamesConstructor) \
/* ecma402 #sec-Intl.DisplayNames.prototype.of */ \
CPP(DisplayNamesPrototypeOf) \
/* ecma402 #sec-Intl.DisplayNames.prototype.resolvedOptions */ \
CPP(DisplayNamesPrototypeResolvedOptions) \
/* ecma402 #sec-Intl.DisplayNames.supportedLocalesOf */ \
CPP(DisplayNamesSupportedLocalesOf) \
/* ecma402 #sec-intl.getcanonicallocales */ \
CPP(IntlGetCanonicalLocales) \
/* ecma402 #sec-intl.supportedvaluesof */ \
CPP(IntlSupportedValuesOf) \
/* ecma402 #sec-intl-listformat-constructor */ \
CPP(ListFormatConstructor) \
/* ecma402 #sec-intl-list-format.prototype.format */ \
TFJ(ListFormatPrototypeFormat, kDontAdaptArgumentsSentinel) \
/* ecma402 #sec-intl-list-format.prototype.formattoparts */ \
TFJ(ListFormatPrototypeFormatToParts, kDontAdaptArgumentsSentinel) \
/* ecma402 #sec-intl.listformat.prototype.resolvedoptions */ \
CPP(ListFormatPrototypeResolvedOptions) \
/* ecma402 #sec-intl.ListFormat.supportedlocalesof */ \
CPP(ListFormatSupportedLocalesOf) \
/* ecma402 #sec-intl-locale-constructor */ \
CPP(LocaleConstructor) \
/* ecma402 #sec-Intl.Locale.prototype.baseName */ \
CPP(LocalePrototypeBaseName) \
/* ecma402 #sec-Intl.Locale.prototype.calendar */ \
CPP(LocalePrototypeCalendar) \
/* ecma402 #sec-Intl.Locale.prototype.calendars */ \
CPP(LocalePrototypeCalendars) \
/* ecma402 #sec-Intl.Locale.prototype.caseFirst */ \
CPP(LocalePrototypeCaseFirst) \
/* ecma402 #sec-Intl.Locale.prototype.collation */ \
CPP(LocalePrototypeCollation) \
/* ecma402 #sec-Intl.Locale.prototype.collations */ \
CPP(LocalePrototypeCollations) \
/* ecma402 #sec-Intl.Locale.prototype.hourCycle */ \
CPP(LocalePrototypeHourCycle) \
/* ecma402 #sec-Intl.Locale.prototype.hourCycles */ \
CPP(LocalePrototypeHourCycles) \
/* ecma402 #sec-Intl.Locale.prototype.language */ \
CPP(LocalePrototypeLanguage) \
/* ecma402 #sec-Intl.Locale.prototype.maximize */ \
CPP(LocalePrototypeMaximize) \
/* ecma402 #sec-Intl.Locale.prototype.minimize */ \
CPP(LocalePrototypeMinimize) \
/* ecma402 #sec-Intl.Locale.prototype.numeric */ \
CPP(LocalePrototypeNumeric) \
/* ecma402 #sec-Intl.Locale.prototype.numberingSystem */ \
CPP(LocalePrototypeNumberingSystem) \
/* ecma402 #sec-Intl.Locale.prototype.numberingSystems */ \
CPP(LocalePrototypeNumberingSystems) \
/* ecma402 #sec-Intl.Locale.prototype.region */ \
CPP(LocalePrototypeRegion) \
/* ecma402 #sec-Intl.Locale.prototype.script */ \
CPP(LocalePrototypeScript) \
/* ecma402 #sec-Intl.Locale.prototype.textInfo */ \
CPP(LocalePrototypeTextInfo) \
/* ecma402 #sec-Intl.Locale.prototype.timezones */ \
CPP(LocalePrototypeTimeZones) \
/* ecma402 #sec-Intl.Locale.prototype.toString */ \
CPP(LocalePrototypeToString) \
/* ecma402 #sec-Intl.Locale.prototype.weekInfo */ \
CPP(LocalePrototypeWeekInfo) \
/* ecma402 #sec-intl.numberformat */ \
CPP(NumberFormatConstructor) \
/* ecma402 #sec-number-format-functions */ \
CPP(NumberFormatInternalFormatNumber) \
/* ecma402 #sec-intl.numberformat.prototype.format */ \
CPP(NumberFormatPrototypeFormatNumber) \
/* ecma402 #sec-intl.numberformat.prototype.formatrange */ \
CPP(NumberFormatPrototypeFormatRange) \
/* ecma402 #sec-intl.numberformat.prototype.formatrangetoparts */ \
CPP(NumberFormatPrototypeFormatRangeToParts) \
/* ecma402 #sec-intl.numberformat.prototype.formattoparts */ \
CPP(NumberFormatPrototypeFormatToParts) \
/* ecma402 #sec-intl.numberformat.prototype.resolvedoptions */ \
CPP(NumberFormatPrototypeResolvedOptions) \
/* ecma402 #sec-intl.numberformat.supportedlocalesof */ \
CPP(NumberFormatSupportedLocalesOf) \
/* ecma402 #sec-intl.pluralrules */ \
CPP(PluralRulesConstructor) \
/* ecma402 #sec-intl.pluralrules.prototype.resolvedoptions */ \
CPP(PluralRulesPrototypeResolvedOptions) \
/* ecma402 #sec-intl.pluralrules.prototype.select */ \
CPP(PluralRulesPrototypeSelect) \
/* ecma402 #sec-intl.pluralrules.prototype.selectrange */ \
CPP(PluralRulesPrototypeSelectRange) \
/* ecma402 #sec-intl.pluralrules.supportedlocalesof */ \
CPP(PluralRulesSupportedLocalesOf) \
/* ecma402 #sec-intl.RelativeTimeFormat.constructor */ \
CPP(RelativeTimeFormatConstructor) \
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.format */ \
CPP(RelativeTimeFormatPrototypeFormat) \
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.formatToParts */ \
CPP(RelativeTimeFormatPrototypeFormatToParts) \
/* ecma402 #sec-intl.RelativeTimeFormat.prototype.resolvedOptions */ \
CPP(RelativeTimeFormatPrototypeResolvedOptions) \
/* ecma402 #sec-intl.RelativeTimeFormat.supportedlocalesof */ \
CPP(RelativeTimeFormatSupportedLocalesOf) \
/* ecma402 #sec-Intl.Segmenter */ \
CPP(SegmenterConstructor) \
/* ecma402 #sec-Intl.Segmenter.prototype.resolvedOptions */ \
CPP(SegmenterPrototypeResolvedOptions) \
/* ecma402 #sec-Intl.Segmenter.prototype.segment */ \
CPP(SegmenterPrototypeSegment) \
/* ecma402 #sec-Intl.Segmenter.supportedLocalesOf */ \
CPP(SegmenterSupportedLocalesOf) \
/* ecma402 #sec-segment-iterator-prototype-next */ \
CPP(SegmentIteratorPrototypeNext) \
/* ecma402 #sec-%segmentsprototype%.containing */ \
CPP(SegmentsPrototypeContaining) \
/* ecma402 #sec-%segmentsprototype%-@@iterator */ \
CPP(SegmentsPrototypeIterator) \
/* ES #sec-string.prototype.normalize */ \
CPP(StringPrototypeNormalizeIntl) \
/* ecma402 #sup-string.prototype.tolocalelowercase */ \
CPP(StringPrototypeToLocaleLowerCase) \
/* ecma402 #sup-string.prototype.tolocaleuppercase */ \
CPP(StringPrototypeToLocaleUpperCase) \
/* ES #sec-string.prototype.tolowercase */ \
TFJ(StringPrototypeToLowerCaseIntl, kJSArgcReceiverSlots, kReceiver) \
/* ES #sec-string.prototype.touppercase */ \
CPP(StringPrototypeToUpperCaseIntl) \
TFS(StringToLowerCaseIntl, kString) \
\
/* Temporal */ \
/* Temporal #sec-temporal.calendar.prototype.era */ \
CPP(TemporalCalendarPrototypeEra) \
/* Temporal #sec-temporal.calendar.prototype.erayear */ \
CPP(TemporalCalendarPrototypeEraYear) \
/* Temporal #sec-get-temporal.plaindate.prototype.era */ \
CPP(TemporalPlainDatePrototypeEra) \
/* Temporal #sec-get-temporal.plaindate.prototype.erayear */ \
CPP(TemporalPlainDatePrototypeEraYear) \
/* Temporal #sec-get-temporal.plaindatetime.prototype.era */ \
CPP(TemporalPlainDateTimePrototypeEra) \
/* Temporal #sec-get-temporal.plaindatetime.prototype.erayear */ \
CPP(TemporalPlainDateTimePrototypeEraYear) \
/* Temporal #sec-get-temporal.plainyearmonth.prototype.era */ \
CPP(TemporalPlainYearMonthPrototypeEra) \
/* Temporal #sec-get-temporal.plainyearmonth.prototype.erayear */ \
CPP(TemporalPlainYearMonthPrototypeEraYear) \
/* Temporal #sec-get-temporal.zoneddatetime.prototype.era */ \
CPP(TemporalZonedDateTimePrototypeEra) \
/* Temporal #sec-get-temporal.zoneddatetime.prototype.erayear */ \
CPP(TemporalZonedDateTimePrototypeEraYear) \
\
CPP(V8BreakIteratorConstructor) \
CPP(V8BreakIteratorInternalAdoptText) \
CPP(V8BreakIteratorInternalBreakType) \
CPP(V8BreakIteratorInternalCurrent) \
CPP(V8BreakIteratorInternalFirst) \
CPP(V8BreakIteratorInternalNext) \
CPP(V8BreakIteratorPrototypeAdoptText) \
CPP(V8BreakIteratorPrototypeBreakType) \
CPP(V8BreakIteratorPrototypeCurrent) \
CPP(V8BreakIteratorPrototypeFirst) \
CPP(V8BreakIteratorPrototypeNext) \
CPP(V8BreakIteratorPrototypeResolvedOptions) \
CPP(V8BreakIteratorSupportedLocalesOf)
#else
#define BUILTIN_LIST_INTL(CPP, TFJ, TFS) \
......
#include <stdio.h>
#include "src/builtins/builtins.h"
#include "src/builtins/builtins-utils-inl.h"
namespace v8 {
namespace internal {
BUILTIN(Encode) {
HandleScope scope(isolate);
printf("Encoding...\n");
return *isolate->factory()->ToBoolean(true);
}
} // internal
} // v8
......@@ -2786,6 +2786,15 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallToStringTag(isolate_, json_object, "JSON");
}
{
Handle<JSObject> encoder =
factory->NewJSObject(isolate_->object_function(), AllocationType::kOld);
JSObject::AddProperty(isolate_, global, "ENCODER", encoder, DONT_ENUM);
SimpleInstallFunction(isolate_, encoder, "encode",
Builtin::kEncode, 0, true);
InstallToStringTag(isolate_, encoder, "ENCODER");
}
{ // -- M a t h
Handle<JSObject> math =
factory->NewJSObject(isolate_->object_function(), AllocationType::kOld);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment