diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-22 16:48:35 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-22 16:48:35 -0800 |
commit | 7537fe280b24dcbe7733685cc20e2abde259f082 (patch) | |
tree | 874496269c75143c8ac5d884fa595306e2e2c761 | |
parent | 20bfab62c606859899cb54345b11763661f62030 (diff) |
fix jsfuncchunking bug
-rwxr-xr-x | tests/runner.py | 2 | ||||
-rw-r--r-- | tools/js_optimizer.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py index 44879c16..4ec99878 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -11782,7 +11782,7 @@ fi (['--jcache'], 'hello_libcxx.cpp', False, True, False, True, False, True, []), ([], 'hello_libcxx.cpp', False, False, False, False, False, False, []), # finally, build a file close to the previous, to see that some chunks are found in the cache and some not - (['--jcache'], 'hello_libcxx_mod1.cpp', False, True, True, True, True, False, []), # win on pre, mix on funcs, lose on jsfuncs + (['--jcache'], 'hello_libcxx_mod1.cpp', False, True, True, True, True, True, []), # win on pre, mix on funcs, mix on jsfuncs (['--jcache'], 'hello_libcxx_mod1.cpp', False, True, False, True, False, True, []), ]: print >> sys.stderr, args, input_file, expect_pre_save, expect_pre_load, expect_funcs_save, expect_funcs_load, expect_jsfuncs_save, expect_jsfuncs_load, expected diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py index f2e610d0..cbf64486 100644 --- a/tools/js_optimizer.py +++ b/tools/js_optimizer.py @@ -88,10 +88,11 @@ def run_on_js(filename, passes, js_engine, jcache): if i < len(parts)-1: func += '\n}\n' # last part needs no } m = func_sig.search(func) if m: - ident = m.group(1) + ident = m.group(2) else: if suffix: continue # ignore whitespace ident = 'anon_%d' % i + assert ident funcs.append((ident, func)) parts = None total_size = len(js) |