Fix inconsistent return type use in BaseCompiler::emitInstanceCall
Categories
(Core :: JavaScript: WebAssembly, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
Details
Attachments
(1 file)
13.04 KB,
patch
|
lth
:
review+
|
Details | Diff | Splinter Review |
emitInstanceCall() generates code to call a SymbolicAddress:: builtin. One of
the parameters to emitInstanceCall() is the ABI-level return type of the call.
If that is non-void, the returned value is pushed on to the compiler's operand
stack.
There are some functions, for example Instance::memFill, which return a value
(an ExprType::I32) which is an implementation artefact, and which we don't
want to push on the operand stack. As it stands, in such cases we lie to
emitInstanceCall() by telling it the return type is ExprType::Void, so as to
stop it pushing the return value. This inconsistency is confusing, and more
importantly it gets in the way of ongoing work to move towards having
single-point-of-truth definitions of argument and result types for
SymbolicAddress:: builtin functions.
Assignee | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
Comment on attachment 9044187 [details] [diff] [review] bug1528240-inconsistent-ret-tys-baseline-1.diff Review of attachment 9044187 [details] [diff] [review]: ----------------------------------------------------------------- Nice and clean.
Pushed by jseward@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/55806c7e28b7 Fix inconsistent return type use in BaseCompiler::emitInstanceCall. r=lhansen.
Comment 4•5 years ago
|
||
bugherder |
Description
•