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

Issue 2608273002: Reduce use of Element in optimize.dart (Closed)

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

Description

Patch Set 1 #

Patch Set 2 : Fix. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -105 lines) Patch
M pkg/compiler/lib/src/common/backend_api.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/elements/elements.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/js_backend/backend.dart View 1 2 chunks +7 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/backend_helpers.dart View 1 chunk +3 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/native/ssa.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 18 chunks +32 lines, -31 lines 0 comments Download
M pkg/compiler/lib/src/ssa/interceptor_simplifier.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/ssa/locals_handler.dart View 1 1 chunk +1 line, -2 lines 0 comments Download
M pkg/compiler/lib/src/ssa/optimize.dart View 1 26 chunks +67 lines, -58 lines 4 comments Download
M pkg/compiler/lib/src/types/type_mask.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/universe/world_builder.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/world.dart View 1 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
Johnni Winther
3 years, 11 months ago (2017-01-03 15:30:03 UTC) #2
Siggi Cherem (dart-lang)
lgtm
3 years, 11 months ago (2017-01-03 19:05:54 UTC) #3
Johnni Winther
Committed patchset #1 (id:1) manually as 52158e2ad61d614dc1356a38924af541ddaf4d89 (presubmit successful).
3 years, 11 months ago (2017-01-04 10:45:00 UTC) #5
Johnni Winther
PTAL @ the last patch (optimize.dart only)
3 years, 11 months ago (2017-01-04 15:28:30 UTC) #7
Siggi Cherem (dart-lang)
lgtm
3 years, 11 months ago (2017-01-04 17:09:00 UTC) #8
sra1
https://codereview.chromium.org/2608273002/diff/20001/pkg/compiler/lib/src/ssa/optimize.dart File pkg/compiler/lib/src/ssa/optimize.dart (right): https://codereview.chromium.org/2608273002/diff/20001/pkg/compiler/lib/src/ssa/optimize.dart#newcode496 pkg/compiler/lib/src/ssa/optimize.dart:496: field as Entity, globalInferenceResults); Why is 'as' needed? is ...
3 years, 11 months ago (2017-01-04 17:20:48 UTC) #10
Johnni Winther
https://codereview.chromium.org/2608273002/diff/20001/pkg/compiler/lib/src/ssa/optimize.dart File pkg/compiler/lib/src/ssa/optimize.dart (right): https://codereview.chromium.org/2608273002/diff/20001/pkg/compiler/lib/src/ssa/optimize.dart#newcode496 pkg/compiler/lib/src/ssa/optimize.dart:496: field as Entity, globalInferenceResults); On 2017/01/04 17:20:48, sra1 wrote: ...
3 years, 11 months ago (2017-01-05 08:54:42 UTC) #11
Johnni Winther
3 years, 11 months ago (2017-01-05 08:54:43 UTC) #12
Johnni Winther
Committed patchset #2 (id:20001) manually as c899f20de3a37594285f403ab69bd328c52d1de0 (presubmit successful).
3 years, 11 months ago (2017-01-05 09:21:04 UTC) #14
Siggi Cherem (dart-lang)
https://codereview.chromium.org/2608273002/diff/20001/pkg/compiler/lib/src/ssa/optimize.dart File pkg/compiler/lib/src/ssa/optimize.dart (right): https://codereview.chromium.org/2608273002/diff/20001/pkg/compiler/lib/src/ssa/optimize.dart#newcode496 pkg/compiler/lib/src/ssa/optimize.dart:496: field as Entity, globalInferenceResults); On 2017/01/05 08:54:42, Johnni Winther ...
3 years, 11 months ago (2017-01-05 18:14:08 UTC) #15
Johnni Winther
3 years, 11 months ago (2017-01-06 09:04:51 UTC) #16
Message was sent while issue was closed.
https://codereview.chromium.org/2608273002/diff/20001/pkg/compiler/lib/src/ss...
File pkg/compiler/lib/src/ssa/optimize.dart (right):

https://codereview.chromium.org/2608273002/diff/20001/pkg/compiler/lib/src/ss...
pkg/compiler/lib/src/ssa/optimize.dart:496: field as Entity,
globalInferenceResults);
On 2017/01/05 18:14:08, Siggi Cherem (dart-lang) wrote:
> On 2017/01/05 08:54:42, Johnni Winther wrote:
> > On 2017/01/04 17:20:48, sra1 wrote:
> > > Why is 'as' needed? is a FieldEntity not an Entity?
> > 
> > It is. The Dart type system doesn't handle diamond properties in assignment:

> > 
> >   Entity <: Element <: FieldElement
> >   Entity <: FieldEntity <: FieldElement
> > 
> > so I need to show it why FieldEntity and Element are related. Hopefully the
VM
> > can realize that `as Entity` always succeeds.
> 
> mmm... this feels like it might be hiding the issue, we could also just write
> `as Object` :-). Maybe this should be `as Element` so that we know it can only
> be removed when `inferredTypeForElement` changes to be based on entities?

I like _not_ being able to write `Element` in this file (part of my measure of
progress)...

I should be removed when [inferredTypeForElement] is using entities.

Powered by Google App Engine
This is Rietveld 408576698