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 @@ -70,16 +70,22 @@ var findLinkReferences = function (bytecode) {
7070 // trim trailing underscores
7171 // NOTE: this has no way of knowing if the trailing underscore was part of the name
7272 var libraryName = found [ 1 ] . replace ( / _ + $ / gm, '' ) ;
73+ var fileName = libraryName ;
74+ var nameExtraction = / ( .* ) : ( .* ) / . exec ( libraryName ) ;
75+ if ( nameExtraction ) {
76+ fileName = nameExtraction [ 1 ] ;
77+ libraryName = nameExtraction [ 2 ] ;
78+ }
7379
74- if ( ! linkReferences [ libraryName ] ) {
75- linkReferences [ libraryName ] = [ ] ;
80+ if ( ! linkReferences [ fileName ] ) {
81+ linkReferences [ fileName ] = { } ;
7682 }
7783
78- linkReferences [ libraryName ] . push ( {
84+ linkReferences [ fileName ] [ libraryName ] = {
7985 // offsets are in bytes in binary representation (and not hex)
8086 start : ( offset + start ) / 2 ,
8187 length : 20
82- } ) ;
88+ } ;
8389
8490 offset += start + 20 ;
8591
You can’t perform that action at this time.
0 commit comments