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

Issue 1322333003: DDC: mostly incremental compilation, fixes #223 (Closed)

Created:
5 years, 3 months ago by Jennifer Messerly
Modified:
4 years, 11 months ago
Reviewers:
Leaf, vsm
CC:
dev-compiler+reviews_dartlang.org
Base URL:
git@github.com:dart-lang/dev_compiler.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

DDC: mostly incremental compilation, fixes #223 if the output file is out of date, we recompile, otherwise we skip as much work as possible Further details: Multitest support (Dart language tests) also was updated to avoid overwriting with identical data. For the same reason, codegen_test no longer deletes old output automatically. If nothing changed, ./tool/build_sdk.dart and ./test/codengen_test.dart should be almost instantaneous. If any of the compiler sources changed, a full rebuild is necessary. Right now it tries to detect this automatically, but it's a bit flaky because finding our own sources isn't reliable (e.g. test runner starts us using a data: URL, so Platform.script is useless). Maybe we should just try and have all output in one place, so you can rm -rf to clean it? Definitely give this a look over ... there's always the possibility with this kind of change of introducing bugs due to stale output.

Patch Set 1 #

Patch Set 2 : remove empty message files #

Patch Set 3 : rebase #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+585 lines, -1415 lines) Patch
A lib/runtime/dart/_interceptors.txt View 1 chunk +34 lines, -0 lines 0 comments Download
A lib/runtime/dart/_internal.txt View 1 chunk +16 lines, -0 lines 0 comments Download
A lib/runtime/dart/_isolate_helper.txt View 1 chunk +3 lines, -0 lines 0 comments Download
A lib/runtime/dart/_js_helper.txt View 1 chunk +6 lines, -0 lines 0 comments Download
A lib/runtime/dart/_native_typed_data.txt View 1 chunk +6 lines, -0 lines 0 comments Download
A lib/runtime/dart/async.txt View 1 chunk +77 lines, -0 lines 0 comments Download
A lib/runtime/dart/collection.txt View 1 chunk +94 lines, -0 lines 0 comments Download
A lib/runtime/dart/convert.txt View 1 chunk +14 lines, -0 lines 0 comments Download
A lib/runtime/dart/core.txt View 1 chunk +15 lines, -0 lines 0 comments Download
A lib/runtime/dart/js.txt View 1 chunk +4 lines, -0 lines 0 comments Download
A lib/runtime/dart/math.txt View 1 chunk +35 lines, -0 lines 0 comments Download
M lib/src/compiler.dart View 11 chunks +148 lines, -82 lines 1 comment Download
M lib/src/options.dart View 1 2 6 chunks +32 lines, -6 lines 1 comment Download
M lib/src/report.dart View 4 chunks +45 lines, -18 lines 0 comments Download
D test/codegen/expect/8invalid-chars.in+file_name.txt View 1 chunk +0 lines, -1 line 0 comments Download
M test/codegen/expect/BenchmarkBase.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M test/codegen/expect/DeltaBlue.txt View 1 1 chunk +0 lines, -6 lines 0 comments Download
M test/codegen/expect/async_helper.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M test/codegen/expect/cascade.txt View 1 1 chunk +0 lines, -7 lines 0 comments Download
M test/codegen/expect/closure.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M test/codegen/expect/constructors.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
D test/codegen/expect/covariance.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
D test/codegen/expect/domtest.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M test/codegen/expect/expect.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
M test/codegen/expect/fieldtest.txt View 1 1 chunk +0 lines, -5 lines 0 comments Download
D test/codegen/expect/functions.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
D test/codegen/expect/html_input.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M test/codegen/expect/js_test.txt View 1 chunk +16 lines, -684 lines 0 comments Download
D test/codegen/expect/map_keys.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M test/codegen/expect/methods.txt View 1 1 chunk +0 lines, -5 lines 0 comments Download
M test/codegen/expect/misc.txt View 1 1 chunk +0 lines, -4 lines 0 comments Download
D test/codegen/expect/names.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M test/codegen/expect/opassign.txt View 1 1 chunk +0 lines, -8 lines 0 comments Download
D test/codegen/expect/script.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M test/codegen/expect/sunflower/sunflower.txt View 1 1 chunk +0 lines, -2 lines 0 comments Download
M test/codegen/expect/syncstar_syntax.txt View 1 1 chunk +0 lines, -8 lines 0 comments Download
D test/codegen/expect/temps.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
D test/codegen/expect/try_catch.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M test/codegen/expect/unittest.txt View 1 1 chunk +0 lines, -198 lines 0 comments Download
M test/codegen/js_test.dart View 1 chunk +2 lines, -3 lines 0 comments Download
M test/codegen_test.dart View 1 2 6 chunks +23 lines, -44 lines 0 comments Download
M test/end_to_end_test.dart View 1 chunk +7 lines, -2 lines 0 comments Download
M tool/build_sdk.sh View 1 chunk +3 lines, -4 lines 0 comments Download
M tool/patch_sdk.dart View 3 chunks +5 lines, -1 line 0 comments Download
D tool/sdk_expected_errors.txt View 1 chunk +0 lines, -304 lines 0 comments Download

