diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-10-23 17:35:37 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-10-23 17:35:37 -0700 |
commit | 94ee68349b7510192b7ee89912e64366dac81022 (patch) | |
tree | bf79a492944018e661cc367608d4f274d7a78ee1 /tools/shared.py | |
parent | e3d2f0cced1dcd1e260591d201a45573d2b3409f (diff) |
integrate eliminator as js optimizer pass
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/tools/shared.py b/tools/shared.py index 84ce6c2e..6150060b 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -190,7 +190,6 @@ LLVM_NM=os.path.expanduser(build_llvm_tool_path('llvm-nm')) LLVM_INTERPRETER=os.path.expanduser(build_llvm_tool_path('lli')) LLVM_COMPILER=os.path.expanduser(build_llvm_tool_path('llc')) LLVM_EXTRACT=os.path.expanduser(build_llvm_tool_path('llvm-extract')) -COFFEESCRIPT = path_from_root('tools', 'eliminator', 'node_modules', 'coffee-script', 'bin', 'coffee') EMSCRIPTEN = path_from_root('emscripten.py') DEMANGLER = path_from_root('third_party', 'demangler.py') @@ -205,7 +204,6 @@ EMMAKEN = path_from_root('tools', 'emmaken.py') AUTODEBUGGER = path_from_root('tools', 'autodebugger.py') BINDINGS_GENERATOR = path_from_root('tools', 'bindings_generator.py') EXEC_LLVM = path_from_root('tools', 'exec_llvm.py') -VARIABLE_ELIMINATOR = path_from_root('tools', 'eliminator.js') JS_OPTIMIZER = path_from_root('tools', 'js-optimizer.js') FILE_PACKAGER = path_from_root('tools', 'file_packager.py') @@ -988,21 +986,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e return filename @staticmethod - def eliminator(filename, maybe_big=True): - if maybe_big: - ret = Building.splitter(filename, addendum='.el.js', func=Building.eliminator) - if ret: return ret - - input = open(filename, 'r').read() - output = Popen([NODE_JS, VARIABLE_ELIMINATOR, filename], stdout=PIPE).communicate()[0] - assert len(output) > 0, 'Error in eliminator: ' + output - filename += '.el.js' - f = open(filename, 'w') - f.write(output) - f.close() - return filename - - @staticmethod def closure_compiler(filename): if not os.path.exists(CLOSURE_COMPILER): raise Exception('Closure compiler appears to be missing, looked at: ' + str(CLOSURE_COMPILER)) |