Johnni Winther
82755aa303
Rename ClosedWorld to JClosedWorld and merge it with ClosedWorldRefiner
...
Change-Id: I858695194fe4b0dffb7c85a93e2d6bcc04dd6229
Reviewed-on: https://dart-review.googlesource.com/58022
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-04 09:22:41 +00:00
Johnni Winther
b58cc36ddc
Extract KClosedWorld from ClosedWorld.
...
Change-Id: I2db59cea5081fde2f0b35c6518d6b618df617ac1
Reviewed-on: https://dart-review.googlesource.com/57827
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-04 09:22:41 +00:00
Johnni Winther
b75da964ef
Move all type mask code to inferrer/typemasks and use it via an AbstractValueStrategy
...
Change-Id: Ib6f0089b0fee05488fea9295cbb5df944bb29d49
Reviewed-on: https://dart-review.googlesource.com/56980
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-31 16:15:32 +00:00
Johnni Winther
3dd70ce67b
Usa AbstractValue in the rest of ssa
...
Change-Id: Id29d7bdaaeaa0fb6dfd4f5fbba50468cd474cd8e
Reviewed-on: https://dart-review.googlesource.com/56664
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-31 07:26:52 +00:00
Peter von der Ahé
2514a67614
Import link.dart directly
...
I'd like to deprecate and remove the Link class,
as best as I can tell, it doesn't offer the same
performance benefits as I've seen on other platforms.
Fasta mostly uses "null" to represent empty lists, and
after the old dart2js front was deleted, there are few
uses remaining.
This CL makes it easier to find the remaining uses.
Change-Id: I73ac9b6b8b1bf5fed9669ae939cb3252cedbef0f
Reviewed-on: https://dart-review.googlesource.com/56781
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Peter von der Ahé <ahe@google.com >
2018-05-29 07:40:27 +00:00
Johnni Winther
0ec82e24ce
Avoid late creation of entities.
...
This changes has been reviewed as part of https://dart-review.googlesource.com/c/sdk/+/55898
Change-Id: I28d41110919a592499ee7b5b7605728638bd5ea2
Reviewed-on: https://dart-review.googlesource.com/56481
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-05-24 08:01:00 +00:00
Emily Fortuna
49d5ca3bb4
Switch to BigInt for ConstantValue.
...
Change-Id: I17eec094d794b1c4791d491ea523d284f9eae4ed
Reviewed-on: https://dart-review.googlesource.com/55500
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-22 01:04:41 +00:00
Johnni Winther
78f348b3d5
Don't export types/masks.dart from types/types.dart
...
To make uses of TypeMask explicit in the imports.
Change-Id: I7c0c2377b65720394dcda217e5e68a4e3f9a4e9c
Reviewed-on: https://dart-review.googlesource.com/55421
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-17 08:05:42 +00:00
Johnni Winther
54331b1c4b
Delete elements.dart and resolution_types.dart
...
Change-Id: Ib50dabdbeec72ebf443e85b51b818d9ed0602b4f
Reviewed-on: https://dart-review.googlesource.com/55221
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-16 09:54:18 +00:00
Johnni Winther
3fc7925894
Add impact_test
...
Change-Id: Ic607d69375d1ad41f6aac349822e47c7dbf77b5a
Reviewed-on: https://dart-review.googlesource.com/54906
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-15 13:53:56 +00:00
Johnni Winther
17e22dfcd3
Remove unneeded kernel tests and sourcemap old-frontend tests
...
Change-Id: Iaf9533a812df5c872f223bce17ec7127f0b46318
Reviewed-on: https://dart-review.googlesource.com/54200
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-09 07:55:08 +00:00
Johnni Winther
831a6ba598
Remove useOldFrontend testing from various tests
...
Change-Id: Iff97dd60756ae18cb0a3203cffd87c8da9e53757
Reviewed-on: https://dart-review.googlesource.com/53944
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-05-08 08:31:43 +00:00
Johnni Winther
4b53f7e0d2
Remove useOldFrontend testing from TypeEnvironment
...
Change-Id: I0d62b83073ce5c7008f85c0c32b74c9b70cc4eb0
Reviewed-on: https://dart-review.googlesource.com/53960
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-08 08:31:43 +00:00
Johnni Winther
b74bb147ce
Remove use of MockCompiler from type_test_helper
...
Change-Id: Ia3607574f0f01db833ecf5d72d6bc5087757c180
Reviewed-on: https://dart-review.googlesource.com/53800
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-07 10:07:40 +00:00
Johnni Winther
5e72411c5c
Add InstantiationConstantExpression/Value
...
Change-Id: I2f471560a076e79f944fa70000de4be50385ae18
Reviewed-on: https://dart-review.googlesource.com/52443
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-25 09:37:29 +00:00
Johnni Winther
7afa0812ee
Implement strong mode open world strategy.
...
Implements a new strategy for closed world computation that takes
the static type of the receiver into account when processing dynamic
calls.
For this to work, the J-model needs to only contain live members,
meaning queries can no longer assume that a J-model member exists for
instance for JSString.split because it might not be live.
This is the initial implementation which only uses
ir.MethodInvocation.invocationTarget. Later we will use the static
type of the expression on ir.MethodInvocation, ir.PropertyGet, and
ir.PropertySet.
Change-Id: I2dcc5a9148f27127d4e89c414a7d24f90f9cf2a4
Reviewed-on: https://dart-review.googlesource.com/48480
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-23 07:58:12 +00:00
Johnni Winther
4e6e68fca8
Update constant_expression_test to match CFE encoding
...
Closes #32511
Change-Id: I7a76bff6ed59023edbb4d678991d627b683ddf6f
Reviewed-on: https://dart-review.googlesource.com/52220
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-04-20 20:03:59 +00:00
Johnni Winther
395c96153b
Fix subtype/equals for function types with type variable return types.
...
Change-Id: I645f73cabc74c4a427eb100220b3ddcf7232b0a4
Reviewed-on: https://dart-review.googlesource.com/52101
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-04-20 19:21:59 +00:00
Aske Simon Christensen
f06118ef8f
Dart 2 fixes to various tests.
...
All fixes are related to the requirement that a concrete class must
implement its entire interface or have a non-trivial noSuchMethod
implementation.
Change-Id: I015e0565e5dd9cfa324c38bb43696e365c58329a
Reviewed-on: https://dart-review.googlesource.com/51880
Commit-Queue: Aske Simon Christensen <askesc@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2018-04-20 12:57:19 +00:00
Aske Simon Christensen
2b09c1efc0
Revert "Error on missing method implementation in non-abstract class"
...
This reverts commit 7cc55d0372 .
Reason for revert: More test fixes needed.
Change-Id: Ib36159184ffbd14ce3f7cca184ce2b8cdfec237c
Reviewed-on: https://dart-review.googlesource.com/51680
Reviewed-by: Aske Simon Christensen <askesc@google.com >
Commit-Queue: Aske Simon Christensen <askesc@google.com >
2018-04-18 17:27:22 +00:00
Aske Simon Christensen
7cc55d0372
Error on missing method implementation in non-abstract class
...
Closes https://github.com/dart-lang/sdk/issues/32013
Change-Id: I8f49d2640ef92a3d9d723969208cdb5f397e806d
Reviewed-on: https://dart-review.googlesource.com/43660
Commit-Queue: Aske Simon Christensen <askesc@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2018-04-18 14:39:09 +00:00
Johnni Winther
b1bc4ed2b5
Handle as in nested const constructors
...
Change-Id: I8ee105594022b7c64a3f1dd0228501b06f48cebe
Reviewed-on: https://dart-review.googlesource.com/51126
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-13 22:02:35 +00:00
Johnni Winther
91bbc798fa
Skip abstract forwarding stubs
...
Change-Id: If0c0967e55038d330fef48d97bc96a92b0f4b506
Reviewed-on: https://dart-review.googlesource.com/49860
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-10 07:48:39 +00:00
Sigmund Cherem
b430570364
dart2js: handle constant casts with type variable substitutions
...
Closes https://github.com/dart-lang/sdk/issues/32811
Change-Id: Ibf108405a3a36092a42902e5be806310a34c067c
Reviewed-on: https://dart-review.googlesource.com/49835
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-04-09 18:31:46 +00:00
Sigmund Cherem
0284fdab6b
dart2js: allow as expressions in constants
...
The CFE doesn't allow them explicitly yet, but implicit casts do show up by the
time we see them in dart2js.
Closes https://github.com/dart-lang/sdk/issues/32773
Change-Id: Idb566625ce7c8edc74a4eea0109491bd72357051
Reviewed-on: https://dart-review.googlesource.com/49801
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-04-06 00:46:30 +00:00
Johnni Winther
1dfb1c2f64
Implement Dart 2 static subtyping
...
Change-Id: I8b61b30d036e4e89d04b2704c265b5f6ebea9f47
Reviewed-on: https://dart-review.googlesource.com/49120
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-04 08:02:51 +00:00
Johnni Winther
1c8c84fcfd
Update kernel impact to match Dart 2 semantics.
...
Change-Id: Ia360bc42bd52ca9d81224a3ab1c4e4571451638f
Reviewed-on: https://dart-review.googlesource.com/48280
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-26 13:42:05 +00:00
Johnni Winther
5271cc4e81
Support FutureOr at runtime
...
Change-Id: I6d442ac160739490c2591367055aaa0ba0c00047
Reviewed-on: https://dart-review.googlesource.com/48143
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-26 12:54:58 +00:00
Johnni Winther
c3f177b8cc
Add FutureOr to dart2js static type system
...
Change-Id: I0e26c82fffaa41d2e3fc02ba4d2b253c3673ce1a
Reviewed-on: https://dart-review.googlesource.com/46260
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-19 11:50:55 +00:00
Sigmund Cherem
c438f8b3f4
Dart2js defaults to the new common front-end
...
Change-Id: Id0f69d258b010a746b56e259335185bcca7dafec
Reviewed-on: https://dart-review.googlesource.com/45143
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-13 19:25:59 +00:00
Johnni Winther
f69da8e36b
Move tests to /model/
...
Change-Id: I70fc06e51951eabbb123b4cf83a8e04ccb8f7eb6
Reviewed-on: https://dart-review.googlesource.com/44781
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 11:54:24 +00:00
Johnni Winther
a3964bd479
Only add type argument count to generic invocations.
...
Change-Id: Iee137f74002fea74189d23bff9f27515b4daf224
Reviewed-on: https://dart-review.googlesource.com/35926
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-07 12:18:31 +00:00