@@ -650,8 +650,7 @@ export class Compiler extends DiagnosticEmitter {
650
650
}
651
651
652
652
// setup memory & table
653
- this . initMemory ( memoryOffset ) ;
654
- this . initTable ( ) ;
653
+ this . initDefaultMemoryAndTable ( memoryOffset ) ;
655
654
656
655
// expose the arguments length helper if there are varargs exports
657
656
if ( this . runtimeFeatures & RuntimeFeatures . setArgumentsLength ) {
@@ -712,11 +711,13 @@ export class Compiler extends DiagnosticEmitter {
712
711
return module ;
713
712
}
714
713
715
- private initMemory ( memoryOffset : i64 ) : void {
716
- this . memoryOffset = memoryOffset ;
717
-
714
+ private initDefaultMemoryAndTable ( memoryOffset : i64 ) : void {
718
715
var options = this . options ;
719
716
var module = this . module ;
717
+
718
+ // Init default memory
719
+
720
+ this . memoryOffset = memoryOffset ;
720
721
var memorySegments = this . memorySegments ;
721
722
722
723
var initialPages : u32 = 0 ;
@@ -801,11 +802,8 @@ export class Compiler extends DiagnosticEmitter {
801
802
isSharedMemory
802
803
) ;
803
804
}
804
- }
805
805
806
- private initTable ( ) : void {
807
- var options = this . options ;
808
- var module = this . module ;
806
+ // Init default table
809
807
810
808
// import and/or export table if requested (default table is named '0' by Binaryen)
811
809
if ( options . importTable ) {
@@ -861,6 +859,12 @@ export class Compiler extends DiagnosticEmitter {
861
859
) ;
862
860
}
863
861
862
+ private initTable ( ) : void {
863
+ var options = this . options ;
864
+ var module = this . module ;
865
+
866
+ }
867
+
864
868
// === Exports ==================================================================================
865
869
866
870
/** Compiles the respective module exports for the specified entry file. */
0 commit comments