File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -66,16 +66,22 @@ var findLinkReferences = function (bytecode) {
6666 // trim trailing underscores
6767 // NOTE: this has no way of knowing if the trailing underscore was part of the name
6868 var libraryName = found [ 1 ] . replace ( / _ + $ / gm, '' ) ;
69+ var fileName = libraryName ;
70+ var nameExtraction = / ( .* ) : ( .* ) / . exec ( libraryName ) ;
71+ if ( nameExtraction ) {
72+ fileName = nameExtraction [ 1 ] ;
73+ libraryName = nameExtraction [ 2 ] ;
74+ }
6975
70- if ( ! linkReferences [ libraryName ] ) {
71- linkReferences [ libraryName ] = [ ] ;
76+ if ( ! linkReferences [ fileName ] ) {
77+ linkReferences [ fileName ] = { } ;
7278 }
7379
74- linkReferences [ libraryName ] . push ( {
80+ linkReferences [ fileName ] [ libraryName ] = {
7581 // offsets are in bytes in binary representation (and not hex)
7682 start : ( offset + start ) / 2 ,
7783 length : 20
78- } ) ;
84+ } ;
7985
8086 offset += start + 20 ;
8187
You can’t perform that action at this time.
0 commit comments