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

Issue 10830331: Fix wrong optimization for private fields (Closed)

Created:
8 years, 4 months ago by Søren Gjesse
Modified:
8 years, 4 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix wrong optimization for private fields R=floitsch@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=10719

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M lib/compiler/implementation/ssa/optimize.dart View 1 chunk +1 line, -0 lines 3 comments Download
M tests/language/private1.dart View 3 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Søren Gjesse
8 years, 4 months ago (2012-08-15 10:50:46 UTC) #1
floitsch
LGTM. https://chromiumcodereview.appspot.com/10830331/diff/1/lib/compiler/implementation/ssa/optimize.dart File lib/compiler/implementation/ssa/optimize.dart (right): https://chromiumcodereview.appspot.com/10830331/diff/1/lib/compiler/implementation/ssa/optimize.dart#newcode566 lib/compiler/implementation/ssa/optimize.dart:566: if (field.getLibrary() !== work.element.getLibrary()) return node; why not ...
8 years, 4 months ago (2012-08-15 11:59:42 UTC) #2
Søren Gjesse
http://codereview.chromium.org/10830331/diff/1/lib/compiler/implementation/ssa/optimize.dart File lib/compiler/implementation/ssa/optimize.dart (right): http://codereview.chromium.org/10830331/diff/1/lib/compiler/implementation/ssa/optimize.dart#newcode566 lib/compiler/implementation/ssa/optimize.dart:566: if (field.getLibrary() !== work.element.getLibrary()) return node; On 2012/08/15 11:59:42, ...
8 years, 4 months ago (2012-08-15 12:50:04 UTC) #3
floitsch
8 years, 4 months ago (2012-08-15 12:56:34 UTC) #4
http://codereview.chromium.org/10830331/diff/1/lib/compiler/implementation/ss...
File lib/compiler/implementation/ssa/optimize.dart (right):

http://codereview.chromium.org/10830331/diff/1/lib/compiler/implementation/ss...
lib/compiler/implementation/ssa/optimize.dart:566: if (field.getLibrary() !==
work.element.getLibrary()) return node;
On 2012/08/15 12:50:04, Søren Gjesse wrote:
> On 2012/08/15 11:59:42, floitsch wrote:
> > why not looking if the field is private?
> > There should be something like node.name.isPrivate.
> 
> It works if the check is just !node.name.isPrivate(). However that regresses
> some benchmarks as it hits broadly.
> 
> But thanks to noticing, as the check should still include the
> node.name.isPrivate(), as the library check should only be done for private
> fields.

That's what I meant.

Powered by Google App Engine
This is Rietveld 408576698