Commit Graph

264 Commits

Author SHA1 Message Date
Asger Feldthaus 69ed34a87d [kernel] Fix inferred return value in closures.
The return value of a closure would previously be merged
with the return value of its enclosing function.

Also rename returnValue => returnVariable for consistency
in the builder.

BUG=
R=kasperl@google.com

Review URL: https://chromereviews.googleplex.com/448917013 .
2016-06-13 12:53:01 +02:00
Asger Feldthaus 76b439cf15 [kernel] Track instance fields in type propagation.
R=kasperl@google.com

Review URL: https://chromereviews.googleplex.com/441497013 .
2016-06-10 09:59:18 +02:00
Asger Feldthaus 04e65980b7 [kernel] Properly output the type of fields in type propagation.
BUG=
R=kasperl@google.com

Review URL: https://chromereviews.googleplex.com/447997013 .
2016-06-09 14:19:24 +02:00
Asger Feldthaus d96b840b11 [kernel] Support constructor initializers in type propagation.
BUG=
R=kasperl@google.com

Review URL: https://chromereviews.googleplex.com/444207013 .
2016-06-09 13:56:49 +02:00
Asger Feldthaus 8186f220fc [kernel] Add type-based modeling of externals in type propagation.
BUG=
R=kasperl@google.com

Review URL: https://chromereviews.googleplex.com/444827013 .
2016-06-09 12:13:36 +02:00
Asger Feldthaus cf0aeb0f50 [kernel] Add delta-blue as a baselined testcase for type propagation.
BUG=
R=kasperl@google.com

Review URL: https://chromereviews.googleplex.com/447237013 .
2016-06-09 11:53:05 +02:00
Asger Feldthaus bd76a94541 [kernel] Test type propagation by comparing the output against a gold file.
This should help reviewers see how a change in type propagation affects
the current output.

There are currently only 3 tests with gold files.  We can add more tests
ongoing as more features are implemented.

The expected outputs contains a lot of wrong types because the backing
type propagation is not complete.

BUG=
R=kustermann@google.com

Review URL: https://chromereviews.googleplex.com/440487013 .
2016-06-08 13:06:17 +02:00
Asger Feldthaus a4656a204b [kernel] Incomplete global type propagation.
To make this more digestible, a lot of things are intentionally left
out from the implementation:
 - Some AST nodes, like super calls and await
 - Handling of externals
 - Avoidance of redundant variables in the constraint system

The solver is currently field-based, which is also something I plan to
change.

Suggested reading order:
- constraints.dart
- solver.dart
- canonicalizer.dart
- builder.dart
- visualizer.dart

R=kasperl@google.com

Review URL: https://chromereviews.googleplex.com/442937013 .
2016-06-03 16:22:36 +02:00
Asger Feldthaus c0c21cef23 [kernel] Add a tool for diagnosing where time is spent in the frontend.
BUG=
R=kmillikin@google.com, kustermann@google.com

Review URL: https://chromereviews.googleplex.com/442627013 .
2016-06-01 13:26:12 +02:00
Asger Feldthaus b61129ee84 [kernel] Support interface member resolution in class hierarchy.
This is useful for handling of externals in tree shaking and type
propagation.

BUG=
R=ahe@google.com

Review URL: https://chromereviews.googleplex.com/435947013 .
2016-05-27 11:25:00 +02:00
Asger Feldthaus 9e4e37a4ae [kernel] Add more convenience methods and tweak the behavior of toString().
Also contains a bugfix for a missing visitor call.

BUG=
R=ahe@google.com

Review URL: https://chromereviews.googleplex.com/438627013 .
2016-05-25 13:56:43 +02:00
Asger Feldthaus e340a3b0ac [kernel] Implement DartType.hashCode and add some tests.
BUG=
R=ahe@google.com

Review URL: https://chromereviews.googleplex.com/437757013 .
2016-05-25 13:09:59 +02:00
Asger Feldthaus 77d0b4b244 [kernel] Support member resolution in class hierarchy.
Review URL: https://chromereviews.googleplex.com/417107013 .
2016-05-09 14:12:40 +02:00
Asger Feldthaus 811a47d430 [kernel] Initial implementation of Dart Kernel.
Contains:
- Command-line tool
- Kernel AST
- Binary serialization
- Printing as text
- Frontend based on analyzer
- Class hierarchy and type algebra
2016-04-26 10:39:15 +02:00