aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-18 09:37:46 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-11-21 20:47:01 +0100
commit8fce64dd18afaa0c49fb59cf161fa2fadeac6e7a (patch)
tree8d445e5894c056ec1e8c271d8083f4479fbc62a4 /emscripten.py
parent6af60b71376b8bf0c9a6fa41f2d4f2a0ec9ded8b (diff)
basic jcache on pre with files+cPickle
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/emscripten.py b/emscripten.py
index 681d2283..488b29e5 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -74,7 +74,7 @@ def emscript(infile, settings, outfile, libraries=[]):
if DEBUG: print >> sys.stderr, 'emscript: ll=>js'
- if jcache: JCache.ensure()
+ if jcache: shared.JCache.ensure()
# Pre-scan ll and alter settings as necessary
if DEBUG: t = time.time()
@@ -137,13 +137,13 @@ def emscript(infile, settings, outfile, libraries=[]):
out = None
if jcache:
keys = [pre_input, settings_text, ','.join(libraries)]
- shortkey = JCache.get_key(keys)
- out = JCache.get(shortkey, keys)
+ shortkey = shared.JCache.get_shortkey(keys)
+ out = shared.JCache.get(shortkey, keys)
if not out:
open(pre_file, 'w').write(pre_input)
out = shared.run_js(compiler, shared.COMPILER_ENGINE, [settings_file, pre_file, 'pre'] + libraries, stdout=subprocess.PIPE, cwd=path_from_root('src'))
if jcache:
- JCache.set(shortkey, keys, out)
+ shared.JCache.set(shortkey, keys, out)
pre, forwarded_data = out.split('//FORWARDED_DATA:')
forwarded_file = temp_files.get('.json').name
open(forwarded_file, 'w').write(forwarded_data)