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 2392943003: Handle const constructor invocation in kernel_impact. (Closed)

Created:
4 years, 2 months ago by Johnni Winther
Modified:
4 years, 2 months ago
Reviewers:
Harry Terkelsen
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Handle const constructor invocation in kernel_impact. This includes a move toward registering the type together with constructors which is need for this CL and (later) for not registering classes with factories as instantiated. R=het@google.com Committed: https://github.com/dart-lang/sdk/commit/9c1ad561161db490c2ae47295e302b79decc4723

Patch Set 1 #

Total comments: 12

Patch Set 2 : Updated cf. comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -44 lines) Patch
M pkg/compiler/lib/src/enqueue.dart View 2 chunks +4 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/js_backend/backend.dart View 2 chunks +27 lines, -13 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/enqueuer.dart View 2 chunks +4 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/js_backend/kernel_task.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/resolution/constructors.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/resolution/members.dart View 1 1 chunk +5 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/serialization/impact_serialization.dart View 2 chunks +5 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/ssa/kernel_impact.dart View 1 2 chunks +9 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/universe/use.dart View 1 4 chunks +31 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/universe/world_builder.dart View 2 chunks +4 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/util/util.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/kernel/impact_test.dart View 1 6 chunks +39 lines, -9 lines 0 comments Download
M tests/compiler/dart2js/kernel/visitor_test.dart View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
Johnni Winther
4 years, 2 months ago (2016-10-05 11:37:36 UTC) #3
Johnni Winther
ping
4 years, 2 months ago (2016-10-07 08:19:45 UTC) #4
Harry Terkelsen
lgtm https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/js_backend/backend.dart File pkg/compiler/lib/src/js_backend/backend.dart (right): https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/js_backend/backend.dart#newcode3163 pkg/compiler/lib/src/js_backend/backend.dart:3163: backend.lookupMapAnalysis.registerInstantiatedType(staticUse.type); just a heads up: I think we ...
4 years, 2 months ago (2016-10-07 15:53:21 UTC) #5
Johnni Winther
Committed patchset #2 (id:20001) manually as 9c1ad561161db490c2ae47295e302b79decc4723 (presubmit successful).
4 years, 2 months ago (2016-10-10 09:03:18 UTC) #7
Johnni Winther
4 years, 2 months ago (2016-10-10 09:58:12 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/js_bac...
File pkg/compiler/lib/src/js_backend/backend.dart (right):

https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/js_bac...
pkg/compiler/lib/src/js_backend/backend.dart:3163:
backend.lookupMapAnalysis.registerInstantiatedType(staticUse.type);
On 2016/10/07 15:53:21, Harry Terkelsen wrote:
> just a heads up: I think we are planning to remove lookup map support since
it's
> unused

Acknowledged.

https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/resolu...
File pkg/compiler/lib/src/resolution/members.dart (right):

https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/resolu...
pkg/compiler/lib/src/resolution/members.dart:3893: ? new
StaticUse.constConstructorInvoke(
On 2016/10/07 15:53:21, Harry Terkelsen wrote:
> this is the output of dartfmt? looks weird

No. Forgot to dartfmt this CL.

https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/univer...
File pkg/compiler/lib/src/universe/use.dart (right):

https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/univer...
pkg/compiler/lib/src/universe/use.dart:87: StaticUse.internal(Element element,
StaticUseKind kind, [DartType type = null])
On 2016/10/07 15:53:21, Harry Terkelsen wrote:
> long line

Done.

https://codereview.chromium.org/2392943003/diff/1/pkg/compiler/lib/src/univer...
pkg/compiler/lib/src/universe/use.dart:223: return new
StaticUse.internal(element, StaticUseKind.CONSTRUCTOR_INVOKE, type);
On 2016/10/07 15:53:21, Harry Terkelsen wrote:
> long line

Done.

https://codereview.chromium.org/2392943003/diff/1/tests/compiler/dart2js/kern...
File tests/compiler/dart2js/kernel/impact_test.dart (right):

https://codereview.chromium.org/2392943003/diff/1/tests/compiler/dart2js/kern...
tests/compiler/dart2js/kernel/impact_test.dart:490: new
StaticUse.typedConstructorInvoke(effectiveTarget, null, effectiveTargetType));
On 2016/10/07 15:53:21, Harry Terkelsen wrote:
> long line

Done.

https://codereview.chromium.org/2392943003/diff/1/tests/compiler/dart2js/kern...
tests/compiler/dart2js/kernel/impact_test.dart:490: new
StaticUse.typedConstructorInvoke(effectiveTarget, null, effectiveTargetType));
On 2016/10/07 15:53:21, Harry Terkelsen wrote:
> why do we lose the distinction between const and non-const constructors in
> kernel?

Fixed.

Powered by Google App Engine
This is Rietveld 408576698