aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-09-25 15:48:27 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-25 15:48:27 -0700
commit3b278b74a6111ece31de29dfec54eae957576a62 (patch)
tree357fc963397b56e44477c24bef4815d1446742c4
parent6dda61e5fc7c89b759033319444017aff8e3605f (diff)
try to load relooper for src dir, if not in expected location
-rw-r--r--src/compiler.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler.js b/src/compiler.js
index 4f16986c..77abd53b 100644
--- a/src/compiler.js
+++ b/src/compiler.js
@@ -215,7 +215,12 @@ load('analyzer.js');
load('jsifier.js');
if (phase == 'funcs' && RELOOP) { // XXX handle !singlePhase
RelooperModule = { TOTAL_MEMORY: ceilPowerOfTwo(2*RELOOPER_BUFFER_SIZE) };
- load(RELOOPER);
+ try {
+ load(RELOOPER);
+ } catch(e) {
+ printErr('cannot find relooper at ' + RELOOPER + ', trying in current dir');
+ load('relooper.js');
+ }
assert(typeof Relooper != 'undefined');
}
globalEval(processMacros(preprocess(read('runtime.js'))));