Strip dead code from javascript compiler
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user