Drop unused DECLARE opcode

This commit is contained in:
kpdecker
2014-08-14 12:27:02 -05:00
parent 4d0e3c98eb
commit 3cea85b2b0
2 changed files with 1 additions and 9 deletions
-4
View File
@@ -336,10 +336,6 @@ Compiler.prototype = {
this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) });
},
declare: function(name, value) {
this.opcodes.push({ opcode: 'DECLARE', name: name, value: value });
},
addDepth: function(depth) {
if(depth === 0) { return; }
@@ -84,11 +84,7 @@ JavaScriptCompiler.prototype = {
for (i = 0, l = opcodes.length; i < l; i++) {
opcode = opcodes[i];
if(opcode.opcode === 'DECLARE') {
this[opcode.name] = opcode.value;
} else {
this[opcode.opcode].apply(this, opcode.args);
}
this[opcode.opcode].apply(this, opcode.args);
// Reset the stripNext flag if it was not set by this operation.
if (opcode.opcode !== this.stripNext) {