diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-12-28 23:14:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-28 23:14:53 +0000 |
commit | d1a78920d9b85074fd4e9b0d07556a7a266631e8 (patch) | |
tree | 6d3be960b0406ce2f22ad7d679254eb87f53a03a /lib/scope.js | |
parent | d9cd3d33c8f2b769da922d355373d466f8b30704 (diff) | |
download | tracifyjs-d1a78920d9b85074fd4e9b0d07556a7a266631e8.tar.gz tracifyjs-d1a78920d9b85074fd4e9b0d07556a7a266631e8.zip |
workaround firefox asm.js quirks (#3650)
fixes #3636
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/scope.js b/lib/scope.js index edefc29b..896efacc 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -428,6 +428,11 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options) { if (options.cache && node instanceof AST_Toplevel) { node.globals.each(mangle); } + if (node instanceof AST_Defun && tw.has_directive("use asm")) { + var sym = new AST_SymbolRef(node.name); + sym.scope = node; + sym.reference(options); + } node.variables.each(function(def) { if (!defer_redef(def)) mangle(def); }); |