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

Issue 10542073: RFC: Resolution based tree-shaking. (Closed)

Created:
8 years, 6 months ago by ahe
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org, compiler-dev_dartlang.org
Visibility:
Public.

Description

Resolution based tree-shaking. Committed: https://code.google.com/p/dart/source/detail?r=8543

Patch Set 1 #

Total comments: 2

Patch Set 2 : No unresolved elements #

Patch Set 3 : All tests pass #

Total comments: 45

Patch Set 4 : Address review comments #

Patch Set 5 : Rebased #

Patch Set 6 : Minor tweaks for the unit tests #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -55 lines) Patch
M dart/frog/tests/leg/compiler_helper.dart View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M dart/lib/compiler/implementation/compiler.dart View 1 2 3 4 5 9 chunks +133 lines, -27 lines 8 comments Download
M dart/lib/compiler/implementation/dart_backend/backend.dart View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M dart/lib/compiler/implementation/elements/elements.dart View 1 2 3 4 5 4 chunks +25 lines, -1 line 0 comments Download
M dart/lib/compiler/implementation/enqueue.dart View 1 2 3 4 4 chunks +29 lines, -2 lines 2 comments Download
M dart/lib/compiler/implementation/resolver.dart View 1 2 3 4 5 6 chunks +83 lines, -3 lines 2 comments Download
M dart/lib/compiler/implementation/tree/nodes.dart View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M dart/tests/co19/co19-leg.status View 1 2 3 4 2 chunks +0 lines, -21 lines 0 comments Download
M dart/utils/compiler/build_helper.dart View 1 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
ahe
This is preview. It seems to be close to working now.
8 years, 6 months ago (2012-06-08 12:29:45 UTC) #1
ahe
I'm now able to resolve everything in tests/utils/dummy_compiler_test.dart before compiling. I decided to load all ...
8 years, 6 months ago (2012-06-11 14:42:57 UTC) #2
ahe
Please review this CL now. All tests are passing.
8 years, 6 months ago (2012-06-11 23:14:12 UTC) #3
sra1
https://chromiumcodereview.appspot.com/10542073/diff/8001/dart/lib/compiler/implementation/compiler.dart File dart/lib/compiler/implementation/compiler.dart (right): https://chromiumcodereview.appspot.com/10542073/diff/8001/dart/lib/compiler/implementation/compiler.dart#newcode439 dart/lib/compiler/implementation/compiler.dart:439: resolved.remove(e); I'm not sure it is safe to remove ...
8 years, 6 months ago (2012-06-12 02:25:20 UTC) #4
kasperl
LGTM if you address Stephen's concern. https://chromiumcodereview.appspot.com/10542073/diff/1/dart/lib/compiler/implementation/compiler.dart File dart/lib/compiler/implementation/compiler.dart (right): https://chromiumcodereview.appspot.com/10542073/diff/1/dart/lib/compiler/implementation/compiler.dart#newcode19 dart/lib/compiler/implementation/compiler.dart:19: resolutionTree = world.getCachedElements(element); ...
8 years, 6 months ago (2012-06-12 05:50:12 UTC) #5
ahe
Hi Stephen and Kasper, Thank you for taking a look. I'll let you know when ...
8 years, 6 months ago (2012-06-12 06:22:48 UTC) #6
ahe
Addressed comments. https://chromiumcodereview.appspot.com/10542073/diff/8001/dart/lib/compiler/implementation/compiler.dart File dart/lib/compiler/implementation/compiler.dart (right): https://chromiumcodereview.appspot.com/10542073/diff/8001/dart/lib/compiler/implementation/compiler.dart#newcode5 dart/lib/compiler/implementation/compiler.dart:5: final bool REPORT_EXCESS_RESOLUTION = false; On 2012/06/12 ...
8 years, 6 months ago (2012-06-12 10:56:11 UTC) #7
ahe
I had to make a few tweaks to get the unit tests to pass. I ...
8 years, 6 months ago (2012-06-12 12:30:21 UTC) #8
ngeoffray
LGTM https://chromiumcodereview.appspot.com/10542073/diff/8002/dart/lib/compiler/implementation/compiler.dart File dart/lib/compiler/implementation/compiler.dart (right): https://chromiumcodereview.appspot.com/10542073/diff/8002/dart/lib/compiler/implementation/compiler.dart#newcode435 dart/lib/compiler/implementation/compiler.dart:435: * processing the quese). Also compute the number ...
8 years, 6 months ago (2012-06-12 12:44:14 UTC) #9
ahe
Thank you, Nicolas! Comments addressed in the next CL: https://chromiumcodereview.appspot.com/10537129/ https://chromiumcodereview.appspot.com/10542073/diff/8002/dart/lib/compiler/implementation/compiler.dart File dart/lib/compiler/implementation/compiler.dart (right): https://chromiumcodereview.appspot.com/10542073/diff/8002/dart/lib/compiler/implementation/compiler.dart#newcode435 ...
8 years, 6 months ago (2012-06-12 18:47:13 UTC) #10
ngeoffray
https://chromiumcodereview.appspot.com/10542073/diff/8002/dart/lib/compiler/implementation/compiler.dart File dart/lib/compiler/implementation/compiler.dart (right): https://chromiumcodereview.appspot.com/10542073/diff/8002/dart/lib/compiler/implementation/compiler.dart#newcode513 dart/lib/compiler/implementation/compiler.dart:513: if (world !== enqueuer.codegen) return null; On 2012/06/12 18:47:13, ...
8 years, 6 months ago (2012-06-13 07:31:57 UTC) #11
ahe
8 years, 6 months ago (2012-06-13 08:20:41 UTC) #12
https://chromiumcodereview.appspot.com/10542073/diff/8002/dart/lib/compiler/i...
File dart/lib/compiler/implementation/compiler.dart (right):

https://chromiumcodereview.appspot.com/10542073/diff/8002/dart/lib/compiler/i...
dart/lib/compiler/implementation/compiler.dart:513: if (world !==
enqueuer.codegen) return null;
On 2012/06/13 07:31:57, ngeoffray wrote:
> On 2012/06/12 18:47:13, ahe wrote:
> > On 2012/06/12 12:44:14, ngeoffray wrote:
> > > Can we actually prevent this situation? Or is that too cumbersome?
> > 
> > I'm not sure I understand your question.
> 
> It does not feel right that the resolver queue ends up being mixed with the
> codegen method in compiler. But that's probably because of how the pipeline is
> structured.

I have some ideas for cleaning this up. If enqueuer.codegen and
enqueuer.resolution were slightly different classes (or initialized
differently), then we could probably change WorkItem.run, analyze, and codegen
to be simpler.

Powered by Google App Engine
This is Rietveld 408576698