|
Reifier hookup
Hook the coercion reifier into the JS backend.
The principle observed changes in the output are from the downward type inference eliminating casts.
The coercion reifier changes in this CL in two ways.
The first is a relatively minor change to factor out the instrumented runtime calls. The reifier is now parameterized by a runtime object. If present, casts, wraps, and type object creation are delegated to the runtime. Otherwise the reifier just produces cast objects directly. The JS codegen always does the latter.
The larger change is an attempt to make the new AST nodes be resolved. This is principally done for the typedefs produced for casts - we're not using wrapping right now so I've left that for future if we want it. This is a bit painful - if we continue down this path I think I'll want to factor this out into a ResolvedAstBuilder or somesuch, but for now this seems to be working.
The rest of the changes are just plumbing in the coercion reifier and its dependencies into the js backend.
BUG=
R=jmesserly@google.com
Committed: https://github.com/dart-lang/dev_compiler/commit/91564690b106f330fda826535f55f685705662b5
Total comments: 8
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+575 lines, -318 lines) |
Patch |
 |
M |
lib/runtime/dart/_internal.js
|
View
|
1
2
|
7 chunks |
+26 lines, -6 lines |
0 comments
|
Download
|
 |
M |
lib/runtime/dart/_isolate_helper.js
|
View
|
1
2
|
5 chunks |
+8 lines, -7 lines |
0 comments
|
Download
|
 |
M |
lib/runtime/dart/_js_helper.js
|
View
|
1
2
|
8 chunks |
+12 lines, -10 lines |
0 comments
|
Download
|
 |
M |
lib/runtime/dart/async.js
|
View
|
1
2
|
36 chunks |
+92 lines, -36 lines |
0 comments
|
Download
|
 |
M |
lib/runtime/dart/collection.js
|
View
|
1
2
|
22 chunks |
+72 lines, -21 lines |
0 comments
|
Download
|
 |
M |
lib/runtime/dart/convert.js
|
View
|
1
2
|
7 chunks |
+10 lines, -7 lines |
0 comments
|
Download
|
 |
M |
lib/runtime/dart/core.js
|
View
|
|
14 chunks |
+18 lines, -18 lines |
0 comments
|
Download
|
 |
M |
lib/runtime/dart/isolate.js
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/runtime/dart/typed_data.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
lib/src/codegen/dart_codegen.dart
|
View
|
|
6 chunks |
+31 lines, -6 lines |
0 comments
|
Download
|
 |
M |
lib/src/codegen/js_codegen.dart
|
View
|
1
2
|
7 chunks |
+18 lines, -19 lines |
0 comments
|
Download
|
 |
M |
lib/src/codegen/reify_coercions.dart
|
View
|
1
2
|
22 chunks |
+155 lines, -56 lines |
0 comments
|
Download
|
 |
M |
test/codegen/expect/sunflower/sunflower.js
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/codegen_test.dart
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/_internal/iterable.dart
|
View
|
1
2
|
7 chunks |
+17 lines, -17 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/async_error.dart
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/broadcast_stream_controller.dart
|
View
|
1
2
|
2 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/future.dart
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/future_impl.dart
|
View
|
1
2
|
4 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/stream.dart
|
View
|
1
2
|
17 chunks |
+28 lines, -28 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/stream_impl.dart
|
View
|
1
2
|
3 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/stream_transformers.dart
|
View
|
1
2
|
2 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/timer.dart
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/async/zone.dart
|
View
|
1
2
|
4 chunks |
+18 lines, -18 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/c/c.dart
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/collection/splay_tree.dart
|
View
|
1
2
|
6 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/convert/json.dart
|
View
|
1
2
|
9 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
test/dart_codegen/expect/d/d.dart
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 5 (1 generated)
|