option to not inline library functions

This commit is contained in:
Alon Zakai 2011-10-16 12:17:46 -07:00
Родитель 1a6c5d091c
Коммит 5d3a70a0fe
2 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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
}

Просмотреть файл

@ -53,6 +53,7 @@ SKIP_STACK_IN_SMALL = 1; // When enabled, does not push/pop the stack at all in
// may allocate stack later, and in a loop, this can be
// very bad. In particular, when debugging, printf()ing
// a lot can exhaust the stack very fast, with this option.
INLINE_LIBRARY_FUNCS = 1; // Will inline library functions that have __inline defined
// Generated code debugging options
SAFE_HEAP = 0; // Check each write to the heap against a list of blocked addresses