Messages

Total messages: 6 (1 generated)
Jennifer Messerly
5 years, 3 months ago (2015-09-03 20:34:04 UTC) #2
Jennifer Messerly
btw, appreciate high level feedback on how we can structure this better. Feels like _compileLibrary ...
5 years, 3 months ago (2015-09-03 20:45:41 UTC) #3
Jennifer Messerly
On 2015/09/03 20:45:41, John Messerly wrote: > btw, appreciate high level feedback on how we ...
5 years, 3 months ago (2015-09-03 20:46:24 UTC) #4
Leaf
https://codereview.chromium.org/1322333003/diff/40001/lib/src/compiler.dart File lib/src/compiler.dart (right): https://codereview.chromium.org/1322333003/diff/40001/lib/src/compiler.dart#newcode138 lib/src/compiler.dart:138: if (!_compiled.add(source.uri)) return false; I'm worried about this doing ...
5 years, 3 months ago (2015-09-04 21:46:31 UTC) #5
Jennifer Messerly
5 years, 3 months ago (2015-09-09 16:15:40 UTC) #6
On 2015/09/04 21:46:31, Leaf wrote:
> https://codereview.chromium.org/1322333003/diff/40001/lib/src/compiler.dart
> File lib/src/compiler.dart (right):
> 
>
https://codereview.chromium.org/1322333003/diff/40001/lib/src/compiler.dart#n...
> lib/src/compiler.dart:138: if (!_compiled.add(source.uri)) return false;
> I'm worried about this doing the right thing in the presence of cycles.  If I
> have a cycle of libraries A and B, and I modify A, then I think this code does
> the following:
> 
> 1) Adds A to _compiled
> 2) Tries to compile B
> 3) Adds B to _compiled
> 4) Tries to compile A
> 5) Notices that A is in _compiled, so returns false for changed,
> 6) Does a time stamp check on B, sees that it hasn't itself changed, so
doesn't
> recompile it
> 7) Recompiles A based on timestamps
> 
> Am I missing something?
> 
> https://codereview.chromium.org/1322333003/diff/40001/lib/src/options.dart
> File lib/src/options.dart (right):
> 
>
https://codereview.chromium.org/1322333003/diff/40001/lib/src/options.dart#ne...
> lib/src/options.dart:383: /// compiler itself changes.
> At some point, we should probably include a version string in the generated
code
> so that we could invalidate even if we can't find the compiler sources.  Maybe
a
> TODO?

fyi, Leaf and I discussed this last week ... it's going to need some rework to
support library cycles.

Going to take a break from this for now, & come back to it when lang tests are
further along.

Powered by Google App Engine
This is Rietveld 408576698