Strip dead code from javascript compiler

This commit is contained in:
kpdecker
2014-08-15 00:40:07 -05:00
parent cc5de5df3c
commit f2b5519e76
@@ -403,9 +403,6 @@ JavaScriptCompiler.prototype = {
} else {
this.pushStackLiteral('this.data(data, ' + depth + ')');
}
if (!parts) {
return;
}
var len = parts.length;
for (var i = 0; i < len; i++) {
@@ -702,10 +699,6 @@ JavaScriptCompiler.prototype = {
},
programExpression: function(guid) {
if(guid == null) {
return 'this.noop';
}
var child = this.environment.children[guid],
depths = child.depths.list,
useDepths = this.useDepths,
@@ -854,11 +847,11 @@ JavaScriptCompiler.prototype = {
}
},
topStack: function(wrapped) {
topStack: function() {
var stack = (this.isInline() ? this.inlineStack : this.compileStack),
item = stack[stack.length - 1];
if (!wrapped && (item instanceof Literal)) {
if (item instanceof Literal) {
return item.value;
} else {
return item;