mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1246331: Make unary decoding expect the real type, not the parent type; r=sunfish
This commit is contained in:
parent
47f1c05064
commit
93cadf3a5a
@ -268,7 +268,7 @@ static bool
|
||||
DecodeUnaryOperator(FunctionDecoder& f, ExprType expected, ExprType type)
|
||||
{
|
||||
return CheckType(f, type, expected) &&
|
||||
DecodeExpr(f, expected);
|
||||
DecodeExpr(f, type);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -2637,6 +2637,7 @@ EmitExpr(FunctionCompiler& f, ExprType type, MDefinition** def, LabelVector* may
|
||||
|
||||
switch (Expr op = f.readOpcode()) {
|
||||
case Expr::Nop:
|
||||
*def = nullptr;
|
||||
return true;
|
||||
case Expr::Block:
|
||||
return EmitBlock(f, type, def);
|
||||
|
@ -64,6 +64,7 @@ assertErrorMessage(() => wasmEvalText('(module (func (param i32) (result i32) (f
|
||||
assertErrorMessage(() => wasmEvalText('(module (func (param i32) (result f64) (f64.sqrt (get_local 0))))'), TypeError, mismatchError("i32", "f64"));
|
||||
assertErrorMessage(() => wasmEvalText('(module (func (param f64) (result i32) (f64.sqrt (get_local 0))))'), TypeError, mismatchError("f64", "i32"));
|
||||
assertErrorMessage(() => wasmEvalText('(module (func (param i32) (result i32) (f64.sqrt (get_local 0))))'), TypeError, mismatchError("f64", "i32"));
|
||||
assertErrorMessage(() => wasmEvalText('(module (func (f32.sqrt (nop))))'), TypeError, mismatchError("void", "f32"));
|
||||
|
||||
assertErrorMessage(() => wasmEvalText('(module (func (param i32) (param f32) (result f32) (f32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32"));
|
||||
assertErrorMessage(() => wasmEvalText('(module (func (param f32) (param i32) (result f32) (f32.add (get_local 0) (get_local 1))))'), TypeError, mismatchError("i32", "f32"));
|
||||
|
Loading…
Reference in New Issue
Block a user