From 4a1a935ff0e30c9e46f4b7469488a5b6ffee2714 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 17 Apr 2019 10:34:16 -0700 Subject: Demote a wasm2js warning on scopes (#2016) We do not actually analyze scopes properly there, see comment in the commit. For now, just demote it to a warning. Not sure if it's worth fixing it or just removing it. --- src/wasm2js.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wasm2js.h b/src/wasm2js.h index ac325ce13..3c868e8dd 100644 --- a/src/wasm2js.h +++ b/src/wasm2js.h @@ -230,9 +230,13 @@ public: // it's a bug currently if they're not globally unique. This should // probably be fixed via a different namespace for exports or something // like that. + // XXX This is not actually a valid check atm, since functions are not in the + // global-most scope, but rather in the "asmFunc" scope which is inside it. + // Also, for emscripten style glue, we emit the exports as a return, so there + // is no name placed into the scope. For these reasons, just warn here, don't + // error. if (scope == NameScope::Top) { - Fatal() << "global scope is colliding with other scope: " << mangled << '\n'; - abort(); + std::cerr << "wasm2js: warning: global scope may be colliding with other scope: " << mangled << '\n'; } } allMangledNames.insert(ret); -- cgit v1.2.3