зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1629496 - Correctly init wasm locals for functions with stack results r=lth
Ion functions with locals and stack results were inadvertantly skipping a local, because they were considering the stack results pointer argument as counting towards locals. Differential Revision: https://phabricator.services.mozilla.com/D70797 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
53459f4868
Коммит
95f9c28ec4
|
@ -0,0 +1,9 @@
|
|||
let bytes = wasmTextToBinary(`
|
||||
(module
|
||||
(func $f (param) (result i32 i32)
|
||||
(local i32)
|
||||
(loop)
|
||||
(i32.const 0)
|
||||
(i32.const 1)))`);
|
||||
|
||||
new WebAssembly.Instance(new WebAssembly.Module(bytes));
|
|
@ -184,7 +184,8 @@ class FunctionCompiler {
|
|||
return false;
|
||||
}
|
||||
|
||||
for (size_t i = args.length(); i < locals_.length(); i++) {
|
||||
for (size_t i = args.lengthWithoutStackResults(); i < locals_.length();
|
||||
i++) {
|
||||
MInstruction* ins = nullptr;
|
||||
switch (locals_[i].kind()) {
|
||||
case ValType::I32:
|
||||
|
|
Загрузка…
Ссылка в новой задаче