Add showcase compiler test incl. respective features and fixes

This commit is contained in:
dcodeIO
2018-01-05 18:19:32 +01:00
parent 2d0f5f3087
commit 9846f6c033
15 changed files with 15362 additions and 88 deletions

View File

@ -282,7 +282,7 @@ export function compileCall(compiler: Compiler, prototype: FunctionPrototype, ty
if (!validateCall(compiler, typeArguments, 1, operands, 1, reportNode))
return module.createUnreachable();
if ((compiler.currentType = (<Type[]>typeArguments)[0]).isAnyInteger) {
arg0 = compiler.compileExpression(operands[0], (<Type[]>typeArguments)[0]);
arg0 = compiler.compileExpression(operands[0], (<Type[]>typeArguments)[0]);
return (compiler.currentType = (<Type[]>typeArguments)[0]).isLongInteger // sic
? module.createUnary(UnaryOp.ClzI64, arg0)
: (<Type[]>typeArguments)[0].isSmallInteger