summaryrefslogtreecommitdiffstats
path: root/js/src/shell
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-28 11:33:19 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-03-28 11:33:19 +0200
commitdc8aad9b9dc6983bb88aa586f34d9db007840eb8 (patch)
treec8d904ea558af12c858ee6df1f9a08cfa11434e5 /js/src/shell
parent19b934070704c1ed12d3a75bc97752831d23f087 (diff)
parentd990d8ab2cade6c928e8bbe56ae038d020cef599 (diff)
downloadUXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.tar
UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.tar.gz
UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.tar.lz
UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.tar.xz
UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.zip
Merge remote-tracking branch 'janek/_testBranch_js_array_values'
Diffstat (limited to 'js/src/shell')
-rw-r--r--js/src/shell/js.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
index b53914942..cc68c90d5 100644
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -323,6 +323,7 @@ static bool enableNativeRegExp = false;
static bool enableUnboxedArrays = false;
static bool enableSharedMemory = SHARED_MEMORY_DEFAULT;
static bool enableWasmAlwaysBaseline = false;
+static bool enableArrayProtoValues = true;
static bool printTiming = false;
static const char* jsCacheDir = nullptr;
static const char* jsCacheAsmJSPath = nullptr;
@@ -7264,6 +7265,7 @@ SetContextOptions(JSContext* cx, const OptionParser& op)
enableNativeRegExp = !op.getBoolOption("no-native-regexp");
enableUnboxedArrays = op.getBoolOption("unboxed-arrays");
enableWasmAlwaysBaseline = op.getBoolOption("wasm-always-baseline");
+ enableArrayProtoValues = !op.getBoolOption("no-array-proto-values");
JS::ContextOptionsRef(cx).setBaseline(enableBaseline)
.setIon(enableIon)
@@ -7271,7 +7273,8 @@ SetContextOptions(JSContext* cx, const OptionParser& op)
.setWasm(enableWasm)
.setWasmAlwaysBaseline(enableWasmAlwaysBaseline)
.setNativeRegExp(enableNativeRegExp)
- .setUnboxedArrays(enableUnboxedArrays);
+ .setUnboxedArrays(enableUnboxedArrays)
+ .setArrayProtoValues(enableArrayProtoValues);
if (op.getBoolOption("wasm-check-bce"))
jit::JitOptions.wasmAlwaysCheckBounds = true;
@@ -7542,7 +7545,8 @@ SetWorkerContextOptions(JSContext* cx)
.setWasm(enableWasm)
.setWasmAlwaysBaseline(enableWasmAlwaysBaseline)
.setNativeRegExp(enableNativeRegExp)
- .setUnboxedArrays(enableUnboxedArrays);
+ .setUnboxedArrays(enableUnboxedArrays)
+ .setArrayProtoValues(enableArrayProtoValues);
cx->setOffthreadIonCompilationEnabled(offthreadCompilation);
cx->profilingScripts = enableCodeCoverage || enableDisassemblyDumps;
@@ -7715,6 +7719,7 @@ main(int argc, char** argv, char** envp)
|| !op.addBoolOption('\0', "unboxed-arrays", "Allow creating unboxed arrays")
|| !op.addBoolOption('\0', "wasm-always-baseline", "Enable wasm baseline compiler when possible")
|| !op.addBoolOption('\0', "wasm-check-bce", "Always generate wasm bounds check, even redundant ones.")
+ || !op.addBoolOption('\0', "no-array-proto-values", "Remove Array.prototype.values")
#ifdef ENABLE_SHARED_ARRAY_BUFFER
|| !op.addStringOption('\0', "shared-memory", "on/off",
"SharedArrayBuffer and Atomics "