summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-08-24 18:16:11 -0500
committerkpdecker <kpdecker@gmail.com>2014-08-24 18:16:11 -0500
commit477a26913a66593c1384e83af866a71347336ce2 (patch)
treef402efb53ccf6d6fdc49dd05eb0c252d04d20c70 /lib/handlebars/compiler/compiler.js
parent4ce474d3e4c0f3a9a9ae1600129a20680ba0df48 (diff)
downloadhandlebars.js-477a26913a66593c1384e83af866a71347336ce2.zip
handlebars.js-477a26913a66593c1384e83af866a71347336ce2.tar.gz
handlebars.js-477a26913a66593c1384e83af866a71347336ce2.tar.bz2
Optimize compiler opcode call
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index 29718d0..673cde3 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -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) {