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

Issue 611153003: Propertly tree shake factory constructors. (Closed)

Created:
6 years, 2 months ago by Paul Berry
Modified:
6 years, 2 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Propertly tree shake factory constructors. An invocation of a factory constructor on class A does not necessarily cause class A to be instantiated--it may redirect to a related or unrelated class, or instantiate nothing at all. We handle this by treating constructors similar to static function calls--when a constructor invocation is found, the constructor element is added to the queue; later, when the constructor element is analyzed, we determine whether it instantiates the class or not based on what kind of constructor it is. R=brianwilkerson@google.com Committed: https://code.google.com/p/dart/source/detail?r=40899

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -17 lines) Patch
M pkg/analyzer2dart/lib/src/tree_shaker.dart View 6 chunks +64 lines, -17 lines 2 comments Download
M pkg/analyzer2dart/test/tree_shaker_test.dart View 1 chunk +68 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Paul Berry
6 years, 2 months ago (2014-10-02 21:02:13 UTC) #2
Brian Wilkerson
LGTM
6 years, 2 months ago (2014-10-02 21:26:25 UTC) #3
Johnni Winther
https://codereview.chromium.org/611153003/diff/1/pkg/analyzer2dart/lib/src/tree_shaker.dart File pkg/analyzer2dart/lib/src/tree_shaker.dart (right): https://codereview.chromium.org/611153003/diff/1/pkg/analyzer2dart/lib/src/tree_shaker.dart#newcode329 pkg/analyzer2dart/lib/src/tree_shaker.dart:329: void visitConstructorDeclaration(ConstructorDeclaration node) { Currently we only mark classes ...
6 years, 2 months ago (2014-10-03 08:03:06 UTC) #4
Paul Berry
https://codereview.chromium.org/611153003/diff/1/pkg/analyzer2dart/lib/src/tree_shaker.dart File pkg/analyzer2dart/lib/src/tree_shaker.dart (right): https://codereview.chromium.org/611153003/diff/1/pkg/analyzer2dart/lib/src/tree_shaker.dart#newcode329 pkg/analyzer2dart/lib/src/tree_shaker.dart:329: void visitConstructorDeclaration(ConstructorDeclaration node) { On 2014/10/03 08:03:06, Johnni Winther ...
6 years, 2 months ago (2014-10-03 15:50:45 UTC) #5
Paul Berry
Committed patchset #1 (id:1) manually as 40899 (presubmit successful).
6 years, 2 months ago (2014-10-03 15:53:52 UTC) #6
Johnni Winther
6 years, 2 months ago (2014-10-06 10:19:20 UTC) #7
Message was sent while issue was closed.
LGTM

Powered by Google App Engine
This is Rietveld 408576698