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

Unified Diff: pkg/compiler/lib/src/common/tasks.dart

Issue 2959163002: Make Zone API strong mode clean. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | sdk/lib/async/future.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/tasks.dart
diff --git a/pkg/compiler/lib/src/common/tasks.dart b/pkg/compiler/lib/src/common/tasks.dart
index c9ecaca6e6eaaa0b40403ac14352da3149d250a8..79fc988088906446b2624a6fbd8a535d06509039 100644
--- a/pkg/compiler/lib/src/common/tasks.dart
+++ b/pkg/compiler/lib/src/common/tasks.dart
@@ -115,7 +115,7 @@ abstract class CompilerTask {
/// of other measuring zones, but we still need to call through the parent
/// chain. Consequently, we use a zone value keyed by [measurer] to see if
/// we should measure or not when delegating.
- _run(Zone self, ZoneDelegate parent, Zone zone, f()) {
+ R _run<R>(Zone self, ZoneDelegate parent, Zone zone, R f()) {
if (zone[measurer] != this) return parent.run(zone, f);
CompilerTask previous = _start();
try {
@@ -126,7 +126,8 @@ abstract class CompilerTask {
}
/// Same as [run] except that [f] takes one argument, [arg].
- _runUnary(Zone self, ZoneDelegate parent, Zone zone, f(arg), arg) {
+ R _runUnary<R, T>(
+ Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg) {
if (zone[measurer] != this) return parent.runUnary(zone, f, arg);
CompilerTask previous = _start();
try {
@@ -137,7 +138,8 @@ abstract class CompilerTask {
}
/// Same as [run] except that [f] takes two arguments ([a1] and [a2]).
- _runBinary(Zone self, ZoneDelegate parent, Zone zone, f(a1, a2), a1, a2) {
+ R _runBinary<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone,
+ R f(T1 a1, T2 a2), T1 a1, T2 a2) {
if (zone[measurer] != this) return parent.runBinary(zone, f, a1, a2);
CompilerTask previous = _start();
try {
« no previous file with comments | « no previous file | sdk/lib/async/future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698