Prune unused code

This commit is contained in:
kpdecker
2014-08-25 22:39:17 -05:00
parent dfca676d63
commit ca1486b960
5 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ function registerDefaultHelpers(instance) {
instance.log(level, context);
});
instance.registerHelper('lookup', function(obj, field, options) {
instance.registerHelper('lookup', function(obj, field) {
return obj && obj[field];
});
}
-2
View File
@@ -37,8 +37,6 @@ var AST = {
this.sexpr = new AST.SexprNode(rawParams, hash);
}
this.sexpr.isRoot = true;
// Support old AST API that stored this info in MustacheNode
this.id = this.sexpr.id;
this.params = this.sexpr.params;
+1 -1
View File
@@ -244,7 +244,7 @@ Compiler.prototype = {
id.falsy = true;
this.ID(id);
this.opcode('invokeHelper', params.length, id.original, id.isSimple, sexpr.isRoot);
this.opcode('invokeHelper', params.length, id.original, id.isSimple);
}
},
@@ -515,7 +515,7 @@ JavaScriptCompiler.prototype = {
// and pushes the helper's return value onto the stack.
//
// If the helper is not found, `helperMissing` is called.
invokeHelper: function(paramSize, name, isSimple, isRoot) {
invokeHelper: function(paramSize, name, isSimple) {
this.aliases.helperMissing = 'helpers.helperMissing';
var nonHelper = this.popStack();
+1 -3
View File
@@ -120,9 +120,7 @@ export function template(templateSpec, env) {
var ret = function(context, options) {
options = options || {};
var helpers,
partials,
data = options.data;
var data = options.data;
ret._setup(options);
if (!options.partial && templateSpec.useData) {