diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-28 13:53:05 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:03 -0700 |
commit | 077b37c1f617f2a962b99ec55aca9e465086b3df (patch) | |
tree | 5a5e1f27159298840e4d96ce7c653662968b20e3 | |
parent | 585b3d76eeb784fb091333e9ddedf51becb234ea (diff) |
apply replacements in global initializer merging
-rw-r--r-- | emlink.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -122,8 +122,8 @@ class AsmModule(): # global initializers if self.global_inits: - # TODO: take into account function name replacements - all_global_inits = map(lambda init: '{ func: function() { %s() } }' % init, main.global_inits + self.global_inits) + my_global_inits = map(lambda init: replacements[init] if init in replacements else init, self.global_inits) + all_global_inits = map(lambda init: '{ func: function() { %s() } }' % init, main.global_inits + my_global_inits) all_global_inits_js = '/* global initializers */ __ATINIT__.push(' + ','.join(all_global_inits) + ');' if main.global_inits: target = main.global_inits_js |