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

Issue 2618393002: Insert covariance checks in strong mode. (Closed)

Created:
3 years, 11 months ago by asgerf
Modified:
3 years, 11 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Insert covariance checks in strong mode. "Covariance checks" are checks on certain parameters, necessary due to the unsafe covariant subtyping rule for interface types. The new pass generates a checked entry point for each method with covariance checks. This entry point checks the parameters whose type cannot be trusted, and then calls the actual method implementation. Every typed call is then redirected to the checked entry point if the interface taget declares any parameters with unsafe types, unless the receiver is 'this'. Dynamic calls and covariant overrides are not addressed by this CL, these are still unchecked. BUG= R=kmillikin@google.com Committed: https://github.com/dart-lang/sdk/commit/70a4d169c03516bfa9a0b7824558ed33a9f7910a

Patch Set 1 #

Patch Set 2 : Merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+762 lines, -23 lines) Patch
M pkg/kernel/lib/class_hierarchy.dart View 1 chunk +9 lines, -0 lines 0 comments Download
M pkg/kernel/lib/target/vm.dart View 2 chunks +10 lines, -2 lines 0 comments Download
A pkg/kernel/lib/transformations/insert_covariance_checks.dart View 1 chunk +516 lines, -0 lines 0 comments Download
M pkg/kernel/lib/type_algebra.dart View 2 chunks +27 lines, -0 lines 0 comments Download
M pkg/kernel/lib/type_environment.dart View 1 chunk +15 lines, -0 lines 0 comments Download
M pkg/kernel/test/baseline_strong_mode_test.dart View 2 chunks +4 lines, -0 lines 0 comments Download
M pkg/kernel/testcases/closures/capture_closure.dart.expect View 1 1 chunk +1 line, -1 line 0 comments Download
M pkg/kernel/testcases/closures/capture_closure_parameter.dart.expect View 1 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/kernel/testcases/closures/named_closure.dart.expect View 1 1 chunk +1 line, -1 line 0 comments Download
M pkg/kernel/testcases/closures/type_variables.dart.expect View 1 1 chunk +1 line, -1 line 0 comments Download
A pkg/kernel/testcases/input/covariant_generic.dart View 1 chunk +45 lines, -0 lines 0 comments Download
A pkg/kernel/testcases/spec-mode/covariant_generic.baseline.txt View 1 chunk +38 lines, -0 lines 0 comments Download
M pkg/kernel/testcases/strong-mode/DeltaBlue.baseline.txt View 7 chunks +8 lines, -11 lines 0 comments Download
A pkg/kernel/testcases/strong-mode/covariant_generic.baseline.txt View 1 chunk +44 lines, -0 lines 0 comments Download
M pkg/kernel/testcases/strong-mode/optional.baseline.txt View 2 chunks +1 line, -2 lines 0 comments Download
M pkg/kernel/testcases/strong-mode/void-methods.baseline.txt View 2 chunks +2 lines, -3 lines 0 comments Download
A pkg/kernel/testcases/type-propagation/covariant_generic.baseline.txt View 1 chunk +38 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
asgerf
3 years, 11 months ago (2017-01-09 19:18:10 UTC) #2
Kevin Millikin (Google)
LGTM.
3 years, 11 months ago (2017-01-10 11:29:04 UTC) #3
asgerf
3 years, 11 months ago (2017-01-11 15:33:11 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
70a4d169c03516bfa9a0b7824558ed33a9f7910a (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698