|
dart2js cps: Support function types in 'is' and 'as' operators.
The generated code uses different helpers than the SSA. In SSA, there are calls to buildFunctionType and _isTest. The CPS uses checkSubtypeOfRuntimeType, the "one size fits all" method we also use to test against type variable types.
When the function type has no type variables in it we could hoist the function type into a constant, but the constant system does not support type representation constants at the moment. But it seems like an optimization we may want to add later.
BUG=
R=karlklose@google.com
Committed: https://github.com/dart-lang/sdk/commit/fb38d61dba779be60a29026a6861430e439db940
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+95 lines, -689 lines) |
Patch |
|
M |
pkg/compiler/lib/src/compiler.dart
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart
|
View
|
|
3 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
View
|
1
2
3
|
3 chunks |
+5 lines, -9 lines |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/js_backend/backend.dart
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/js_backend/codegen/codegen.dart
|
View
|
|
3 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
|
M |
pkg/compiler/lib/src/ssa/builder.dart
|
View
|
|
1 chunk |
+1 line, -3 lines |
0 comments
|
Download
|
|
M |
sdk/lib/_internal/compiler/js_lib/js_rti.dart
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
tests/co19/co19-dart2js.status
|
View
|
1
|
4 chunks |
+2 lines, -56 lines |
0 comments
|
Download
|
|
M |
tests/compiler/dart2js_extra/dart2js_extra.status
|
View
|
|
1 chunk |
+2 lines, -32 lines |
0 comments
|
Download
|
|
M |
tests/compiler/dart2js_native/dart2js_native.status
|
View
|
|
4 chunks |
+1 line, -6 lines |
0 comments
|
Download
|
|
M |
tests/corelib/corelib.status
|
View
|
|
1 chunk |
+12 lines, -92 lines |
0 comments
|
Download
|
|
M |
tests/isolate/isolate.status
|
View
|
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
|
A |
tests/language/function_subtype3_test.dart
|
View
|
1
2
|
1 chunk |
+30 lines, -0 lines |
0 comments
|
Download
|
|
M |
tests/language/language_dart2js.status
|
View
|
|
13 chunks |
+9 lines, -303 lines |
0 comments
|
Download
|
|
M |
tests/lib/lib.status
|
View
|
|
3 chunks |
+3 lines, -135 lines |
0 comments
|
Download
|
|
M |
tests/standalone/standalone.status
|
View
|
|
2 chunks |
+0 lines, -39 lines |
0 comments
|
Download
|
Total messages: 6 (1 generated)
|