diff --git a/src/ng/parse.js b/src/ng/parse.js index f3386c74e80b..da88b9162378 100644 --- a/src/ng/parse.js +++ b/src/ng/parse.js @@ -784,7 +784,7 @@ ASTCompiler.prototype = { self.state.computing = fnKey; var intoId = self.nextId(); self.recurse(watch, intoId); - self.return(intoId); + self['return'](intoId); self.state.inputs.push(fnKey); watch.watchId = key; }); @@ -871,7 +871,7 @@ ASTCompiler.prototype = { recursionFn = recursionFn || noop; if (!skipWatchIdCheck && isDefined(ast.watchId)) { intoId = intoId || this.nextId(); - this.if('i', + this['if']('i', this.lazyAssign(intoId, this.computedMember('i', ast.watchId)), this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true) ); @@ -884,7 +884,7 @@ ASTCompiler.prototype = { if (pos !== ast.body.length - 1) { self.current().body.push(right, ';'); } else { - self.return(right); + self['return'](right); } }); break; @@ -915,13 +915,13 @@ ASTCompiler.prototype = { case AST.LogicalExpression: intoId = intoId || this.nextId(); self.recurse(ast.left, intoId); - self.if(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId)); + self['if'](ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId)); recursionFn(intoId); break; case AST.ConditionalExpression: intoId = intoId || this.nextId(); self.recurse(ast.test, intoId); - self.if(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId)); + self['if'](intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId)); recursionFn(intoId); break; case AST.Identifier: @@ -932,11 +932,11 @@ ASTCompiler.prototype = { nameId.name = ast.name; } ensureSafeMemberName(ast.name); - self.if(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)), + self['if'](self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)), function() { - self.if(self.stage === 'inputs' || 's', function() { + self['if'](self.stage === 'inputs' || 's', function() { if (create && create !== 1) { - self.if( + self['if']( self.not(self.nonComputedMember('s', ast.name)), self.lazyAssign(self.nonComputedMember('s', ast.name), '{}')); } @@ -953,13 +953,13 @@ ASTCompiler.prototype = { left = nameId && (nameId.context = this.nextId()) || this.nextId(); intoId = intoId || this.nextId(); self.recurse(ast.object, left, undefined, function() { - self.if(self.notNull(left), function() { + self['if'](self.notNull(left), function() { if (ast.computed) { right = self.nextId(); self.recurse(ast.property, right); self.addEnsureSafeMemberName(right); if (create && create !== 1) { - self.if(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}')); + self['if'](self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}')); } expression = self.ensureSafeObject(self.computedMember(left, right)); self.assign(intoId, expression); @@ -970,7 +970,7 @@ ASTCompiler.prototype = { } else { ensureSafeMemberName(ast.property.name); if (create && create !== 1) { - self.if(self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}')); + self['if'](self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}')); } expression = self.nonComputedMember(left, ast.property.name); if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.property.name)) { @@ -1004,7 +1004,7 @@ ASTCompiler.prototype = { left = {}; args = []; self.recurse(ast.callee, right, left, function() { - self.if(self.notNull(right), function() { + self['if'](self.notNull(right), function() { self.addEnsureSafeFunction(right); forEach(ast.arguments, function(expr) { self.recurse(expr, self.nextId(), undefined, function(argument) { @@ -1033,7 +1033,7 @@ ASTCompiler.prototype = { throw $parseMinErr('lval', 'Trying to assing a value to a non l-value'); } this.recurse(ast.left, undefined, left, function() { - self.if(self.notNull(left.context), function() { + self['if'](self.notNull(left.context), function() { self.recurse(ast.right, right); self.addEnsureSafeObject(self.member(left.context, left.name, left.computed)); expression = self.member(left.context, left.name, left.computed) + ast.operator + right;