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

Side by Side Diff: pkg/compiler/lib/src/common/tasks.dart

Issue 2154583002: dart2js: get:hashCode methods to avoid Object.hashCode (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: xxx Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/constants/expressions.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.common.tasks; 5 library dart2js.common.tasks;
6 6
7 import 'dart:async' 7 import 'dart:async'
8 show Future, Zone, ZoneDelegate, ZoneSpecification, runZoned; 8 show Future, Zone, ZoneDelegate, ZoneSpecification, runZoned;
9 9
10 /// Used to measure where time is spent in the compiler. 10 /// Used to measure where time is spent in the compiler.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 /// Note: MUST be the first field of this class to ensure [wallclock] is 204 /// Note: MUST be the first field of this class to ensure [wallclock] is
205 /// started before other computations. 205 /// started before other computations.
206 final Stopwatch wallClock = new Stopwatch()..start(); 206 final Stopwatch wallClock = new Stopwatch()..start();
207 207
208 /// Measures gaps between zoned closures due to asynchronicity. 208 /// Measures gaps between zoned closures due to asynchronicity.
209 final Stopwatch asyncWallClock = new Stopwatch(); 209 final Stopwatch asyncWallClock = new Stopwatch();
210 210
211 /// Whether measurement of tasks is enabled. 211 /// Whether measurement of tasks is enabled.
212 final bool enableTaskMeasurements; 212 final bool enableTaskMeasurements;
213 213
214 static int _hashCodeGenerator = 197;
215 final int hashCode = _hashCodeGenerator++;
216
214 Measurer({this.enableTaskMeasurements: false}); 217 Measurer({this.enableTaskMeasurements: false});
215 218
216 /// The currently running task, that is, the task whose [Stopwatch] is 219 /// The currently running task, that is, the task whose [Stopwatch] is
217 /// currently running. 220 /// currently running.
218 CompilerTask currentTask; 221 CompilerTask currentTask;
219 222
220 /// The current task which should be charged for asynchronous gaps. 223 /// The current task which should be charged for asynchronous gaps.
221 CompilerTask currentAsyncTask; 224 CompilerTask currentAsyncTask;
222 225
223 /// Start counting the total elapsed time since the compiler started. 226 /// Start counting the total elapsed time since the compiler started.
(...skipping 16 matching lines...) Expand all
240 } 243 }
241 244
242 /// Call this when the eventloop returns control to us. 245 /// Call this when the eventloop returns control to us.
243 void stopAsyncWallClock() { 246 void stopAsyncWallClock() {
244 if (currentAsyncTask != null) { 247 if (currentAsyncTask != null) {
245 currentAsyncTask._watch.stop(); 248 currentAsyncTask._watch.stop();
246 } 249 }
247 asyncWallClock.stop(); 250 asyncWallClock.stop();
248 } 251 }
249 } 252 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/constants/expressions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698