diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-04-21 13:17:24 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-04-21 13:17:24 -0700 |
commit | e1de4d430a370a9cbf72e949307639b50f399c75 (patch) | |
tree | 2957bcdc35d8d52c9d302854620ca9584507d8e3 /src/compiler.js | |
parent | 3d4cc9e9312a954a79ee7df7ffe0fc0495c37b24 (diff) |
line-specific exceptions to SAFE_HEAP
Diffstat (limited to 'src/compiler.js')
-rw-r--r-- | src/compiler.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/compiler.js b/src/compiler.js index 53e2b020..fc9ae7fc 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -36,6 +36,9 @@ if (CORRECT_OVERFLOWS === 2) { if (CORRECT_ROUNDINGS === 2) { CORRECT_ROUNDINGS_LINES = set(CORRECT_ROUNDINGS_LINES); // for fast checking } +if (SAFE_HEAP === 2) { + SAFE_HEAP_LINES = set(SAFE_HEAP_LINES); // for fast checking +} EXPORTED_FUNCTIONS = set(EXPORTED_FUNCTIONS); @@ -49,12 +52,6 @@ load('analyzer.js'); load('jsifier.js'); load('runtime.js'); -// Load library, with preprocessing and macros - -for (suffix in set('', '_sdl', '_gl')) { - eval(processMacros(preprocess(read('library' + suffix + '.js'), CONSTANTS))); -} - //=============================== // Main //=============================== @@ -71,5 +68,12 @@ do { // Do it -JSify(analyzer(intertyper(lines))); +var inter = intertyper(lines); + +// Load library, with preprocessing and macros. Must be done after intertyper, so we know if we have debug info or not +for (suffix in set('', '_sdl', '_gl')) { + eval(processMacros(preprocess(read('library' + suffix + '.js'), CONSTANTS))); +} + +JSify(analyzer(inter)); |