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

Issue 2968743002: Use .callMethod instead of LocalFunctionElement as key in inference (Closed)

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

Description

Use .callMethod instead of LocalFunctionElement as key in inference This changes the inlining strategy a bit by solving a latent problem: ClosedWorld.isCalledInLoop was computed using LocalFunctionElement but queried using SynthesizedCallMethodX thus always returning false in these cases. R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/cc5fed33373c08d0a75ff7d093f1f74f6bcc93c4

Patch Set 1 #

Total comments: 12

Patch Set 2 : Updated cf. comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -382 lines) Patch
M pkg/compiler/lib/src/dump_info.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/inferrer/builder.dart View 1 12 chunks +31 lines, -25 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/closure_tracer.dart View 4 chunks +5 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/inferrer_engine.dart View 1 17 chunks +18 lines, -133 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/node_tracer.dart View 2 chunks +3 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_dump.dart View 3 chunks +5 lines, -12 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart View 3 chunks +0 lines, -20 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_graph_nodes.dart View 13 chunks +15 lines, -83 lines 0 comments Download
M pkg/compiler/lib/src/inferrer/type_system.dart View 1 3 chunks +7 lines, -31 lines 0 comments Download
M pkg/compiler/lib/src/ssa/builder.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/types/types.dart View 3 chunks +3 lines, -28 lines 0 comments Download
M pkg/compiler/lib/src/world.dart View 8 chunks +35 lines, -38 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Johnni Winther
3 years, 5 months ago (2017-06-30 16:37:58 UTC) #3
Siggi Cherem (dart-lang)
lgtm, with suggestions and questions https://codereview.chromium.org/2968743002/diff/1/pkg/compiler/lib/src/inferrer/builder.dart File pkg/compiler/lib/src/inferrer/builder.dart (right): https://codereview.chromium.org/2968743002/diff/1/pkg/compiler/lib/src/inferrer/builder.dart#newcode941 pkg/compiler/lib/src/inferrer/builder.dart:941: if (element.functionDeclaration.isLocal) { I ...
3 years, 5 months ago (2017-06-30 18:13:54 UTC) #4
Johnni Winther
https://codereview.chromium.org/2968743002/diff/1/pkg/compiler/lib/src/inferrer/builder.dart File pkg/compiler/lib/src/inferrer/builder.dart (right): https://codereview.chromium.org/2968743002/diff/1/pkg/compiler/lib/src/inferrer/builder.dart#newcode941 pkg/compiler/lib/src/inferrer/builder.dart:941: if (element.functionDeclaration.isLocal) { On 2017/06/30 18:13:54, Siggi Cherem (dart-lang) ...
3 years, 5 months ago (2017-06-30 19:02:02 UTC) #5
Johnni Winther
Committed patchset #2 (id:20001) manually as cc5fed33373c08d0a75ff7d093f1f74f6bcc93c4 (presubmit successful).
3 years, 5 months ago (2017-06-30 19:07:45 UTC) #7
Siggi Cherem (dart-lang)
https://codereview.chromium.org/2968743002/diff/1/pkg/compiler/lib/src/world.dart File pkg/compiler/lib/src/world.dart (left): https://codereview.chromium.org/2968743002/diff/1/pkg/compiler/lib/src/world.dart#oldcode1139 pkg/compiler/lib/src/world.dart:1139: return getMightBePassedToApply(element.expression); On 2017/06/30 19:02:02, Johnni Winther wrote: > ...
3 years, 5 months ago (2017-06-30 20:34:36 UTC) #8
Johnni Winther
3 years, 5 months ago (2017-07-03 07:26:07 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/2968743002/diff/1/pkg/compiler/lib/src/world....
File pkg/compiler/lib/src/world.dart (left):

https://codereview.chromium.org/2968743002/diff/1/pkg/compiler/lib/src/world....
pkg/compiler/lib/src/world.dart:1139: return
getMightBePassedToApply(element.expression);
On 2017/06/30 20:34:36, Siggi Cherem (dart-lang) wrote:
> On 2017/06/30 19:02:02, Johnni Winther wrote:
> > On 2017/06/30 18:13:54, Siggi Cherem (dart-lang) wrote:
> > > neat to get rid of this, but this is unrelated to your change right? We
> simply
> > > created everything earlier now, correct?
> > 
> > No, this was a fix for the same kind of discrepancy as with isCalledInLoop,
> only
> > Stephan had found this.
> 
> I see - the comment above was misleading, it gave me the impression that some
> elements were created after inference: they were created before but we were
> using the wrong one

When the comment was written they _were_ created after inference :)

Powered by Google App Engine
This is Rietveld 408576698