|
Preserve type variables in closure conversion.
Summary:
Previously, we filled in all occurrences of captured type variables with either
"dynamic" or their bound, if they had one.
Now, we add extra type parameters to the top-level function corresponding to the
closure, and pass in the corresponding arguments as type arguments to the
"MakeClosure" operation.
Test Plan:
Updated [type_variables.dart] and added a new test case to it.
R=dmitryas@google.com
Committed: https://github.com/dart-lang/sdk/commit/4d7490c60959036b28ddd2b151a8247795261f97
Total comments: 34
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+191 lines, -150 lines) |
Patch |
|
M |
pkg/kernel/binary.md
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
pkg/kernel/lib/ast.dart
|
View
|
1
2
3
|
3 chunks |
+10 lines, -5 lines |
0 comments
|
Download
|
|
M |
pkg/kernel/lib/binary/ast_from_binary.dart
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
pkg/kernel/lib/binary/ast_to_binary.dart
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
pkg/kernel/lib/clone.dart
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
pkg/kernel/lib/text/ast_to_text.dart
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/kernel/lib/transformations/closure/converter.dart
|
View
|
1
2
|
6 chunks |
+34 lines, -41 lines |
0 comments
|
Download
|
|
M |
pkg/kernel/lib/transformations/closure/info.dart
|
View
|
1
2
|
3 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/kernel/test/closures/suite.dart
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
A |
pkg/kernel/test/closures_type_vars/closures_type_vars.status
|
View
|
1
2
3
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/kernel/test/closures_type_vars/suite.dart
|
View
|
|
1 chunk |
+19 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/kernel/test/closures_type_vars/testing.json
|
View
|
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/kernel/testcases/closures/field.dart.expect
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
pkg/kernel/testcases/closures/instance_tear_off.dart.expect
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
D |
pkg/kernel/testcases/closures/type_variables.dart
|
View
|
|
1 chunk |
+0 lines, -40 lines |
0 comments
|
Download
|
|
D |
pkg/kernel/testcases/closures/type_variables.dart.expect
|
View
|
|
1 chunk |
+0 lines, -50 lines |
0 comments
|
Download
|
|
A + |
pkg/kernel/testcases/closures_type_vars/type_variables.dart
|
View
|
|
2 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
|
A |
pkg/kernel/testcases/closures_type_vars/type_variables.dart.expect
|
View
|
1
2
|
1 chunk |
+60 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 14 (4 generated)
|