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

Unified Diff: pkg/compiler/lib/src/kernel/kernel.dart

Issue 2439573003: Experiment with new function-type syntax.
Patch Set: Change a few more typedefs. Created 4 years, 2 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: pkg/compiler/lib/src/kernel/kernel.dart
diff --git a/pkg/compiler/lib/src/kernel/kernel.dart b/pkg/compiler/lib/src/kernel/kernel.dart
index 35ff9ea49490cf6ea642f34166ab4706265ddc42..557d35acf397a23ab9ae137a76b83874188ff9fd 100644
--- a/pkg/compiler/lib/src/kernel/kernel.dart
+++ b/pkg/compiler/lib/src/kernel/kernel.dart
@@ -33,11 +33,9 @@ import '../elements/modelx.dart' show ErroneousFieldElementX;
import '../tree/tree.dart' show FunctionExpression, Node;
import 'kernel_visitor.dart' show IrFunction, KernelVisitor;
-typedef void WorkAction();
-
class WorkItem {
final Element element;
- final WorkAction action;
+ final () -> void action;
WorkItem(this.element, this.action);
}
@@ -78,7 +76,7 @@ class Kernel {
Kernel(this.compiler);
- void addWork(Element element, WorkAction action) {
+ void addWork(Element element, () -> void action) {
workQueue.addLast(new WorkItem(element, action));
}

Powered by Google App Engine
This is Rietveld 408576698