Implement explicit this type (#373)

* Add backing classes for basic types (I32...)
* Move standard numeric constants to backing classes
This commit is contained in:
Daniel Wirtz
2019-01-09 12:45:29 +01:00
committed by GitHub
parent d5f72e32d7
commit f714afab3c
14 changed files with 8028 additions and 1596 deletions

View File

@ -153,7 +153,12 @@ export function compileCall(
);
return module.createUnreachable();
}
let element = compiler.resolver.resolveExpression(operands[0], compiler.currentFunction, ReportMode.SWALLOW);
let element = compiler.resolver.resolveExpression(
operands[0],
compiler.currentFunction,
Type.void,
ReportMode.SWALLOW
);
return module.createI32(element ? 1 : 0);
}
case "isConstant": { // isConstant(expression) -> bool