Remove defunct nested-call optimisation in WasmIonCompile.cpp
Categories
(Core :: JavaScript: WebAssembly, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
Details
Attachments
(2 files)
37.62 KB,
patch
|
luke
:
feedback+
|
Details | Diff | Splinter Review |
32.62 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
Translation of wasm into MIR is currently set up to handle multiple nested
function call instances simultaneously, using a stack of CallCompileState
records to keep track of the per-open-call state. This is an optimisation
intended to allow interleaved evaluation and pushing of stack-resident
outbound arguments. However, this was predicated on the assumption of
pre-order Wasm encoding, which is no longer valid -- encoding is post-order.
The compiler's operand (wasm) stack tracks MIR value nodes, which are by
definition already evaluated -- it doesn't track unevaluated expression trees.
Consequently, by the time we arrive at a wasm call instruction, we have to
hand the MIR nodes for all the arguments, so the possibility of evaluating
arguments whilst marshalling the arguments no longer exists.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Comment on attachment 9043550 [details] [diff] [review] bug1527563-simplify-calls-1.diff Review of attachment 9043550 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! Nice to disentangle lineOrBytecode as well. ::: js/src/wasm/WasmIonCompile.cpp @@ +71,5 @@ > friend class FunctionCompiler; > > public: > + // JRS FIXME: why pass in |f| here? Can this be rm'd? > + CallCompileState(FunctionCompiler& f) {} Kill it; it was probably used to pluck out some field value at some time in the past.
Assignee | ||
Comment 3•5 years ago
|
||
This is the same as the previous version, but rebased to m-c current
and with the removal in comment 2 actioned.
Comment 4•5 years ago
|
||
Comment on attachment 9043914 [details] [diff] [review] bug1527563-simplify-calls-3.diff Review of attachment 9043914 [details] [diff] [review]: ----------------------------------------------------------------- Nice!
Pushed by jseward@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/cd56d5e49b75 Remove defunct nested-call optimisation in WasmIonCompile.cpp. r=luke.
Comment 6•5 years ago
|
||
bugherder |
Description
•