mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 1439898: wasm: Don't render more unreachable items; r=lth
MozReview-Commit-ID: EQx4pzpuNhn --HG-- extra : rebase_source : ab8ebfb5203faea19e079bd83d1541aaf79c219c
This commit is contained in:
parent
daf1b034f1
commit
e33e3eaf64
@ -229,7 +229,7 @@ function get(instance, name) {
|
||||
// code.
|
||||
|
||||
if (typeof WebAssembly.Global === "function")
|
||||
return ValueResult(Number(instance.value.exports[name]));
|
||||
return ValueResult(Number(instance.value.exports[name]));
|
||||
|
||||
return ValueResult(instance.value.exports[name]);
|
||||
}
|
||||
|
@ -398,6 +398,9 @@ AstDecodeBrTable(AstDecodeContext& c)
|
||||
if (!c.iter().readBrTable(&depths, &defaultDepth, &type, nullptr, nullptr))
|
||||
return false;
|
||||
|
||||
if (c.iter().currentBlockHasPolymorphicBase())
|
||||
return true;
|
||||
|
||||
AstRefVector table(c.lifo);
|
||||
if (!table.resize(depths.length()))
|
||||
return false;
|
||||
@ -652,15 +655,19 @@ AstDecodeSelect(AstDecodeContext& c)
|
||||
if (!c.iter().readSelect(&type, nullptr, nullptr, nullptr))
|
||||
return false;
|
||||
|
||||
if (c.iter().currentBlockHasPolymorphicBase())
|
||||
return true;
|
||||
|
||||
AstDecodeStackItem selectFalse = c.popCopy();
|
||||
AstDecodeStackItem selectTrue = c.popCopy();
|
||||
AstDecodeStackItem cond = c.popCopy();
|
||||
|
||||
AstTernaryOperator* ternary = new(c.lifo) AstTernaryOperator(Op::Select, cond.expr, selectTrue.expr, selectFalse.expr);
|
||||
if (!ternary)
|
||||
auto* select = new(c.lifo) AstTernaryOperator(Op::Select, cond.expr, selectTrue.expr,
|
||||
selectFalse.expr);
|
||||
if (!select)
|
||||
return false;
|
||||
|
||||
if (!c.push(AstDecodeStackItem(ternary)))
|
||||
if (!c.push(AstDecodeStackItem(select)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user