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

Issue 2665723002: Implement canonical name scheme in kernel. (Closed)

Created:
3 years, 10 months ago by asgerf
Modified:
3 years, 10 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Siggi Cherem (dart-lang)
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Implement canonical name scheme in kernel. This adds a class CanonicalName that can represent a library, class, or member. All references now go through a Reference object, which is linked to both the AST node and its CanonicalName, so either can be created first. dartk now accepts multiple input files: - If multiple dart files are given, they are all compiled. - If multiple binaries are given, they are linked together. Mixed dart and binary input is not supported by dartk. dartk now has a flag --include-sdk which includes the entire SDK in the output. This is so the SDK can be compiled alone and then linked. Example of compiling separately and then linking: dartk foo.dart -o foo.dill dartk main.dart -o main.dill dartk --include-sdk -o sdk.dill dartk main.dill foo.dill sdk.dill --target=vm --link -o program.dill dartk still has incredibly slow cold start due to the analyzer loading the dart sdk, so this does not actually speed things up at the moment. BUG= R=ahe@google.com, kmillikin@google.com, kustermann@google.com, sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/8bfc4b47c0ae5b506e52da7c7cf64499025c693f

Patch Set 1 #

Total comments: 54

Patch Set 2 : Address comments #

Total comments: 22

Patch Set 3 : Address more comments #

Total comments: 14

Patch Set 4 : Third round of comments #

Patch Set 5 : Merge with master #

Patch Set 6 : Add a box around LinkedNode to simplify API and support fasta #

Patch Set 7 : Remove unintended change in fasta #

Total comments: 12

