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

Issue 2954403002: Add type inference for super method invocations. (Closed)

Created:
3 years, 5 months ago by Paul Berry
Modified:
3 years, 5 months ago
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add type inference for super method invocations. I implemented the correct logic for both SuperMethodInvocation and DirectMethodInvocation, since there are TODO comments in the code indicating that the former will be replaced by the latter when possible. R=scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/e24eab66d96999389926752efdbb97d370009665

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -53 lines) Patch
M pkg/front_end/lib/src/fasta/kernel/body_builder.dart View 3 chunks +7 lines, -5 lines 3 comments Download
M pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/frontend_accessors.dart View 5 chunks +8 lines, -8 lines 0 comments Download
M pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart View 4 chunks +22 lines, -14 lines 0 comments Download
M pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart View 2 chunks +14 lines, -10 lines 0 comments Download
M pkg/front_end/testcases/classes.dart.direct.expect View 1 chunk +1 line, -1 line 0 comments Download
A pkg/front_end/testcases/inference/super_method_invocation.dart View 1 chunk +18 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/super_method_invocation.dart.dartk.expect View 1 chunk +20 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/super_method_invocation.dart.direct.expect View 1 chunk +20 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/super_method_invocation.dart.outline.expect View 1 chunk +18 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference/super_method_invocation.dart.strong.expect View 1 chunk +20 lines, -0 lines 0 comments Download
M pkg/front_end/testcases/kompile.status View 1 chunk +1 line, -0 lines 0 comments Download
M pkg/front_end/testcases/rasta/issue_000053.dart.direct.expect View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/testcases/rasta/issue_000080.dart.direct.expect View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/testcases/super_rasta_copy.dart.direct.expect View 2 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Paul Berry
I only need a review from one of you. Peter, I have a specific question ...
3 years, 5 months ago (2017-06-26 18:57:55 UTC) #2
scheglov
LGTM
3 years, 5 months ago (2017-06-26 19:36:31 UTC) #3
Paul Berry
Committed patchset #1 (id:1) manually as e24eab66d96999389926752efdbb97d370009665 (presubmit successful).
3 years, 5 months ago (2017-06-26 19:42:51 UTC) #5
Siggi Cherem (dart-lang)
https://codereview.chromium.org/2954403002/diff/1/pkg/front_end/lib/src/fasta/kernel/body_builder.dart File pkg/front_end/lib/src/fasta/kernel/body_builder.dart (right): https://codereview.chromium.org/2954403002/diff/1/pkg/front_end/lib/src/fasta/kernel/body_builder.dart#newcode907 pkg/front_end/lib/src/fasta/kernel/body_builder.dart:907: new KernelSuperMethodInvocation(node.name, node.arguments, target) On 2017/06/26 18:57:55, Paul Berry ...
3 years, 5 months ago (2017-06-26 19:47:53 UTC) #6
Paul Berry
3 years, 5 months ago (2017-06-27 20:50:17 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/2954403002/diff/1/pkg/front_end/lib/src/fasta...
File pkg/front_end/lib/src/fasta/kernel/body_builder.dart (right):

https://codereview.chromium.org/2954403002/diff/1/pkg/front_end/lib/src/fasta...
pkg/front_end/lib/src/fasta/kernel/body_builder.dart:907: new
KernelSuperMethodInvocation(node.name, node.arguments, target)
On 2017/06/26 19:47:53, Siggi Cherem (dart-lang) wrote:
> On 2017/06/26 18:57:55, Paul Berry wrote:
> > Peter, can you confirm that passing `target` is the correct thing to do
here?
> 
> DBC - the answer might change in the near future when we address
> https://github.com/dart-lang/sdk/issues/30000. I expect we will generate
> super-calls with a null target on purpose in those cases.

Thanks for the heads up.  I'm adding a test case to make sure type inference
won't break in those cases (https://codereview.chromium.org/2958113002/).

Powered by Google App Engine
This is Rietveld 408576698