diff options
author | kpdecker <kpdecker@gmail.com> | 2013-01-20 23:58:42 -0600 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2013-01-20 23:58:42 -0600 |
commit | 9ac47df7ddfd477962c6ef7d7ece4cbf7a852e75 (patch) | |
tree | 90b9bde22075729e7dd1c0166c42ad3e3a20adb0 /lib/handlebars/compiler/compiler.js | |
parent | 6210d0b040207d4a9402209e28b7bb3d31c58697 (diff) | |
download | handlebars.js-9ac47df7ddfd477962c6ef7d7ece4cbf7a852e75.zip handlebars.js-9ac47df7ddfd477962c6ef7d7ece4cbf7a852e75.tar.gz handlebars.js-9ac47df7ddfd477962c6ef7d7ece4cbf7a852e75.tar.bz2 |
Make replaceStack always inline
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index a111ae7..8b4d55a 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -677,7 +677,7 @@ Handlebars.JavaScriptCompiler = function() {}; this.replaceStack(function(current) { return "typeof " + current + " === functionType ? " + current + ".apply(depth0) : " + current; - }, true); + }); }, // [lookup] @@ -690,7 +690,7 @@ Handlebars.JavaScriptCompiler = function() {}; lookup: function(name) { this.replaceStack(function(current) { return current + " == null || " + current + " === false ? " + current + " : " + this.nameLookup(current, name, 'context'); - }, true); + }); }, // [lookupData] @@ -810,7 +810,7 @@ Handlebars.JavaScriptCompiler = function() {}; return name + ' ? ' + name + '.call(' + helper.callParams + ") " + ": helperMissing.call(" + helper.helperMissingParams + ")"; - }, true); + }); }, // [invokeKnownHelper] @@ -971,7 +971,7 @@ Handlebars.JavaScriptCompiler = function() {}; } }, - replaceStack: function(callback, allowInline) { + replaceStack: function(callback) { var prefix = '', inline = this.isInline(), stack; @@ -986,7 +986,7 @@ Handlebars.JavaScriptCompiler = function() {}; stack = top.value; } else { // Get or create the current stack name for use by the inline - var name = allowInline && this.stackSlot ? this.topStackName() : this.incrStack(); + var name = this.stackSlot ? this.topStackName() : this.incrStack(); prefix = '(' + this.pushStack(name, true) + ' = ' + top + '),'; stack = this.topStack(); @@ -997,7 +997,7 @@ Handlebars.JavaScriptCompiler = function() {}; var item = callback.call(this, stack); - if (inline && allowInline) { + if (inline) { if (this.inlineStack.length || this.compileStack.length) { this.popStack(); } |