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

Issue 2706243011: Add LibraryIndex class for finding classes and members by name. (Closed)

Created:
3 years, 10 months ago by asgerf
Modified:
3 years, 10 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add LibraryIndex class for finding classes and members by name. The new class becomes a superclass of CoreTypes, which now gets its functionality from that class, but also exposes commonly used built-in members as fields. This replaces a couple of ad-hoc linear searches spread throughout the code. The canonical names are not a convenient interface for transformers, so the idea is that they can use LibraryIndex to address their own runtime libraries. To avoid name clashes and still have a somewhat convenient interface, getters and setters are prefixed by 'get:' and 'set:' in the lookup table (and only in the lookup table), and top-level members can be accessed using '::' as the class name. This is the same convention used by the VM, although it is currently not required to be the same. R=dmitryas@google.com, karlklose@google.com, kmillikin@google.com Committed: https://github.com/dart-lang/sdk/commit/a2e55c953d9ebce896f21ba7e08c05f60359d2fe

Patch Set 1 #

Patch Set 2 : Minor fixes #

Total comments: 2

Patch Set 3 : Fix some typos #

Patch Set 4 : Another minor fix #

Patch Set 5 : Update fasta, and add methods for tolerating missing libaries #

Unified diffs Side-by-side diffs Delta from patch set Stats (+320 lines, -236 lines) Patch
M pkg/front_end/lib/src/fasta/kernel/builder_accessors.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/source/diet_listener.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M pkg/kernel/lib/core_types.dart View 2 chunks +22 lines, -70 lines 0 comments Download
A pkg/kernel/lib/library_index.dart View 1 2 3 4 1 chunk +238 lines, -0 lines 0 comments Download
M pkg/kernel/lib/transformations/continuation.dart View 1 chunk +16 lines, -79 lines 0 comments Download
M pkg/kernel/lib/transformations/method_call.dart View 2 chunks +2 lines, -5 lines 0 comments Download
M pkg/kernel/lib/transformations/mixin_full_resolution.dart View 2 chunks +2 lines, -5 lines 0 comments Download
M pkg/kernel/lib/transformations/treeshaker.dart View 1 2 3 4 6 chunks +37 lines, -74 lines 0 comments Download
M pkg/kernel/lib/type_propagation/builder.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
asgerf
3 years, 10 months ago (2017-02-24 09:41:09 UTC) #2
Kevin Millikin (Google)
It is much nicer. LGTM.
3 years, 10 months ago (2017-02-24 10:21:08 UTC) #3
karlklose
LGTM https://codereview.chromium.org/2706243011/diff/20001/pkg/kernel/lib/core_types.dart File pkg/kernel/lib/core_types.dart (right): https://codereview.chromium.org/2706243011/diff/20001/pkg/kernel/lib/core_types.dart#newcode58 pkg/kernel/lib/core_types.dart:58: objectClass = getClass('dart:core', 'Object'); Maybe use the library ...
3 years, 10 months ago (2017-02-24 10:59:55 UTC) #4
Dmitry Stefantsov
LGTM
3 years, 10 months ago (2017-02-24 11:10:10 UTC) #5
asgerf
https://codereview.chromium.org/2706243011/diff/20001/pkg/kernel/lib/core_types.dart File pkg/kernel/lib/core_types.dart (right): https://codereview.chromium.org/2706243011/diff/20001/pkg/kernel/lib/core_types.dart#newcode58 pkg/kernel/lib/core_types.dart:58: objectClass = getClass('dart:core', 'Object'); On 2017/02/24 10:59:55, karlklose wrote: ...
3 years, 10 months ago (2017-02-24 12:13:37 UTC) #6
asgerf
3 years, 10 months ago (2017-02-24 13:49:20 UTC) #8
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
a2e55c953d9ebce896f21ba7e08c05f60359d2fe (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698