Patch Set 8 : Address Kevin's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1811 lines, -1235 lines) Patch
M pkg/front_end/.analysis_options View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M pkg/front_end/lib/kernel_generator.dart View 1 2 3 4 5 6 7 5 chunks +11 lines, -12 lines 0 comments Download
M pkg/front_end/lib/src/fasta/compile_platform.dart View 1 2 3 4 3 chunks +3 lines, -9 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/kernel_target.dart View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M pkg/front_end/lib/src/fasta/testing/kernel_chain.dart View 1 2 3 4 5 6 7 7 chunks +8 lines, -13 lines 0 comments Download
M pkg/front_end/lib/src/fasta/testing/suite.dart View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M pkg/front_end/lib/src/incremental_kernel_generator_impl.dart View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M pkg/front_end/test/fasta/compile.status View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M pkg/kernel/bin/dartk.dart View 1 2 3 4 5 6 7 6 chunks +70 lines, -47 lines 0 comments Download
M pkg/kernel/binary.md View 1 2 3 4 5 6 7 6 chunks +35 lines, -70 lines 0 comments Download
M pkg/kernel/lib/analyzer/ast_from_analyzer.dart View 1 2 3 4 5 6 7 2 chunks +5 lines, -4 lines 0 comments Download
M pkg/kernel/lib/analyzer/loader.dart View 1 2 3 4 5 6 7 13 chunks +39 lines, -25 lines 0 comments Download
M pkg/kernel/lib/ast.dart View 1 2 3 4 5 6 7 46 chunks +418 lines, -153 lines 0 comments Download
M pkg/kernel/lib/binary/ast_from_binary.dart View 1 2 3 4 5 6 7 15 chunks +315 lines, -214 lines 0 comments Download
M pkg/kernel/lib/binary/ast_to_binary.dart View 1 2 3 4 5 6 7 21 chunks +111 lines, -127 lines 0 comments Download
D pkg/kernel/lib/binary/loader.dart View 1 chunk +0 lines, -116 lines 0 comments Download
M pkg/kernel/lib/binary/tag.dart View 1 2 3 4 2 chunks +3 lines, -10 lines 0 comments Download
A pkg/kernel/lib/canonical_name.dart View 1 2 3 4 5 6 7 1 chunk +149 lines, -0 lines 0 comments Download
M pkg/kernel/lib/clone.dart View 1 2 3 4 5 6 7 1 chunk +24 lines, -20 lines 0 comments Download
M pkg/kernel/lib/frontend/accessors.dart View 1 2 3 4 5 6 7 1 chunk +5 lines, -4 lines 0 comments Download
M pkg/kernel/lib/kernel.dart View 1 2 3 4 1 chunk +5 lines, -6 lines 0 comments Download
M pkg/kernel/lib/repository.dart View 1 2 1 chunk +0 lines, -27 lines 0 comments Download
M pkg/kernel/lib/target/targets.dart View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M pkg/kernel/lib/text/ast_to_text.dart View 1 2 3 4 1 chunk +6 lines, -2 lines 0 comments Download
M pkg/kernel/lib/transformations/closure/mock.dart View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/kernel/lib/transformations/continuation.dart View 1 2 3 4 5 6 7 4 chunks +6 lines, -7 lines 0 comments Download
M pkg/kernel/lib/transformations/empty.dart View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M pkg/kernel/lib/transformations/insert_covariance_checks.dart View 4 chunks +5 lines, -7 lines 0 comments Download
M pkg/kernel/lib/transformations/mixin_full_resolution.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M pkg/kernel/lib/transformations/treeshaker.dart View 1 2 3 4 5 3 chunks +12 lines, -10 lines 0 comments Download
M pkg/kernel/lib/type_propagation/type_propagation.dart View 1 2 3 4 5 6 7 2 chunks +9 lines, -3 lines 0 comments Download
M pkg/kernel/lib/verifier.dart View 1 2 3 4 5 6 7 10 chunks +33 lines, -16 lines 0 comments Download
A pkg/kernel/test/ast_membench.sh View 1 1 chunk +18 lines, -0 lines 0 comments Download
M pkg/kernel/test/baseline_tester.dart View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M pkg/kernel/test/closures/kernel_chain.dart View 1 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M pkg/kernel/test/closures/suite.dart View 1 2 3 4 5 6 7 3 chunks +3 lines, -4 lines 0 comments Download
M pkg/kernel/test/frontend_bench.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/kernel/test/round_trip.dart View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M pkg/kernel/test/self_check_util.dart View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M pkg/kernel/test/type_parser.dart View 1 2 3 4 5 1 chunk +8 lines, -2 lines 0 comments Download
M pkg/kernel/test/verify_test.dart View 1 2 3 4 5 3 chunks +179 lines, -144 lines 0 comments Download
M runtime/vm/kernel.h View 1 2 3 4 23 chunks +109 lines, -39 lines 0 comments Download
M runtime/vm/kernel.cc View 1 2 3 4 2 chunks +75 lines, -0 lines 0 comments Download
M runtime/vm/kernel_binary.cc View 1 2 3 4 37 chunks +113 lines, -120 lines 0 comments Download
M utils/kernel-service/kernel-service.dart View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 31 (13 generated)
asgerf
Note that I will not land this until fasta has already landed. I will then ...
3 years, 10 months ago (2017-01-30 17:00:06 UTC) #9
ahe
Siggi should be able to help find a reviewer of the changes to rasta.
3 years, 10 months ago (2017-01-30 17:06:59 UTC) #10
ahe
I took a quick look at the changes to ast.dart, and this looks pretty neat. ...
3 years, 10 months ago (2017-01-30 17:16:16 UTC) #11
Siggi Cherem (dart-lang)
rasta change lgtm
3 years, 10 months ago (2017-01-30 20:31:06 UTC) #13
kustermann
Looks pretty nice. First comments from me. https://codereview.chromium.org/2665723002/diff/1/pkg/kernel/lib/ast.dart File pkg/kernel/lib/ast.dart (right): https://codereview.chromium.org/2665723002/diff/1/pkg/kernel/lib/ast.dart#newcode139 pkg/kernel/lib/ast.dart:139: } Do ...
3 years, 10 months ago (2017-02-01 13:00:55 UTC) #14
asgerf
Thanks for the reviews so far https://codereview.chromium.org/2665723002/diff/1/pkg/kernel/lib/ast.dart File pkg/kernel/lib/ast.dart (right): https://codereview.chromium.org/2665723002/diff/1/pkg/kernel/lib/ast.dart#newcode139 pkg/kernel/lib/ast.dart:139: } On 2017/02/01 ...
3 years, 10 months ago (2017-02-02 12:30:28 UTC) #15
ahe
I haven't reviewed the C++ code, and I still haven't reviewed pkg/kernel/lib/binary/ast_from_binary.dart. Expect thumbs up ...
3 years, 10 months ago (2017-02-02 16:24:02 UTC) #16
asgerf
https://codereview.chromium.org/2665723002/diff/20001/pkg/kernel/bin/dartk.dart File pkg/kernel/bin/dartk.dart (right): https://codereview.chromium.org/2665723002/diff/20001/pkg/kernel/bin/dartk.dart#newcode344 pkg/kernel/bin/dartk.dart:344: Uri fileUri = new Uri(scheme: 'file', path: file); On ...
3 years, 10 months ago (2017-02-03 10:31:16 UTC) #18
kustermann
LGTM One more comment: Since not everybody will be that familiar with the invariants of ...
3 years, 10 months ago (2017-02-03 11:48:20 UTC) #19
kustermann
https://codereview.chromium.org/2665723002/diff/40001/runtime/vm/kernel.h File runtime/vm/kernel.h (right): https://codereview.chromium.org/2665723002/diff/40001/runtime/vm/kernel.h#newcode399 runtime/vm/kernel.h:399: }; like with other classes, you should probably add ...
3 years, 10 months ago (2017-02-03 11:50:58 UTC) #20
asgerf
Thanks for the reviews https://codereview.chromium.org/2665723002/diff/1/pkg/kernel/lib/canonical_name.dart File pkg/kernel/lib/canonical_name.dart (right): https://codereview.chromium.org/2665723002/diff/1/pkg/kernel/lib/canonical_name.dart#newcode20 pkg/kernel/lib/canonical_name.dart:20: /// URI of enclosing library ...
3 years, 10 months ago (2017-02-03 12:47:38 UTC) #21
asgerf
BTW about the documentation comment: I agree that the documentation should be more clear about ...
3 years, 10 months ago (2017-02-03 13:05:04 UTC) #22
asgerf
Unfortunately this CL will have to sit for another week, as I am on vacation ...
3 years, 10 months ago (2017-02-03 15:35:37 UTC) #23
ahe
lgtm https://codereview.chromium.org/2665723002/diff/1/pkg/kernel/lib/binary/ast_from_binary.dart File pkg/kernel/lib/binary/ast_from_binary.dart (right): https://codereview.chromium.org/2665723002/diff/1/pkg/kernel/lib/binary/ast_from_binary.dart#newcode174 pkg/kernel/lib/binary/ast_from_binary.dart:174: /// implementation, the order is corrected. I suggest ...
3 years, 10 months ago (2017-02-13 10:07:08 UTC) #24
asgerf
Someone PTAL. I had to change the API to get it working in fasta. AST ...
3 years, 10 months ago (2017-02-16 14:22:42 UTC) #26
Kevin Millikin (Google)
LGTM though I found LinkedNode and LinkedNodeBox too generic. https://codereview.chromium.org/2665723002/diff/120001/pkg/kernel/binary.md File pkg/kernel/binary.md (right): https://codereview.chromium.org/2665723002/diff/120001/pkg/kernel/binary.md#newcode109 pkg/kernel/binary.md:109: ...
3 years, 10 months ago (2017-02-22 09:09:30 UTC) #27
asgerf
https://codereview.chromium.org/2665723002/diff/120001/pkg/kernel/binary.md File pkg/kernel/binary.md (right): https://codereview.chromium.org/2665723002/diff/120001/pkg/kernel/binary.md#newcode109 pkg/kernel/binary.md:109: CanonicalNameReference mainMethod; On 2017/02/22 09:09:30, Kevin Millikin (Google) wrote: ...
3 years, 10 months ago (2017-02-22 10:06:54 UTC) #28
asgerf
3 years, 10 months ago (2017-02-23 13:12:19 UTC) #31
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as
8bfc4b47c0ae5b506e52da7c7cf64499025c693f (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698