summaryrefslogtreecommitdiffstats
path: root/js/src/jsdate.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-04 21:47:32 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-04 21:47:32 +0200
commit74c62cd3373e23fe77f509373f581c33872d813d (patch)
treef3b15accca8029bf07b0d20ba63d972cb4f9f739 /js/src/jsdate.cpp
parentc18d9955df45be20537cc221dabebdae7d4fe744 (diff)
downloadUXP-74c62cd3373e23fe77f509373f581c33872d813d.tar
UXP-74c62cd3373e23fe77f509373f581c33872d813d.tar.gz
UXP-74c62cd3373e23fe77f509373f581c33872d813d.tar.lz
UXP-74c62cd3373e23fe77f509373f581c33872d813d.tar.xz
UXP-74c62cd3373e23fe77f509373f581c33872d813d.zip
Issue #325 Part 14: Remove EXPOSE_INTL_API conditionals.
Diffstat (limited to 'js/src/jsdate.cpp')
-rwxr-xr-xjs/src/jsdate.cpp77
1 files changed, 0 insertions, 77 deletions
diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp
index 00a8abf84..52294a5df 100755
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
@@ -2743,77 +2743,6 @@ ToLocaleFormatHelper(JSContext* cx, HandleObject obj, const char* format, Mutabl
return true;
}
-#if !EXPOSE_INTL_API
-/* ES5 15.9.5.5. */
-MOZ_ALWAYS_INLINE bool
-date_toLocaleString_impl(JSContext* cx, const CallArgs& args)
-{
- /*
- * Use '%#c' for windows, because '%c' is backward-compatible and non-y2k
- * with msvc; '%#c' requests that a full year be used in the result string.
- */
- static const char format[] =
-#if defined(_WIN32) && !defined(__MWERKS__)
- "%#c"
-#else
- "%c"
-#endif
- ;
-
- Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
- return ToLocaleFormatHelper(cx, dateObj, format, args.rval());
-}
-
-static bool
-date_toLocaleString(JSContext* cx, unsigned argc, Value* vp)
-{
- CallArgs args = CallArgsFromVp(argc, vp);
- return CallNonGenericMethod<IsDate, date_toLocaleString_impl>(cx, args);
-}
-
-/* ES5 15.9.5.6. */
-MOZ_ALWAYS_INLINE bool
-date_toLocaleDateString_impl(JSContext* cx, const CallArgs& args)
-{
- /*
- * Use '%#x' for windows, because '%x' is backward-compatible and non-y2k
- * with msvc; '%#x' requests that a full year be used in the result string.
- */
- static const char format[] =
-#if defined(_WIN32) && !defined(__MWERKS__)
- "%#x"
-#else
- "%x"
-#endif
- ;
-
- Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
- return ToLocaleFormatHelper(cx, dateObj, format, args.rval());
-}
-
-static bool
-date_toLocaleDateString(JSContext* cx, unsigned argc, Value* vp)
-{
- CallArgs args = CallArgsFromVp(argc, vp);
- return CallNonGenericMethod<IsDate, date_toLocaleDateString_impl>(cx, args);
-}
-
-/* ES5 15.9.5.7. */
-MOZ_ALWAYS_INLINE bool
-date_toLocaleTimeString_impl(JSContext* cx, const CallArgs& args)
-{
- Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
- return ToLocaleFormatHelper(cx, dateObj, "%X", args.rval());
-}
-
-static bool
-date_toLocaleTimeString(JSContext* cx, unsigned argc, Value* vp)
-{
- CallArgs args = CallArgsFromVp(argc, vp);
- return CallNonGenericMethod<IsDate, date_toLocaleTimeString_impl>(cx, args);
-}
-#endif /* !EXPOSE_INTL_API */
-
MOZ_ALWAYS_INLINE bool
date_toLocaleFormat_impl(JSContext* cx, const CallArgs& args)
{
@@ -3037,15 +2966,9 @@ static const JSFunctionSpec date_methods[] = {
JS_FN("setUTCMilliseconds", date_setUTCMilliseconds, 1,0),
JS_FN("toUTCString", date_toGMTString, 0,0),
JS_FN("toLocaleFormat", date_toLocaleFormat, 0,0),
-#if EXPOSE_INTL_API
JS_SELF_HOSTED_FN(js_toLocaleString_str, "Date_toLocaleString", 0,0),
JS_SELF_HOSTED_FN("toLocaleDateString", "Date_toLocaleDateString", 0,0),
JS_SELF_HOSTED_FN("toLocaleTimeString", "Date_toLocaleTimeString", 0,0),
-#else
- JS_FN(js_toLocaleString_str, date_toLocaleString, 0,0),
- JS_FN("toLocaleDateString", date_toLocaleDateString, 0,0),
- JS_FN("toLocaleTimeString", date_toLocaleTimeString, 0,0),
-#endif
JS_FN("toDateString", date_toDateString, 0,0),
JS_FN("toTimeString", date_toTimeString, 0,0),
JS_FN("toISOString", date_toISOString, 0,0),