diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-28 12:03:21 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-10-02 17:31:35 -0700 |
commit | e04b4ef520ccf56116fc16401b26c5ad6026bbf4 (patch) | |
tree | 736032e80a3d3e76f8c2b8fbdc3bce7b62d3aaa8 | |
parent | eb739e39e2aaeeab9da59132c161ef41c5e4639a (diff) |
COMPILER_FASTPATHS option
-rw-r--r-- | src/intertyper.js | 13 | ||||
-rw-r--r-- | src/settings.js | 1 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/intertyper.js b/src/intertyper.js index 8eebd22d..80fcff38 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -1110,11 +1110,14 @@ function intertyper(lines, sidePass, baseLineNums) { // Input lineSplitter().forEach(function(line) { - var item = tryFastPaths(line); - if (item) { - finalResults.push(item); - fastPaths++; - return; + var item; + if (COMPILER_FASTPATHS) { + item = tryFastPaths(line); + if (item) { + finalResults.push(item); + fastPaths++; + return; + } } slowPaths++; diff --git a/src/settings.js b/src/settings.js index 7a9e6b76..5e5d50f6 100644 --- a/src/settings.js +++ b/src/settings.js @@ -435,6 +435,7 @@ var EXPORT_NAME = 'Module'; // Global variable to export the module as for envir // loading system (e.g. the browser and SM shell). var COMPILER_ASSERTIONS = 0; // costly (slow) compile-time assertions +var COMPILER_FASTPATHS = 1; // use fast-paths to speed up compilation // Compiler debugging options var DEBUG_TAGS_SHOWING = []; |