diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-03-15 18:21:34 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-15 18:21:34 -0700 |
commit | b22f6fbbbebb5df55ceb8fdc9f7c4d111c902c5e (patch) | |
tree | c568136b2cf95d897d128b362720602a3b401244 /src/modules.js | |
parent | 8c9a37a40a164dba330390af2eabf5ad05625001 (diff) | |
parent | 27d1a249622d33ab8aff2814d13569507336873b (diff) |
Merge branch 'incoming'
Diffstat (limited to 'src/modules.js')
-rw-r--r-- | src/modules.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules.js b/src/modules.js index afdbc21e..bda8a605 100644 --- a/src/modules.js +++ b/src/modules.js @@ -90,6 +90,7 @@ var Debugging = { lines[i] = ';'; continue; } + if (line[0] == '!') skipLine = true; lines[i] = skipLine ? ';' : line; } @@ -290,7 +291,7 @@ var Functions = { var sig = ASM_JS ? Functions.implementedFunctions[ident] || Functions.unimplementedFunctions[ident] || LibraryManager.library[ident.substr(1) + '__sig'] : 'x'; assert(sig, ident); if (!tables[sig]) tables[sig] = emptyTable(sig); // TODO: make them compact - tables[sig][this.indexedFunctions[ident]] = ident; + tables[sig][this.indexedFunctions[ident]] = ident in DEAD_FUNCTIONS ? '0' : ident; } var generated = false; var wrapped = {}; @@ -314,7 +315,7 @@ var Functions = { } if (ASM_JS) { var curr = table[i]; - if (curr && !Functions.implementedFunctions[curr]) { + if (curr && curr != '0' && !Functions.implementedFunctions[curr]) { // This is a library function, we can't just put it in the function table, need a wrapper if (!wrapped[curr]) { var args = '', arg_coercions = '', call = curr + '(', retPre = '', retPost = ''; @@ -373,7 +374,7 @@ var LibraryManager = { load: function() { if (this.library) return; - var libraries = ['library.js', 'library_browser.js', 'library_sdl.js', 'library_gl.js', 'library_glut.js', 'library_xlib.js', 'library_egl.js', 'library_gc.js', 'library_jansson.js'].concat(additionalLibraries); + var libraries = ['library.js', 'library_browser.js', 'library_sdl.js', 'library_gl.js', 'library_glut.js', 'library_xlib.js', 'library_egl.js', 'library_gc.js', 'library_jansson.js', 'library_openal.js'].concat(additionalLibraries); for (var i = 0; i < libraries.length; i++) { eval(processMacros(preprocess(read(libraries[i])))); } |