DescriptionAdd 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 #Messages
Total messages: 8 (2 generated)
|