diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jsifier.js | 4 | ||||
-rw-r--r-- | src/settings.js | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 5f75b374..8d9e65c6 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -553,6 +553,10 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { func.JS += 'Module["' + func.ident + '"] = ' + func.ident + ';'; } + if (func.lines.length >= CLOSURE_INLINE_PREVENTION_LINES) { + func.JS += func.ident + '["X"]=1;'; + } + return func; } }); diff --git a/src/settings.js b/src/settings.js index 7e076288..e8f65f58 100644 --- a/src/settings.js +++ b/src/settings.js @@ -71,6 +71,10 @@ SKIP_STACK_IN_SMALL = 1; // When enabled, does not push/pop the stack at all in // a lot can exhaust the stack very fast, with this option. // In particular, be careful with the autodebugger! INLINE_LIBRARY_FUNCS = 1; // Will inline library functions that have __inline defined +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. // Generated code debugging options SAFE_HEAP = 0; // Check each write to the heap against a list of blocked addresses |