mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-26 11:42:08 +00:00
Add a 'call_indirect' builtin to emit arbitrary calls (might trap at runtime); Optimize 'for' loop compilation a bit
This commit is contained in:
dist
src
std
tests/compiler
binary.optimized.watbinary.untouched.watbuiltins.optimized.watbuiltins.tsbuiltins.untouched.watclass-overloading.optimized.watclass-overloading.tsclass-overloading.untouched.watcomma.optimized.watcomma.untouched.watfor.optimized.watfor.untouched.watinfer-type.optimized.watinfer-type.untouched.watmandelbrot.optimized.watmandelbrot.untouched.watretain-i32.optimized.watretain-i32.untouched.watscoped.optimized.watscoped.untouched.watshowcase.optimized.watshowcase.tsshowcase.untouched.wat
std
@@ -364,13 +364,6 @@ export class Parser extends DiagnosticEmitter {
|
||||
var token = tn.next();
|
||||
var startPos = tn.tokenPos;
|
||||
|
||||
// 'void'
|
||||
if (token == Token.VOID) {
|
||||
return Node.createType(
|
||||
Node.createIdentifierExpression("void", tn.range()), [], false, tn.range(startPos, tn.pos)
|
||||
);
|
||||
}
|
||||
|
||||
var type: CommonTypeNode;
|
||||
|
||||
// '(' ...
|
||||
@@ -437,6 +430,12 @@ export class Parser extends DiagnosticEmitter {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 'void'
|
||||
} else if (token == Token.VOID) {
|
||||
type = Node.createType(
|
||||
Node.createIdentifierExpression("void", tn.range()), [], false, tn.range(startPos, tn.pos)
|
||||
);
|
||||
|
||||
// 'this'
|
||||
} else if (token == Token.THIS) {
|
||||
type = Node.createType(
|
||||
|
Reference in New Issue
Block a user