Skip to content

Commit

Permalink
Bug 1870396 - Enable fuse-guarded destructuring optimization by defau…
Browse files Browse the repository at this point in the history
…lt r=iain

Differential Revision: https://phabricator.services.mozilla.com/D198748
  • Loading branch information
mgaudet committed Jan 17, 2024
1 parent 1d09fcd commit 9f0120e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion js/public/ContextOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class JS_PUBLIC_API ContextOptions {
trySmoosh_(false),
#endif
fuzzing_(false),
enableDestructuringFuse_(false) {
enableDestructuringFuse_(true) {
}
// clang-format on

Expand Down
2 changes: 1 addition & 1 deletion js/src/jit-test/tests/fuses/cross-realm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// |jit-test| --enable-destructuring-fuse
// |jit-test|

function f(x) {
let [a, b, c] = x;
Expand Down
8 changes: 4 additions & 4 deletions js/src/shell/js.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ bool shell::enableSymbolsAsWeakMapKeys = false;

bool shell::enableArrayBufferTransfer = true;
bool shell::enableImportAssertions = false;
bool shell::enableDestructuringFuse = false;
bool shell::enableDestructuringFuse = true;
#ifdef JS_GC_ZEAL
uint32_t shell::gZealBits = 0;
uint32_t shell::gZealFrequency = 0;
Expand Down Expand Up @@ -11712,8 +11712,8 @@ bool InitOptionParser(OptionParser& op) {
"(no-op) Enable class static blocks") ||
!op.addBoolOption('\0', "enable-import-assertions",
"Enable import assertions") ||
!op.addBoolOption('\0', "enable-destructuring-fuse",
"Enable Destructuring Fuse") ||
!op.addBoolOption('\0', "disable-destructuring-fuse",
"Disable Destructuring Fuse") ||
!op.addStringOption('\0', "shared-memory", "on/off",
"SharedArrayBuffer and Atomics "
#if SHARED_MEMORY_DEFAULT
Expand Down Expand Up @@ -12234,7 +12234,7 @@ bool SetContextOptions(JSContext* cx, const OptionParser& op) {
#endif
enableArrayBufferTransfer = !op.getBoolOption("disable-arraybuffer-transfer");
enableImportAssertions = op.getBoolOption("enable-import-assertions");
enableDestructuringFuse = op.getBoolOption("enable-destructuring-fuse");
enableDestructuringFuse = !op.getBoolOption("disable-destructuring-fuse");
useFdlibmForSinCosTan = op.getBoolOption("use-fdlibm-for-sin-cos-tan");

JS::ContextOptionsRef(cx)
Expand Down

0 comments on commit 9f0120e

Please sign in to comment.