diff options
Diffstat (limited to 'src/compiler.js')
-rw-r--r-- | src/compiler.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/compiler.js b/src/compiler.js index f7c6dd59..90060837 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -121,6 +121,8 @@ if (typeof print === 'undefined') { // *** Environment setup code *** +DEBUG_MEMORY = false; + // Basic utilities load('utility.js'); @@ -211,15 +213,19 @@ C_DEFINES = temp.defines; // Load compiler code -load('framework.js'); load('modules.js'); load('parseTools.js'); load('intertyper.js'); load('analyzer.js'); load('jsifier.js'); -if (RELOOP) { +if (phase == 'funcs' && RELOOP) { // XXX handle !singlePhase RelooperModule = { TOTAL_MEMORY: ceilPowerOfTwo(2*RELOOPER_BUFFER_SIZE) }; - load(RELOOPER); + try { + load(RELOOPER); + } catch(e) { + printErr('cannot load relooper at ' + RELOOPER + ' : ' + e + ', trying in current dir'); + load('relooper.js'); + } assert(typeof Relooper != 'undefined'); } globalEval(processMacros(preprocess(read('runtime.js')))); @@ -273,6 +279,9 @@ function compile(raw) { intertyped = null; JSify(analyzed); + //dumpInterProf(); + //printErr(phase + ' paths (fast, slow): ' + [fastPaths, slowPaths]); + phase = null; if (DEBUG_MEMORY) { |