Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1224)

Unified Diff: third_party/pkg/angular/lib/core/parser/eval_calls.dart

Issue 180873006: Update the Angular/DI tests to latest from github. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review feedback Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/lib/core/parser/eval_calls.dart
diff --git a/third_party/pkg/angular/lib/core/parser/eval_calls.dart b/third_party/pkg/angular/lib/core/parser/eval_calls.dart
index efa948bca63d44e1298306aa39a2ca2835c9496d..c7c152a6a966bd14c049994fd6ce5d1e60cfac37 100644
--- a/third_party/pkg/angular/lib/core/parser/eval_calls.dart
+++ b/third_party/pkg/angular/lib/core/parser/eval_calls.dart
@@ -3,58 +3,59 @@ library angular.core.parser.eval_calls;
import 'dart:mirrors';
import 'package:angular/core/parser/syntax.dart' as syntax;
import 'package:angular/core/parser/utils.dart';
+import 'package:angular/core/module.dart';
class CallScope extends syntax.CallScope with CallReflective {
final Symbol symbol;
CallScope(name, arguments)
: super(name, arguments)
- , symbol = new Symbol(name);
- eval(scope) => _eval(scope, scope);
+ , symbol = newSymbol(name);
+ eval(scope, [FilterMap filters]) => _eval(scope, scope);
}
class CallMember extends syntax.CallMember with CallReflective {
final Symbol symbol;
CallMember(object, name, arguments)
: super(object, name, arguments)
- , symbol = new Symbol(name);
- eval(scope) => _eval(scope, object.eval(scope));
+ , symbol = newSymbol(name);
+ eval(scope, [FilterMap filters]) => _eval(scope, object.eval(scope, filters));
}
class CallScopeFast0 extends syntax.CallScope with CallFast {
final Function function;
CallScopeFast0(name, arguments, this.function) : super(name, arguments);
- eval(scope) => _evaluate0(scope);
+ eval(scope, [FilterMap filters]) => _evaluate0(scope);
}
class CallScopeFast1 extends syntax.CallScope with CallFast {
final Function function;
CallScopeFast1(name, arguments, this.function) : super(name, arguments);
- eval(scope) => _evaluate1(scope, arguments[0].eval(scope));
+ eval(scope, [FilterMap filters]) => _evaluate1(scope, arguments[0].eval(scope, filters));
}
class CallMemberFast0 extends syntax.CallMember with CallFast {
final Function function;
CallMemberFast0(object, name, arguments, this.function)
: super(object, name, arguments);
- eval(scope) => _evaluate0(object.eval(scope));
+ eval(scope, [FilterMap filters]) => _evaluate0(object.eval(scope, filters));
}
class CallMemberFast1 extends syntax.CallMember with CallFast {
final Function function;
CallMemberFast1(object, name, arguments, this.function)
: super(object, name, arguments);
- eval(scope) => _evaluate1(object.eval(scope),
- arguments[0].eval(scope));
+ eval(scope, [FilterMap filters]) => _evaluate1(object.eval(scope, filters),
+ arguments[0].eval(scope, filters));
}
class CallFunction extends syntax.CallFunction {
CallFunction(function, arguments) : super(function, arguments);
- eval(scope) {
- var function = this.function.eval(scope);
+ eval(scope, [FilterMap filters]) {
+ var function = this.function.eval(scope, filters);
if (function is !Function) {
throw new EvalError('${this.function} is not a function');
} else {
- return relaxFnApply(function, evalList(scope, arguments));
+ return relaxFnApply(function, evalList(scope, arguments, filters));
}
}
}
@@ -93,6 +94,9 @@ abstract class CallReflective {
_cachedKind = CACHED_MAP;
_cachedValue = null;
return relaxFnApply(ensureFunctionFromMap(holder, name), arguments);
+ } else if (symbol == null) {
+ _cachedHolder = UNINITIALIZED;
+ throw new EvalError("Undefined function $name");
} else {
InstanceMirror mirror = reflect(holder);
_cachedKind = CACHED_FUNCTION;
« no previous file with comments | « third_party/pkg/angular/lib/core/parser/eval_access.dart ('k') | third_party/pkg/angular/lib/core/parser/lexer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698