Skip to content

Commit b361d8c

Browse files
committed
Support compilation of Hello World
BUG= [email protected] Review URL: https://codereview.chromium.org/1927963002 .
1 parent c9397d0 commit b361d8c

24 files changed

+440
-371
lines changed

pkg/compiler/lib/src/apiimpl.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,7 @@ class CompilerImpl extends Compiler {
258258
Duration duration = task.duration;
259259
if (duration != Duration.ZERO) {
260260
cumulatedDuration += duration;
261-
timings.writeln(
262-
' $running${task.name} took'
261+
timings.writeln(' $running${task.name} took'
263262
' ${duration.inMilliseconds}msec');
264263
for (String subtask in task.subtasks) {
265264
int subtime = task.getSubtaskTime(subtask);
@@ -271,10 +270,9 @@ class CompilerImpl extends Compiler {
271270
}
272271
Duration unaccountedDuration =
273272
totalDuration - cumulatedDuration - setupDuration - asyncDuration;
274-
double percent = unaccountedDuration.inMilliseconds * 100
275-
/ totalDuration.inMilliseconds;
276-
timings.write(
277-
' Total compile-time ${totalDuration.inMilliseconds}msec;'
273+
double percent =
274+
unaccountedDuration.inMilliseconds * 100 / totalDuration.inMilliseconds;
275+
timings.write(' Total compile-time ${totalDuration.inMilliseconds}msec;'
278276
' setup ${setupDuration.inMilliseconds}msec;'
279277
' async ${asyncDuration.inMilliseconds}msec;'
280278
' unaccounted ${unaccountedDuration.inMilliseconds}msec'

pkg/compiler/lib/src/common/tasks.dart

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44

55
library dart2js.common.tasks;
66

7-
import 'dart:async' show
8-
Future,
9-
Zone,
10-
ZoneDelegate,
11-
ZoneSpecification,
12-
runZoned;
7+
import 'dart:async'
8+
show Future, Zone, ZoneDelegate, ZoneSpecification, runZoned;
139

1410
import '../common.dart';
1511
import '../compiler.dart' show Compiler;
@@ -149,9 +145,8 @@ class CompilerTask {
149145
}
150146
}
151147

152-
return runZoned(
153-
action,
154-
zoneValues: { measurer: this },
148+
return runZoned(action,
149+
zoneValues: {measurer: this},
155150
zoneSpecification: new ZoneSpecification(
156151
run: run, runUnary: runUnary, runBinary: runBinary));
157152
}

0 commit comments

Comments
 (0)