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

Issue 2746293006: Pulling the element model out of global type inference. (Closed)

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

Description

Patch Set 1 : . #

Total comments: 17

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -25 lines) Patch
M pkg/compiler/lib/src/commandline_options.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/dart2js.dart View 1 chunk +3 lines, -0 lines 0 comments Download
A pkg/compiler/lib/src/inferrer/builder_kernel.dart View 1 1 chunk +172 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/inferrer_engine.dart View 1 4 chunks +12 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/options.dart View 7 chunks +11 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder_kernel.dart View 1 2 chunks +4 lines, -23 lines 0 comments Download
M pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart View 2 chunks +30 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
Emily Fortuna
This CL was much larger, but it contained a lot of half-implemented methods with portions ...
3 years, 9 months ago (2017-03-15 18:37:15 UTC) #5
Siggi Cherem (dart-lang)
lgtm, just minor comments below https://codereview.chromium.org/2746293006/diff/60001/pkg/compiler/lib/src/inferrer/builder_kernel.dart File pkg/compiler/lib/src/inferrer/builder_kernel.dart (right): https://codereview.chromium.org/2746293006/diff/60001/pkg/compiler/lib/src/inferrer/builder_kernel.dart#newcode21 pkg/compiler/lib/src/inferrer/builder_kernel.dart:21: /// [KernelTypeGraphBuilder] can be ...
3 years, 9 months ago (2017-03-16 00:37:45 UTC) #6
Johnni Winther
lgtm
3 years, 9 months ago (2017-03-16 14:16:18 UTC) #7
Emily Fortuna
https://codereview.chromium.org/2746293006/diff/60001/pkg/compiler/lib/src/inferrer/builder_kernel.dart File pkg/compiler/lib/src/inferrer/builder_kernel.dart (right): https://codereview.chromium.org/2746293006/diff/60001/pkg/compiler/lib/src/inferrer/builder_kernel.dart#newcode21 pkg/compiler/lib/src/inferrer/builder_kernel.dart:21: /// [KernelTypeGraphBuilder] can be thought of as a type-inference ...
3 years, 9 months ago (2017-03-17 01:03:02 UTC) #8
Emily Fortuna
Committed patchset #2 (id:80001) manually as 0fa285f88064a30a36dc004df79a58853cca26f9 (presubmit successful).
3 years, 9 months ago (2017-03-17 01:03:52 UTC) #10
Siggi Cherem (dart-lang)
3 years, 9 months ago (2017-03-17 21:10:17 UTC) #11
Message was sent while issue was closed.
lgtm, thanks!

https://codereview.chromium.org/2746293006/diff/60001/pkg/compiler/lib/src/in...
File pkg/compiler/lib/src/inferrer/builder_kernel.dart (right):

https://codereview.chromium.org/2746293006/diff/60001/pkg/compiler/lib/src/in...
pkg/compiler/lib/src/inferrer/builder_kernel.dart:83: initializer =
(analyzedNode as ir.Field).initializer;
On 2017/03/17 01:03:02, Emily Fortuna wrote:
> On 2017/03/16 00:37:45, Siggi Cherem (dart-lang) wrote:
> > If we can make analyzerNode final above, then this cast will no longer be
> > necessary (the is-check will promote the field).
> > 
> > Meanwhile, a convention we follow in dart2js is to avoid the cast and
instead
> do
> > an assignment to a temporary variable with the precise type:
> > 
> > if (analyzedNode is ir.Field) {
> >   ir.Field field = analyzerdNode;
> >   if (field.initializer == null) ...
> > 
> > This makes it a cast in checked-mode, but free in production mode. In the
> future
> > with strong-mode, there wont be that difference anymore though.
> 
> Hmm I made this change complete with the finals, and the analyze_unused_test
was
> still unhappy about it.  I went with the renaming/typing the variable instead.

interesting - I think I understand why now - this class could have a subclass
that overrides the field with a getter/setter pair and makes it non-final.... :(

Powered by Google App Engine
This is Rietveld 408576698