aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-01 18:37:13 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-01 18:37:13 -0800
commit1549a85427fe76243a5cd1191e57b0a9cb867e5a (patch)
treea951339c4ac9b83d86f42cb270b5ea98df6d32b7 /src
parent97bcf966151e76ab22c4dcf701000efe1e08c3f6 (diff)
llvm inlining support (disabled by default; enabled in benchmarks)
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js2
-rw-r--r--src/settings.js8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 97d04055..e66f7b69 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -628,7 +628,7 @@ function JSify(data, functionsOnly, givenFunctions) {
func.JS += 'Module["' + func.ident + '"] = ' + func.ident + ';';
}
- if (func.lines.length >= CLOSURE_INLINE_PREVENTION_LINES) {
+ if (INLINING_LIMIT && func.lines.length >= INLINING_LIMIT) {
func.JS += func.ident + '["X"]=1;';
}
diff --git a/src/settings.js b/src/settings.js
index 16a7b665..6bca0174 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -85,10 +85,10 @@ var SKIP_STACK_IN_SMALL = 1; // When enabled, does not push/pop the stack at all
// In particular, be careful with the autodebugger! (We do turn
// this off automatically in that case, though.)
var INLINE_LIBRARY_FUNCS = 1; // Will inline library functions that have __inline defined
-var CLOSURE_INLINE_PREVENTION_LINES = 50; // Functions of this number of lines or larger will have
- // code generated that tells the closure compiler not to
- // inline them. This is useful to prevent the generation of
- // overly large functions.
+var INLINING_LIMIT = 50; // A limit on inlining. If 0, we will inline normally in LLVM and
+ // closure. If greater than 0, we will *not* inline in LLVM, and
+ // we will prevent inlining of functions of this size or larger
+ // in closure.
var CATCH_EXIT_CODE = 0; // If set, causes exit() to throw an exception object which is caught
// in a try..catch block and results in the exit status being
// returned from run(). If zero (the default), the program is just