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

Issue 2824123003: Make backend.setAnnotations (mostly) handle LibraryEntities. (Closed)

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

Description

Make backend.setAnnotations (mostly) handle LibraryEntities. BUG= R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/6c25a58dabfcb4c99d965952684193face1fd797

Patch Set 1 : . #

Total comments: 18

Patch Set 2 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -107 lines) Patch
M pkg/compiler/lib/src/compiler.dart View 1 4 chunks +40 lines, -80 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/backend.dart View 1 chunk +4 lines, -7 lines 0 comments Download
M pkg/compiler/lib/src/kernel/world_builder.dart View 1 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/native/resolver.dart View 1 2 chunks +68 lines, -20 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
Emily Fortuna
Implemented a handful of the things discussed here: https://docs.google.com/a/google.com/document/d/1KgBODP1rvvvJzbvnUMjaX56kv-DFT0c7eTdFd2noi6s/edit?usp=sharing_eil&ts=58f59f39 and then see comments where I ...
3 years, 8 months ago (2017-04-19 00:59:55 UTC) #4
Johnni Winther
lgtm https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/kernel/world_builder.dart File pkg/compiler/lib/src/kernel/world_builder.dart (right): https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/kernel/world_builder.dart#newcode529 pkg/compiler/lib/src/kernel/world_builder.dart:529: class KernelLookup { On 2017/04/19 00:59:55, Emily Fortuna ...
3 years, 8 months ago (2017-04-19 08:39:51 UTC) #5
Siggi Cherem (dart-lang)
Thanks Emily! https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/compiler.dart File pkg/compiler/lib/src/compiler.dart (left): https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/compiler.dart#oldcode599 pkg/compiler/lib/src/compiler.dart:599: .log('Enqueuing ${(library as LibraryElement).canonicalUri}'); thx! https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/compiler.dart File ...
3 years, 8 months ago (2017-04-19 15:36:29 UTC) #6
Emily Fortuna
https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/compiler.dart File pkg/compiler/lib/src/compiler.dart (right): https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/compiler.dart#newcode387 pkg/compiler/lib/src/compiler.dart:387: if (loadedLibraries.rootLibrary is LibraryElement) { On 2017/04/19 15:36:29, Siggi ...
3 years, 8 months ago (2017-04-19 22:35:46 UTC) #7
Emily Fortuna
Committed patchset #2 (id:60001) manually as 6c25a58dabfcb4c99d965952684193face1fd797 (presubmit successful).
3 years, 8 months ago (2017-04-19 22:36:40 UTC) #9
Johnni Winther
3 years, 8 months ago (2017-04-20 07:19:27 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/ke...
File pkg/compiler/lib/src/kernel/world_builder.dart (right):

https://codereview.chromium.org/2824123003/diff/40001/pkg/compiler/lib/src/ke...
pkg/compiler/lib/src/kernel/world_builder.dart:529: class KernelLookup {
On 2017/04/19 15:36:29, Siggi Cherem (dart-lang) wrote:
> On 2017/04/19 08:39:51, Johnni Winther wrote:
> > On 2017/04/19 00:59:55, Emily Fortuna wrote:
> > > I'm guessing we want to have some sort of super interface where we can do
> the
> > > same thing for the AST nodes (instead of looking up on the element->nodes
> > > themselves)? I wanted to check before implementing too much though.
> > 
> > This functionality is already in KernelWorldBuilder (through libraryIndex,
> > classIndex, etc). Just leave out this class, I'll merge the
> > _KernelAnnotationProcessor with the code I already have.
> 
> Ah! some questions for Johnni...
> 
> 1. is the idea to mimic what you have in lookupLibraryMember? (i.e. you would
> add a similar method like lookupLibraryKernelMember and directly return the ir
> node?)
> 
> 2. I'd like to split KernelWorldBuilder or rename it. I feel like we should
have
> a simple mechanism to map elements and nodes that is independent of a world
> builder - I imagine we'll create a world builder later in the compiler
pipeline,
> and we can make some pieces of the compiler (like the annotation processor)
> independent of the world. Do you agree?

1. I want IR based reasoning to be confined to the kernel/world_builder library.
History shows that if we expose the internal structures we will use them
everywhere (think of how we use AST nodes). So _no_ public methods returning IR
nodes, if avoidable.

2. You rarely need IR nodes without their relation to the element model, that is
what KernelWorldBuilder is for. (And I will soon rename it to
KernelElementBuilder to reflect that more clearly).

Powered by Google App Engine
This is Rietveld 408576698