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

Issue 2942153002: Enable top level inference of instance property gets/sets. (Closed)

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

Description

Enable top level inference of instance property gets/sets. To facilitate experimentation, I've left the old code in place, but disabled it using a const bool `fullTopLevelInference`. The old code can be re-enabled by setting this bool to `false`. Once we are sure that we want to proceed with this approach, we can remove the old code. I believe that with this change, all expressions that can be type inferred inside a method body can now be type inferred at top level, provided that there are no circular dependencies. R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/953399512a5611ff103c7ef1f019e429d1a07d58

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+487 lines, -123 lines) Patch
M pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart View 2 chunks +21 lines, -6 lines 0 comments Download
M pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart View 2 chunks +7 lines, -8 lines 0 comments Download
M pkg/front_end/test/fasta/kompile.status View 1 chunk +6 lines, -0 lines 0 comments Download
D pkg/front_end/testcases/inference/infer_assign_to_property.dart View 1 chunk +0 lines, -29 lines 0 comments Download
D pkg/front_end/testcases/inference/infer_assign_to_property_custom.dart View 1 chunk +0 lines, -26 lines 0 comments Download
M pkg/front_end/testcases/inference/infer_assign_to_ref.dart View 1 chunk +0 lines, -3 lines 2 comments Download
M pkg/front_end/testcases/inference/infer_assign_to_ref.dart.strong.expect View 1 chunk +0 lines, -2 lines 0 comments Download
M pkg/front_end/testcases/inference/property_get_toplevel.dart View 1 chunk +0 lines, -8 lines 0 comments Download
M pkg/front_end/testcases/inference/property_get_toplevel.dart.direct.expect View 1 chunk +0 lines, -4 lines 0 comments Download
M pkg/front_end/testcases/inference/property_get_toplevel.dart.outline.expect View 1 chunk +0 lines, -4 lines 0 comments Download
M pkg/front_end/testcases/inference/property_get_toplevel.dart.strong.expect View 1 chunk +0 lines, -4 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_assign_to_property.dart View 1 chunk +21 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_assign_to_property.dart.direct.expect View 1 chunk +19 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_assign_to_property.dart.outline.expect View 1 chunk +19 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_assign_to_property.dart.strong.expect View 1 chunk +19 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart View 1 chunk +22 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.direct.expect View 1 chunk +24 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.outline.expect View 1 chunk +23 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect View 1 chunk +24 lines, -0 lines 0 comments Download
M pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart View 1 chunk +1 line, -2 lines 0 comments Download
M pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart.strong.expect View 1 chunk +1 line, -1 line 0 comments Download
A + pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart View 1 chunk +14 lines, -10 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.direct.expect View 1 chunk +32 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.outline.expect View 1 chunk +30 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart.strong.expect View 1 chunk +32 lines, -0 lines 0 comments Download
A + pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart View 1 chunk +13 lines, -10 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.direct.expect View 1 chunk +30 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.outline.expect View 1 chunk +27 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart.strong.expect View 1 chunk +30 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart View 1 chunk +21 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.direct.expect View 1 chunk +15 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.outline.expect View 1 chunk +15 lines, -0 lines 0 comments Download
A pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect View 1 chunk +15 lines, -0 lines 0 comments Download
A + pkg/front_end/testcases/inference_new/property_get_toplevel.dart View 1 chunk +4 lines, -4 lines 0 comments Download
A + pkg/front_end/testcases/inference_new/property_get_toplevel.dart.direct.expect View 0 chunks +-1 lines, --1 lines 0 comments Download
A + pkg/front_end/testcases/inference_new/property_get_toplevel.dart.outline.expect View 0 chunks +-1 lines, --1 lines 0 comments Download
A + pkg/front_end/testcases/inference_new/property_get_toplevel.dart.strong.expect View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Paul Berry
Including a lot of reviewers since I'm not sure who will be available next. I ...
3 years, 6 months ago (2017-06-16 03:10:39 UTC) #2
Siggi Cherem (dart-lang)
lgtm, neat! https://codereview.chromium.org/2942153002/diff/1/pkg/front_end/testcases/inference/infer_assign_to_ref.dart File pkg/front_end/testcases/inference/infer_assign_to_ref.dart (left): https://codereview.chromium.org/2942153002/diff/1/pkg/front_end/testcases/inference/infer_assign_to_ref.dart#oldcode14 pkg/front_end/testcases/inference/infer_assign_to_ref.dart:14: (/*error:TOP_LEVEL_UNSUPPORTED*/ a. /*@target=A::f*/ f = 1); I ...
3 years, 6 months ago (2017-06-16 03:40:03 UTC) #3
Paul Berry
https://codereview.chromium.org/2942153002/diff/1/pkg/front_end/testcases/inference/infer_assign_to_ref.dart File pkg/front_end/testcases/inference/infer_assign_to_ref.dart (left): https://codereview.chromium.org/2942153002/diff/1/pkg/front_end/testcases/inference/infer_assign_to_ref.dart#oldcode14 pkg/front_end/testcases/inference/infer_assign_to_ref.dart:14: (/*error:TOP_LEVEL_UNSUPPORTED*/ a. /*@target=A::f*/ f = 1); On 2017/06/16 03:40:03, ...
3 years, 6 months ago (2017-06-16 03:44:09 UTC) #4
Paul Berry
3 years, 6 months ago (2017-06-16 03:51:26 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
953399512a5611ff103c7ef1f019e429d1a07d58 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698