Optimize compiler opcode call
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import Exception from "../exception";
|
||||
import {isArray} from "../utils";
|
||||
|
||||
var slice = [].slice;
|
||||
|
||||
export function Compiler() {}
|
||||
|
||||
// the foundHelper register will disambiguate helper lookup from finding a
|
||||
@@ -292,7 +294,7 @@ Compiler.prototype = {
|
||||
|
||||
// HELPERS
|
||||
opcode: function(name) {
|
||||
this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) });
|
||||
this.opcodes.push({ opcode: name, args: slice.call(arguments, 1) });
|
||||
},
|
||||
|
||||
addDepth: function(depth) {
|
||||
|
||||
Reference in New Issue
Block a user