aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-01 23:23:24 -0500
committerAlon Zakai <alonzakai@gmail.com>2013-12-01 23:24:30 -0500
commit7c875b91bdbd0b9657c4703058a41e62623063c6 (patch)
treeb4aa78858635b00c6b4b412424232a71e35086ca /emscripten.py
parent7069a576b23f98762034fcb2025b9ac3ce0a12d4 (diff)
differentiate external vars from funcs in fastcomp
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/emscripten.py b/emscripten.py
index afae9507..7bf93a4f 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -800,7 +800,7 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
set(settings['DEFAULT_LIBRARY_FUNCS_TO_INCLUDE'] + map(shared.JS.to_nice_ident, metadata['declares'])).difference(
map(lambda x: x[1:], metadata['implementedFunctions'])
)
- ) + map(lambda x: x[1:], metadata['externs'])
+ ) + map(lambda x: x[1:], metadata['externFuncs'])
# Settings changes
assert settings['TARGET_LE32'] == 1
@@ -994,8 +994,8 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
except:
pass
# If no named globals, only need externals
- global_vars = []
- global_funcs = list(set(['_' + key for key, value in forwarded_json['Functions']['libraryFunctions'].iteritems() if value != 2] + metadata['externs']))
+ global_vars = metadata['externVars'] #+ forwarded_json['Variables']['globals']
+ global_funcs = list(set(['_' + key for key, value in forwarded_json['Functions']['libraryFunctions'].iteritems() if value != 2] + metadata['externFuncs']))
def math_fix(g):
return g if not g.startswith('Math_') else g.split('_')[1]
asm_global_funcs = ''.join([' var ' + g.replace('.', '_') + '=global.' + g + ';\n' for g in maths]) + \