From 84a70230b859624e55631615a2e1420aa1164148 Mon Sep 17 00:00:00 2001 From: Jason Bedard Date: Sun, 16 Oct 2016 17:51:19 -0700 Subject: [PATCH] refactor($parse): remove unused expression arguments - these are no longer required after the removal of the expression sandbox errors --- src/ng/parse.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/ng/parse.js b/src/ng/parse.js index 3e2661e16f6d..ce38d5a54403 100644 --- a/src/ng/parse.js +++ b/src/ng/parse.js @@ -819,13 +819,11 @@ ASTCompiler.prototype = { 'getStringValue', 'ifDefined', 'plus', - 'text', fnString))( this.$filter, getStringValue, ifDefined, - plusFn, - expression); + plusFn); this.state = this.stage = undefined; fn.literal = isLiteral(ast); fn.constant = isConstant(ast); @@ -1240,7 +1238,6 @@ ASTInterpreter.prototype = { compile: function(expression) { var self = this; var ast = this.astBuilder.ast(expression); - this.expression = expression; findConstantAndWatchExpressions(ast, self.$filter); var assignable; var assign; @@ -1311,8 +1308,7 @@ ASTInterpreter.prototype = { context ); case AST.Identifier: - return self.identifier(ast.name, - context, create, self.expression); + return self.identifier(ast.name, context, create); case AST.MemberExpression: left = this.recurse(ast.object, false, !!create); if (!ast.computed) { @@ -1320,8 +1316,8 @@ ASTInterpreter.prototype = { } if (ast.computed) right = this.recurse(ast.property); return ast.computed ? - this.computedMember(left, right, context, create, self.expression) : - this.nonComputedMember(left, right, context, create, self.expression); + this.computedMember(left, right, context, create) : + this.nonComputedMember(left, right, context, create); case AST.CallExpression: args = []; forEach(ast.arguments, function(expr) { @@ -1547,7 +1543,7 @@ ASTInterpreter.prototype = { value: function(value, context) { return function() { return context ? {context: undefined, name: undefined, value: value} : value; }; }, - identifier: function(name, context, create, expression) { + identifier: function(name, context, create) { return function(scope, locals, assign, inputs) { var base = locals && (name in locals) ? locals : scope; if (create && create !== 1 && base && base[name] == null) { @@ -1561,7 +1557,7 @@ ASTInterpreter.prototype = { } }; }, - computedMember: function(left, right, context, create, expression) { + computedMember: function(left, right, context, create) { return function(scope, locals, assign, inputs) { var lhs = left(scope, locals, assign, inputs); var rhs; @@ -1583,7 +1579,7 @@ ASTInterpreter.prototype = { } }; }, - nonComputedMember: function(left, right, context, create, expression) { + nonComputedMember: function(left, right, context, create) { return function(scope, locals, assign, inputs) { var lhs = left(scope, locals, assign, inputs); if (create && create !== 1) {