File tree 5 files changed +28
-2
lines changed
5 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -1629,7 +1629,7 @@ export class Module {
1629
1629
binaryen . _BinaryenModuleInterpret ( this . ref ) ;
1630
1630
}
1631
1631
1632
- toBinary ( sourceMapUrl : string | null ) : BinaryModule {
1632
+ toBinary ( sourceMapUrl : string | null = null ) : BinaryModule {
1633
1633
var out = this . lit ; // safe to reuse as long as..
1634
1634
assert ( binaryen . _BinaryenSizeofLiteral ( ) >= 12 ) ;
1635
1635
var cStr = allocString ( sourceMapUrl ) ;
@@ -1642,7 +1642,7 @@ export class Module {
1642
1642
var ret = new BinaryModule ( ) ;
1643
1643
ret . output = readBuffer ( binaryPtr , binaryLen ) ;
1644
1644
ret . sourceMap = readString ( sourceMapPtr ) ;
1645
- binaryen . _free ( cStr ) ;
1645
+ if ( cStr ) binaryen . _free ( cStr ) ;
1646
1646
binaryen . _free ( binaryPtr ) ;
1647
1647
if ( sourceMapPtr ) binaryen . _free ( sourceMapPtr ) ;
1648
1648
return ret ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "asc_flags" : [
3
+ " --runtime none" ,
4
+ " --converge"
5
+ ]
6
+ }
Original file line number Diff line number Diff line change
1
+ (module
2
+ (type $none_=>_none (func ))
3
+ (memory $0 0 )
4
+ (export " memory" (memory $0 ))
5
+ (export " test" (func $converge/test ))
6
+ (func $converge/test
7
+ nop
8
+ )
9
+ )
Original file line number Diff line number Diff line change
1
+ export function test ( ) : void { }
Original file line number Diff line number Diff line change
1
+ (module
2
+ (type $none_=>_none (func ))
3
+ (memory $0 0 )
4
+ (table $0 1 funcref )
5
+ (export " memory" (memory $0 ))
6
+ (export " test" (func $converge/test ))
7
+ (func $converge/test
8
+ nop
9
+ )
10
+ )
You can’t perform that action at this time.
0 commit comments