summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index c7d2dbb..0dea5bb 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -210,21 +210,17 @@ Handlebars.JavaScriptCompiler = function() {};
simpleMustache: function(mustache, program, inverse) {
var id = mustache.id;
- if (id.type === 'ID') {
- this.addDepth(id.depth);
- this.opcode('getContext', id.depth);
- }
-
if (id.type === 'DATA') {
this.DATA(id);
} else if (id.parts.length) {
- this.opcode('lookupOnContext', id.parts[0]);
- for(var i=1, l=id.parts.length; i<l; i++) {
- this.opcode('lookup', id.parts[i]);
- }
+ this.ID(id);
} else {
+ // Simplified ID for `this`
+ this.addDepth(id.depth);
+ this.opcode('getContext', id.depth);
this.opcode('pushContext');
}
+
this.opcode('resolvePossibleLambda');
},