diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-10-16 12:17:46 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-10-16 12:17:46 -0700 |
commit | 5d3a70a0feca32c00b97b92686a930d16d9474a3 (patch) | |
tree | d4f13fb82fa1f568c506ae23af14f2b23f0b6cb5 /src/jsifier.js | |
parent | 1a6c5d091c2ced9d846d6ff68f09a24410201ed1 (diff) |
option to not inline library functions
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 86f62c41..91cfbe6a 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -867,8 +867,10 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { args = args.concat(varargs); var argsText = args.join(', '); + // Inline if either we inline whenever we can (and we can), or if there is no noninlined version var inline = LibraryManager.library[shortident + '__inline']; - if (inline) { + var nonInlined = shortident in LibraryManager.library; + if (inline && (INLINE_LIBRARY_FUNCS || !nonInlined)) { return inline.apply(null, args); // Warning: inlining does not prevent recalculation of the arguments. They should be simple identifiers } |