PreprocessValue was calling BigIntObject::unbox directly, which doesn't
check for proxy objects. Add a BigInt branch to js::Unbox and use that
function instead.
WebAssembly.Global is currently nightly- and early-beta-only, gated by
ENABLE_WASM_GLOBAL and EARLY_BETA_OR_EARLIER respectively. This bug is to
enable it by default.
* js/src/moz.build:
js/src/shell/moz.build:
js/src/jsapi-tests/moz.build:
Don't define ENABLE_WASM_GLOBAL.
* js/src/wasm/WasmJS.cpp:
js/src/wasm/WasmModule.cpp:
js/src/wasm/WasmValidate.cpp:
Un-guard code guarded by
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
and remove code guarded by its negation. Inside js/src, the two symbols
are only ever used together, so there's no need to consider them separately.
* js/src/jit-test/tests/wasm/globals.js:
js/src/jit-test/tests/wasm/spec/harness/index.js:
Remove code guarded by (typeof WebAssembly.Global === "undefined") and
un-guard code guarded by (typeof WebAssembly.Global === "function")
* js/src/jit-test/tests/wasm/spec/globals.wast.js:
js/src/jit-test/tests/wasm/spec/linking.wast.js:
Make these be the same as spec/proposal_mutable_global/globals.wast.js
and spec/proposal_mutable_global/linking.wast.js respectively.
* js/src/jit-test/tests/wasm/spec/proposal_mutable_global/globals.wast.js:
js/src/jit-test/tests/wasm/spec/proposal_mutable_global/linking.wast.js:
js/src/jit-test/tests/wasm/spec/proposal_mutable_global/directives.txt:
js/src/jit-test/tests/wasm/spec/proposal_mutable_global (directory):
Deleted.
--HG--
extra : rebase_source : 72e56b59a5162a2e131596c41ec33f527845ae6d
Some configurations of SpiderMonkey wind up producing C++ switch statements of
the form
switch (..) {
default: break;
}
We hoped that they would simply be optimised out without comment. But MSVC
warns about the lack of non-default cases, which then are escalated into
errors, causing the build to fail. This commit simply disables that warning
feature when building with MSVC.
--HG--
extra : rebase_source : 468022d30cdaf483aaa64fc7aa9dd1308fbc7335
This bug is for importation of spec tests for the WA mutable-global
extension, as proposed at https://github.com/WebAssembly/mutable-global.
In particular it imports the following tests in that repo:
test/core/globals.wast (wrapped in JS)
test/core/linking.wast (ditto)
test/js-api/jsapi.js
The resulting files linking.js and globals.js are placed in a new
subdirectory, js/src/jit-test/tests/wasm/spec/proposal_mutable_global to
make it clear that they pertain to the proposal, and so as not to alter the
existing tests.
There have also been some changes to the test harness code as required to
support the new tests, as follows:
* js/src/jit-test/lib/wasm-testharness.js: the existing logic for locating
the harness/ subdir appears to assume that all the test scripts live in
the same directory, which is no longer the case. It has been reworked
so as to use a fixed offset relative to |libdir| rather than a fixed
offset from |scriptdir|.
* js/src/jit-test/lib/wasm-testharness.js: the revised jsapi.js requires a
new function |assert_not_equals|, but it does not appear possible to
define it in the same way that |assert_equals| is defined. A simple
implementation of |assert_not_equals| has therefore been added.
* src/jit-test/tests/wasm/spec/harness/index.js: a couple more registry
entries were added, as required by the new globals.js and linking.js.
* js/src/jit-test/tests/wasm/spec/harness/wasm-module-builder.js: added
a |mutable| parameter to addImportedGlobal().
* js/src/jit-test/tests/wasm/spec/jsapi.js: there are many changes, but
almost all of them result simply from the resync.
* js/src/jit-test/tests/wasm/spec/proposal_mutable_global/directives.txt
* js/src/jit-test/tests/wasm/spec/proposal_mutable_global/globals.wast.js
* js/src/jit-test/tests/wasm/spec/proposal_mutable_global/linking.wast.js
New files.
--HG--
extra : rebase_source : 1f049fced054e2a979c1ab364f75aaf805de1255
The current name is "type". Henceforth it shall be known as "value", per CG
decision of 15 May 2018.
--HG--
extra : rebase_source : 3a0dabf9acb1d95abe35dd66da0172cae8014b08
As a result of work to import updated WebAssembly mutable-global tests in
bug 1452588, the fact that there is no check to verify that the actual type
of an imported global is what is expected, came to light. This patch adds
the missing check. It does not add the actual test that exposed the
problem; that is part of bug 1452588 and so will land when that lands.
--HG--
extra : rebase_source : e5e2d0747f3f27773ace5324497394a6260611c7
This will have its behavior defined by ECMA-402 in the future; for now,
it returns the same result as the toString method (which is permitted by
the BigInt spec).
--HG--
extra : rebase_source : 0474757caa464c2979e58038825610957e0b15f3