mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 17:31:29 +00:00
Avoid trampolines where optional arguments are constant literals, see #102; Fix temporary local flags not being cleared; Fix inlined temporary locals not being free'd; Fix inlined flows not breaking after returns; Allow changetype of u32s, i.e. function pointers
This commit is contained in:
@ -1945,13 +1945,6 @@ export function compileCall(
|
||||
reportNode.range, "1", typeArguments ? typeArguments.length.toString(10) : "0"
|
||||
);
|
||||
return module.createUnreachable();
|
||||
} else if (typeArguments[0].kind != TypeKind.USIZE) { // any usize
|
||||
compiler.error(
|
||||
DiagnosticCode.Operation_not_supported,
|
||||
reportNode.range
|
||||
);
|
||||
compiler.currentType = typeArguments[0];
|
||||
return module.createUnreachable();
|
||||
}
|
||||
if (operands.length != 1) {
|
||||
compiler.error(
|
||||
@ -1963,11 +1956,11 @@ export function compileCall(
|
||||
}
|
||||
arg0 = compiler.compileExpressionRetainType(
|
||||
operands[0],
|
||||
compiler.options.usizeType,
|
||||
typeArguments[0],
|
||||
WrapMode.NONE
|
||||
);
|
||||
compiler.currentType = typeArguments[0];
|
||||
if (compiler.currentType.kind != TypeKind.USIZE) {
|
||||
if (compiler.currentType.size != typeArguments[0].size) {
|
||||
compiler.error(
|
||||
DiagnosticCode.Operation_not_supported,
|
||||
reportNode.range
|
||||
|
Reference in New Issue
Block a user