refactor($parse): remove unused expression arguments

These are no longer required after the removal of the expression sandbox errors

Closes #15276
This commit is contained in:
Jason Bedard
2016-10-31 02:31:23 -07:00
committed by Martin Staffa
parent e77f717ebf
commit 79d2b9a5a6
+7 -11
View File
@@ -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) {