mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-20 10:16:37 +00:00
Reduce inlining verbosity
With debug info and source maps in place there is not much value anymore in emitting explicitly named blocks.
This commit is contained in:
@ -5492,7 +5492,11 @@ export class Compiler extends DiagnosticEmitter {
|
||||
);
|
||||
return module.createUnreachable();
|
||||
}
|
||||
return module.createBlock(returnLabel, body, returnType.toNativeType());
|
||||
return flow.is(FlowFlags.RETURNS)
|
||||
? module.createBlock(returnLabel, body, returnType.toNativeType())
|
||||
: body.length > 1
|
||||
? module.createBlock(null, body, returnType.toNativeType())
|
||||
: body[0];
|
||||
}
|
||||
|
||||
/** Gets the trampoline for the specified function. */
|
||||
|
Reference in New Issue
Block a user