summaryrefslogtreecommitdiff
path: root/js/src/vm
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/vm')
-rw-r--r--js/src/vm/DateTime.cpp6
-rw-r--r--js/src/vm/GlobalObject.cpp4
-rw-r--r--js/src/vm/Initialization.cpp10
-rw-r--r--js/src/vm/Runtime.cpp12
-rw-r--r--js/src/vm/Runtime.h7
-rw-r--r--js/src/vm/SelfHosting.cpp4
6 files changed, 4 insertions, 39 deletions
diff --git a/js/src/vm/DateTime.cpp b/js/src/vm/DateTime.cpp
index e35ad42854..ba3145af22 100644
--- a/js/src/vm/DateTime.cpp
+++ b/js/src/vm/DateTime.cpp
@@ -13,9 +13,7 @@
#include "jsutil.h"
#include "js/Date.h"
-#if ENABLE_INTL_API
#include "unicode/timezone.h"
-#endif
using mozilla::Atomic;
using mozilla::ReleaseAcquire;
@@ -333,7 +331,7 @@ JS::ResetTimeZone()
{
js::DateTimeInfo::updateTimeZoneAdjustment();
-#if ENABLE_INTL_API && defined(ICU_TZ_HAS_RECREATE_DEFAULT)
+#if defined(ICU_TZ_HAS_RECREATE_DEFAULT)
TZInfo.acquire();
TZInfo.status = IcuTimeZoneInfo::NeedsUpdate;
TZInfo.release();
@@ -343,7 +341,7 @@ JS::ResetTimeZone()
void
js::ResyncICUDefaultTimeZone()
{
-#if ENABLE_INTL_API && defined(ICU_TZ_HAS_RECREATE_DEFAULT)
+#if defined(ICU_TZ_HAS_RECREATE_DEFAULT)
TZInfo.acquire();
if (TZInfo.status == IcuTimeZoneInfo::NeedsUpdate) {
icu::TimeZone::recreateDefault();
diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp
index 280548cd60..c90b6b85fa 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 05cc087cc2..39acdf9a89 100644
--- a/js/src/vm/Initialization.cpp
+++ b/js/src/vm/Initialization.cpp
@@ -20,10 +20,8 @@
#include "jit/ExecutableAllocator.h"
#include "jit/Ion.h"
#include "js/Utility.h"
-#if ENABLE_INTL_API
#include "unicode/uclean.h"
#include "unicode/utypes.h"
-#endif // ENABLE_INTL_API
#include "vm/DateTime.h"
#include "vm/HelperThreads.h"
#include "vm/Runtime.h"
@@ -113,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());
@@ -171,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();
@@ -188,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 0d6a3922c4..174e235942 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),
@@ -330,8 +325,7 @@ JSRuntime::init(uint32_t maxbytes, uint32_t maxNurseryBytes)
/* The garbage collector depends on everything before this point being initialized. */
gcInitialized = true;
- if (!InitRuntimeNumberState(this))
- return false;
+ InitRuntimeNumberState(this);
JS::ResetTimeZone();
@@ -425,10 +419,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 734543c4e3..735adadf2f 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 9a8ec7679f..653807ce85 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),