runtime integration and flag

This commit is contained in:
dcode
2019-03-31 21:58:42 +02:00
parent c4a57025d2
commit 27f1905510
225 changed files with 8010 additions and 9365 deletions

View File

@ -8374,9 +8374,9 @@ export class Compiler extends DiagnosticEmitter {
var module = this.module;
var options = this.options;
var usizeType = options.usizeType;
var nativeSizeType = options.nativeSizeType;
var nativeSizeSize = options.usizeType.byteSize;
// var signatureStr = Signature.makeSignatureString([ Type.u32 ], Type.void, options.usizeType);
var body = new Array<ExpressionRef>();
// nothing to mark if 'this' is null (should not happen)
@ -8398,6 +8398,9 @@ export class Compiler extends DiagnosticEmitter {
assert(functionIndex < functionTable.length);
assert(functionTable[functionIndex] == functionName);
var fnSig = Signature.makeSignatureString([ usizeType ], Type.void);
this.ensureFunctionType([ usizeType ], Type.void);
// if the class extends a base class, call its hook first
var baseInstance = classInstance.base;
if (baseInstance) {
@ -8441,7 +8444,7 @@ export class Compiler extends DiagnosticEmitter {
module.createGetLocal(1, NativeType.I32),
[
module.createGetLocal(2, nativeSizeType)
], "FUNCSIG$vi"
], fnSig
),
module.createCall(functionTable[fieldClassId], [
module.createGetLocal(2, nativeSizeType),