diff options
Diffstat (limited to 'js/src/vm')
-rw-r--r-- | js/src/vm/CommonPropertyNames.h | 4 | ||||
-rw-r--r-- | js/src/vm/GlobalObject.h | 6 | ||||
-rw-r--r-- | js/src/vm/SelfHosting.cpp | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/js/src/vm/CommonPropertyNames.h b/js/src/vm/CommonPropertyNames.h index 445b8a6bb3..8ecd3a2083 100644 --- a/js/src/vm/CommonPropertyNames.h +++ b/js/src/vm/CommonPropertyNames.h @@ -182,6 +182,7 @@ macro(InitializeDateTimeFormat, InitializeDateTimeFormat, "InitializeDateTimeFormat") \ macro(InitializeNumberFormat, InitializeNumberFormat, "InitializeNumberFormat") \ macro(InitializePluralRules, InitializePluralRules, "InitializePluralRules") \ + macro(InitializeRelativeTimeFormat, InitializeRelativeTimeFormat, "InitializeRelativeTimeFormat") \ macro(innermost, innermost, "innermost") \ macro(inNursery, inNursery, "inNursery") \ macro(input, input, "input") \ @@ -297,6 +298,8 @@ macro(Reify, Reify, "Reify") \ macro(reject, reject, "reject") \ macro(rejected, rejected, "rejected") \ + macro(RelativeTimeFormat, RelativeTimeFormat, "RelativeTimeFormat") \ + macro(RelativeTimeFormatFormat, RelativeTimeFormatFormat, "Intl_RelativeTimeFormat_Format") \ macro(RequireObjectCoercible, RequireObjectCoercible, "RequireObjectCoercible") \ macro(resolve, resolve, "resolve") \ macro(resumeGenerator, resumeGenerator, "resumeGenerator") \ @@ -364,6 +367,7 @@ macro(unescape, unescape, "unescape") \ macro(uneval, uneval, "uneval") \ macro(unicode, unicode, "unicode") \ + macro(unit, unit, "unit") \ macro(uninitialized, uninitialized, "uninitialized") \ macro(unsized, unsized, "unsized") \ macro(unwatch, unwatch, "unwatch") \ diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h index f9c0149f12..2e1b6ce87b 100644 --- a/js/src/vm/GlobalObject.h +++ b/js/src/vm/GlobalObject.h @@ -110,6 +110,7 @@ class GlobalObject : public NativeObject NUMBER_FORMAT_PROTO, DATE_TIME_FORMAT_PROTO, PLURAL_RULES_PROTO, + RELATIVE_TIME_FORMAT_PROTO, MODULE_PROTO, IMPORT_ENTRY_PROTO, EXPORT_ENTRY_PROTO, @@ -513,6 +514,11 @@ class GlobalObject : public NativeObject return getOrCreateObject(cx, global, PLURAL_RULES_PROTO, initIntlObject); } + static JSObject* + getOrCreateRelativeTimeFormatPrototype(JSContext* cx, Handle<GlobalObject*> global) { + return getOrCreateObject(cx, global, RELATIVE_TIME_FORMAT_PROTO, initIntlObject); + } + static bool ensureModulePrototypesCreated(JSContext *cx, Handle<GlobalObject*> global); JSObject* maybeGetModulePrototype() { diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index 29c75c2064..058cc6b6d0 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -2520,6 +2520,8 @@ static const JSFunctionSpec intrinsic_functions[] = { JS_FN("intl_PluralRules_availableLocales", intl_PluralRules_availableLocales, 0,0), JS_FN("intl_GetPluralCategories", intl_GetPluralCategories, 2, 0), JS_FN("intl_SelectPluralRule", intl_SelectPluralRule, 2,0), + JS_FN("intl_RelativeTimeFormat_availableLocales", intl_RelativeTimeFormat_availableLocales, 0,0), + JS_FN("intl_FormatRelativeTime", intl_FormatRelativeTime, 3,0), JS_INLINABLE_FN("IsRegExpObject", intrinsic_IsInstanceOfBuiltin<RegExpObject>, 1,0, |