aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-12-28 23:14:53 +0000
committerGitHub <noreply@github.com>2019-12-28 23:14:53 +0000
commitd1a78920d9b85074fd4e9b0d07556a7a266631e8 (patch)
tree6d3be960b0406ce2f22ad7d679254eb87f53a03a /lib/scope.js
parentd9cd3d33c8f2b769da922d355373d466f8b30704 (diff)
downloadtracifyjs-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.js5
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);
});