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

Unified Diff: third_party/pkg/angular/lib/change_detection/ast.dart

Issue 256553002: Revert "Update all Angular libs (run update_all.sh)." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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/change_detection/ast.dart
diff --git a/third_party/pkg/angular/lib/change_detection/ast.dart b/third_party/pkg/angular/lib/change_detection/ast.dart
index 6a12a3a6ee4ddc53a349f65bd84060e53ece745f..66c55fba3c05bfdd627096c16cd5912a7506a37b 100644
--- a/third_party/pkg/angular/lib/change_detection/ast.dart
+++ b/third_party/pkg/angular/lib/change_detection/ast.dart
@@ -79,32 +79,12 @@ class PureFunctionAST extends AST {
final List<AST> argsAST;
PureFunctionAST(name, this.fn, argsAST)
- : argsAST = argsAST,
- name = name,
- super('$name(${_argList(argsAST)})');
-
- WatchRecord<_Handler> setupWatch(WatchGroup watchGroup) =>
- watchGroup.addFunctionWatch(fn, argsAST, const {}, expression, true);
-}
-
-/**
- * SYNTAX: fn(arg0, arg1, ...)
- *
- * Invoke a pure function. Pure means that the function has no state, and
- * therefore it needs to be re-computed only if its args change.
- */
-class ClosureAST extends AST {
- final String name;
- final /* dartbug.com/16401 Function */ fn;
- final List<AST> argsAST;
-
- ClosureAST(name, this.fn, argsAST)
- : argsAST = argsAST,
- name = name,
- super('$name(${_argList(argsAST)})');
+ : super('$name(${_argList(argsAST)})'),
+ argsAST = argsAST,
+ name = name;
WatchRecord<_Handler> setupWatch(WatchGroup watchGroup) =>
- watchGroup.addFunctionWatch(fn, argsAST, const {}, expression, false);
+ watchGroup.addFunctionWatch(fn, argsAST, expression);
}
/**
@@ -116,16 +96,15 @@ class MethodAST extends AST {
final AST lhsAST;
final String name;
final List<AST> argsAST;
- final Map<Symbol, AST> namedArgsAST;
- MethodAST(lhsAST, name, argsAST, [this.namedArgsAST = const {}])
- : lhsAST = lhsAST,
+ MethodAST(lhsAST, name, argsAST)
+ : super('$lhsAST.$name(${_argList(argsAST)})'),
+ lhsAST = lhsAST,
name = name,
- argsAST = argsAST,
- super('$lhsAST.$name(${_argList(argsAST)})');
+ argsAST = argsAST;
WatchRecord<_Handler> setupWatch(WatchGroup watchGroup) =>
- watchGroup.addMethodWatch(lhsAST, name, argsAST, namedArgsAST, expression);
+ watchGroup.addMethodWatch(lhsAST, name, argsAST, expression);
}
@@ -144,8 +123,8 @@ String _argList(List<AST> items) => items.join(', ');
/**
* The name is a bit oxymoron, but it is essentially the NullObject pattern.
*
- * This allows children to set a handler on this Record and then let it write
- * the initial constant value to the forwarding Record.
+ * This allows children to set a handler on this ChangeRecord and then let it write the initial
+ * constant value to the forwarding ChangeRecord.
*/
class _ConstantWatchRecord extends WatchRecord<_Handler> {
final currentValue;
@@ -155,7 +134,7 @@ class _ConstantWatchRecord extends WatchRecord<_Handler> {
: currentValue = currentValue,
handler = new _ConstantHandler(watchGroup, expression, currentValue);
- bool check() => false;
+ ChangeRecord<_Handler> check() => null;
void remove() => null;
get field => null;
« no previous file with comments | « third_party/pkg/angular/lib/bootstrap.dart ('k') | third_party/pkg/angular/lib/change_detection/change_detection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698