summaryrefslogtreecommitdiffstats
path: root/js/src/shell
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-02-20 21:21:56 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-02-20 21:21:56 +0100
commit0c36b27511c1fbca594f0426c493ef601fda3e4c (patch)
tree6e801c0abb01391e6008a49f9d6c4ac4dd967cd8 /js/src/shell
parentd77729916b4b9c2b67abd41181336c2cbb1da968 (diff)
downloadUXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar
UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar.gz
UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar.lz
UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar.xz
UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.zip
JS - support for Array.prototype.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 3f56981cd..67b848445 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;
@@ -7248,6 +7249,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)
@@ -7255,7 +7257,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;
@@ -7526,7 +7529,8 @@ SetWorkerContextOptions(JSContext* cx)
.setWasm(enableWasm)
.setWasmAlwaysBaseline(enableWasmAlwaysBaseline)
.setNativeRegExp(enableNativeRegExp)
- .setUnboxedArrays(enableUnboxedArrays);
+ .setUnboxedArrays(enableUnboxedArrays)
+ .setArrayProtoValues(enableArrayProtoValues);
cx->setOffthreadIonCompilationEnabled(offthreadCompilation);
cx->profilingScripts = enableCodeCoverage || enableDisassemblyDumps;
@@ -7699,6 +7703,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 "