diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-25 21:26:15 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:03 -0700 |
commit | 0561274642ce8febd8b877927b8750573771ee3b (patch) | |
tree | 0726ca2a3a810d106d866b40bc0062037f0dd910 /emlink.py | |
parent | 5e01920010c51286010e0d59d5b7541aad0678e8 (diff) |
fix memory initializer counting and add test for merging of two of them
Diffstat (limited to 'emlink.py')
-rw-r--r-- | emlink.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -44,8 +44,9 @@ class AsmModule(): if mem_init: self.mem_init_full_js = mem_init.group(0) self.mem_init_js = mem_init.groups(0)[0][:-2] - self.mem_init_size = self.mem_init_js.count(',') + self.mem_init_js.count('concat') # XXX add testing for large and small ones + self.mem_init_size = self.mem_init_js.count(',') + self.mem_init_js.count('concat') + 1 # XXX add testing for large and small ones pad = 8 - (self.mem_init_size % 8) + #print >> sys.stderr, 'pad', self.mem_init_size, pad if pad < 8: self.mem_init_js += '.concat([' + ','.join(['0']*pad) + '])' self.mem_init_size += pad |