mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-07 18:41:55 +00:00
Add offsetof<T> builtin; Put a function's trampoline into the function table if a it has optional parameters; TypedArray scaffolding
This commit is contained in:
@ -1192,6 +1192,10 @@ export class Compiler extends DiagnosticEmitter {
|
||||
}
|
||||
var functionTable = this.functionTable;
|
||||
var index = functionTable.length;
|
||||
if (func.signature.requiredParameters < func.signature.parameterTypes.length) {
|
||||
// insert the trampoline if the function has optional parameters
|
||||
func = this.ensureTrampoline(func);
|
||||
}
|
||||
functionTable.push(func);
|
||||
func.functionTableIndex = index;
|
||||
return index;
|
||||
|
Reference in New Issue
Block a user