summaryrefslogtreecommitdiffstats
path: root/js/src/vm
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/vm
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/vm')
-rw-r--r--js/src/vm/GlobalObject.cpp4
-rw-r--r--js/src/vm/Initialization.cpp8
-rw-r--r--js/src/vm/Runtime.cpp9
-rw-r--r--js/src/vm/Runtime.h7
-rw-r--r--js/src/vm/SelfHosting.cpp4
5 files changed, 1 insertions, 31 deletions
diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp
index 280548cd6..c90b6b85f 100644
--- a/js/src/vm/GlobalObject.cpp
+++ b/js/src/vm/GlobalObject.cpp
@@ -17,9 +17,7 @@
#include "builtin/AtomicsObject.h"
#include "builtin/Eval.h"
-#if EXPOSE_INTL_API
-# include "builtin/Intl.h"
-#endif
+#include "builtin/Intl.h"
#include "builtin/MapObject.h"
#include "builtin/ModuleObject.h"
#include "builtin/Object.h"
diff --git a/js/src/vm/Initialization.cpp b/js/src/vm/Initialization.cpp
index b4108761f..39acdf9a8 100644
--- a/js/src/vm/Initialization.cpp
+++ b/js/src/vm/Initialization.cpp
@@ -111,12 +111,10 @@ JS::detail::InitWithFailureDiagnostic(bool isDebugBuild)
js::DateTimeInfo::init();
-#if EXPOSE_INTL_API
UErrorCode err = U_ZERO_ERROR;
u_init(&err);
if (U_FAILURE(err))
return "u_init() failed";
-#endif // EXPOSE_INTL_API
RETURN_IF_FAIL(js::CreateHelperThreadsState());
RETURN_IF_FAIL(FutexRuntime::initialize());
@@ -169,9 +167,7 @@ JS_ShutDown(void)
// to do it only when PRMJ_Now is eventually called.
PRMJ_NowShutdown();
-#if EXPOSE_INTL_API
u_cleanup();
-#endif // EXPOSE_INTL_API
if (!JSRuntime::hasLiveRuntimes())
js::jit::ReleaseProcessExecutableMemory();
@@ -186,11 +182,7 @@ JS_SetICUMemoryFunctions(JS_ICUAllocFn allocFn, JS_ICUReallocFn reallocFn, JS_IC
"must call JS_SetICUMemoryFunctions before any other JSAPI "
"operation (including JS_Init)");
-#if EXPOSE_INTL_API
UErrorCode status = U_ZERO_ERROR;
u_setMemoryFunctions(/* context = */ nullptr, allocFn, reallocFn, freeFn, &status);
return U_SUCCESS(status);
-#else
- return true;
-#endif
}
diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp
index 0d6a3922c..0e7ce7f10 100644
--- a/js/src/vm/Runtime.cpp
+++ b/js/src/vm/Runtime.cpp
@@ -213,11 +213,6 @@ JSRuntime::JSRuntime(JSRuntime* parentRuntime)
warningReporter(nullptr),
buildIdOp(nullptr),
propertyRemovals(0),
-#if !EXPOSE_INTL_API
- thousandsSeparator(0),
- decimalSeparator(0),
- numGrouping(0),
-#endif
keepAtoms_(0),
trustedPrincipals_(nullptr),
beingDestroyed_(false),
@@ -425,10 +420,6 @@ JSRuntime::destroyRuntime()
*/
FreeScriptData(this, lock);
-#if !EXPOSE_INTL_API
- FinishRuntimeNumberState(this);
-#endif
-
gc.finish();
atomsCompartment_ = nullptr;
diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h
index 734543c4e..735adadf2 100644
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -978,13 +978,6 @@ struct JSRuntime : public JS::shadow::Runtime,
*/
uint32_t propertyRemovals;
-#if !EXPOSE_INTL_API
- /* Number localization, used by jsnum.cpp. */
- const char* thousandsSeparator;
- const char* decimalSeparator;
- const char* numGrouping;
-#endif
-
private:
mozilla::Maybe<js::SharedImmutableStringsCache> sharedImmutableStrings_;
diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
index 9a8ec7679..653807ce8 100644
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -2205,11 +2205,7 @@ static const JSFunctionSpec intrinsic_functions[] = {
JS_FN("std_String_trimRight", str_trimRight, 0,0),
JS_FN("std_String_toLocaleLowerCase", str_toLocaleLowerCase, 0,0),
JS_FN("std_String_toLocaleUpperCase", str_toLocaleUpperCase, 0,0),
-#if !EXPOSE_INTL_API
- JS_FN("std_String_localeCompare", str_localeCompare, 1,0),
-#else
JS_FN("std_String_normalize", str_normalize, 0,0),
-#endif
JS_FN("std_String_concat", str_concat, 1,0),
JS_FN("std_TypedArray_buffer", js::TypedArray_bufferGetter, 1,0),