|
|
Implement simple dynamic type check.
The generated code for the test is:
(before)
$.isTrue(typeof x === 'object' && !!x.is$Hest, (void 0));
$.isFalse(typeof x === 'object' && !!x.is$Hest, (void 0));
(with patch)
$.setRuntimeTypeInfo(x, ({X: 'int'}));
var t0 = $.getRuntimeTypeInfo(x);
$.isTrue(typeof x === 'object' && !!x.is$Hest && typeof t0 === 'object' && t0.X === 'int', (void 0));
var t1 = $.getRuntimeTypeInfo(x);
$.isFalse(typeof x === 'object' && !!x.is$Hest && typeof t1 === 'object' && t1.X === 'String', (void 0));
Committed: https://code.google.com/p/dart/source/detail?r=7184
Total comments: 35
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+198 lines, -43 lines) |
Patch |
 |
M |
frog/tests/leg/mock_compiler.dart
|
View
|
1
2
3
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
frog/tests/leg/parser_helper.dart
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
frog/tests/leg_only/src/GenericsIsCheck1Test.dart
|
View
|
|
1 chunk |
+12 lines, -0 lines |
7 comments
|
Download
|
 |
M |
lib/compiler/implementation/elements/elements.dart
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/compiler/implementation/lib/js_helper.dart
|
View
|
1
2
3
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
lib/compiler/implementation/ssa/builder.dart
|
View
|
1
2
3
|
6 chunks |
+97 lines, -23 lines |
14 comments
|
Download
|
 |
M |
lib/compiler/implementation/ssa/codegen.dart
|
View
|
1
2
3
|
2 chunks |
+17 lines, -4 lines |
2 comments
|
Download
|
 |
M |
lib/compiler/implementation/ssa/nodes.dart
|
View
|
1
2
3
|
1 chunk |
+10 lines, -4 lines |
8 comments
|
Download
|
 |
M |
lib/compiler/implementation/ssa/optimize.dart
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
lib/compiler/implementation/ssa/ssa.dart
|
View
|
1
2
|
1 chunk |
+27 lines, -0 lines |
4 comments
|
Download
|
 |
M |
lib/compiler/implementation/ssa/tracer.dart
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
lib/compiler/implementation/typechecker.dart
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/compiler/implementation/universe.dart
|
View
|
1
2
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
tests/co19/co19-leg.status
|
View
|
1
2
|
3 chunks |
+10 lines, -3 lines |
0 comments
|
Download
|
 |
M |
tests/utils/dummy_compiler_test.dart
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
Total messages: 5 (0 generated)
|