Commit Graph

4835 Commits

Author SHA1 Message Date
Stephen Adams dfc411cb90 [dart2js] global type analysis for unreachable closure calls
The return value of a closure call on `null` or bottom should be
bottom.

Change-Id: I4520a8d6b13575172cf5407b0fbcbaa0b6be5e63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162384
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-09-12 00:05:35 +00:00
Mayank Patke 6e30428829 [dart2js] Add tests for https://dart-review.googlesource.com/c/sdk/+/162420.
Change-Id: Ifc4f060a72dc273d130ba33d5f61cd4c7e014fdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162580
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-09-11 22:53:35 +00:00
Stephen Adams 8d68480746 [dart2js] Fix global type analysis
https://github.com/dart-lang/sdk/issues/43366

Fixed: 43366
Change-Id: Iac8247c31fa268186c8f2e3f52e0be1cac062598
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162247
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-09-11 04:07:41 +00:00
Mayank Patke 39b9a76323 [dart2js] Ensure generator return types are included in closure RTI need
computation.

This fixes the failure on
https://dart-review.googlesource.com/c/sdk/+/73360.

Change-Id: I5f082307abf7e93038d5c03ee54015c59c6b3564
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162420
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-09-11 00:38:01 +00:00
Johnni Winther 082295a61e [cfe] Support lowering of static fields with initializers
This adds support lowering the encoding of top-level/static fields
with initializers as if they were marked as late fields. This ensures
that LateInitialization is thrown if final fields are written to during
initialization.

Closes #42956

Change-Id: I488fdddd87ebd935a0cdaf82a724e9b87d5f91ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160724
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-01 07:20:58 +00:00
Christian Altamirano c026589e69 [dart2js] Added interceptor bits to powerset domain
Change-Id: Ia949732ffd431461eb8dc9f14bf398bc85b71dff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160800
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-29 02:14:13 +00:00
Stephen Adams c1cbcdc52a [dart2js] Removed redundant check from canUseSelfForInterceptor
Change-Id: I4bc4ea014b6390d1d925598877a7ff010c37eb3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160700
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-28 22:00:23 +00:00
Stephen Adams 0be0517f4f [dart2js] Add AbstractValueDomain.isTruthy
In spec-mode, conditions are forced to be true/false if necessary by a
HBoolConversion check. The refined output of HBoolConversion can be a
constant, allowing a branch of an if-then-else to be deleted.

If production-mode (-O3), this check is omitted, making it possible
for `null` and other values to flow to the condition. Without the
refinement of the HBoolConversion, the abstract value might not even
be a constant. To enable a branch of the if-then-else to be deleted as
an optimization (i.e. without changing the behaviour), we need to be
able to predict the JavaScript interpretation of the condition.

Change-Id: I44200adb7270a3feb26ce110ad4930cfa127f8c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160402
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-28 17:16:38 +00:00
Stephen Adams 6fcd615a26 [dart2js] Fill out PowersetBitsDomain.createFromStaticType
Change-Id: I5488873a619aa4727c6890fb7680a1eb15817f6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160706
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-27 23:28:57 +00:00
Joshua Litt c086f08285 [dart2js] Add regression test for #35311.
Change-Id: Ia3069fc10800debefa74d53bd987a06ada04df50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160702
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-08-27 23:26:47 +00:00
Stephen Adams fd44ff7229 [dart2js] Prettier printing of powerset values
Print the bits with names, e.g.

    {null,other}[null|exact=JSString]
    {true,false}[exact=JSBool]

Change-Id: I4e940ae903329ca550ea9ff4afebd6eb59c0d62d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160480
Reviewed-by: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-27 04:16:39 +00:00
Stephen Adams a64a453bf9 [dart2js] Don't call isJsIndexableAndIterable with null
Change-Id: I50a50dbe8f68c7f3408b421589b8a7fd5ea5f151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160442
Reviewed-by: Christian Altamirano <coam@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-27 02:40:58 +00:00
Joshua Litt 29c0795f48 [dart2js] Flip new deferred split flag.
Change-Id: Ifa795b96f2d2fa685072f314508b761b77a39bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160161
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-08-26 23:17:05 +00:00
Christian Altamirano d52fd7d0d6 [dart2js] Implemented map that stores powerset bits for classes
Added a ClassInfo struct that stores bits for class, strict subclasses and strict subtypes.
This map is initialized empty and lazily computes the bits using the method computeClassInfo.
This function recursively traverses the class hierarchy only when needed, computes the bits on the fly and stores it.
Since the class hierarchy is a DAG, this recursive method terminates.
This map will also be used for some queries, which are now exercised in the new test

Change-Id: I0b8b0b34b5c7d5cc3c1608266c9795033351e650
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160040
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Christian Altamirano <coam@google.com>
2020-08-26 20:44:05 +00:00
Stephen Adams 52f1502191 [dart2js] Strengthen HBoolConversion in types_propagation
Change-Id: I811cc43b21990eea79f97e65a7681661af0cef8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160344
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-26 19:32:05 +00:00
Mayank Patke e87da8671d [dart2js] Future-proof powerset domain.
This rewrites a couple of operations so that as few changes are required
when adding new bits.

Change-Id: I50174fa250d1bc968770782e00a18c598f28a399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160083
Reviewed-by: Christian Altamirano <coam@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-08-26 00:45:53 +00:00
Mayank Patke cec4ad8546 [dart2js] Improve some predicates on precise powersets.
Change-Id: I8c1135e10a2ac96ba508015aae2d17f7c202a2c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160082
Reviewed-by: Christian Altamirano <coam@google.com>
2020-08-26 00:45:53 +00:00
Joshua Litt e8909fb29a [dart2js] Ignore specific impacts in deferred_load.
Change-Id: Ide1f6b26e523c802119412f7df8da54b4681f8b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158640
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-25 18:50:33 +00:00
Mayank Patke 3e15656b3e [dart2js] Clean up some powerset domain operations.
Addresses some remaining comments on
https://dart-review.googlesource.com/c/sdk/+/158580

Change-Id: Ib6d58ac78ff31356fb79771b84c74c0ce9b7e391
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159588
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Christian Altamirano <coam@google.com>
2020-08-25 12:15:29 +00:00
Stephen Adams 25c8f46d12 [dart2js] Validation of key interceptors should ignore static members
Change-Id: Ibe3ebac1e9ee078ffc56e4660c9e17cc335f536e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160021
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-25 03:18:08 +00:00
Christian Altamirano 0aee60dd20 [dart2js] Fixed some queries in the powerset bits domain
The queries of the form is<Something>OrNull actually require the value to be <Something> allowing also null.

Change-Id: I869d4364b56ec56ef09dc962abda0530546a9678
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159980
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Christian Altamirano <coam@google.com>
2020-08-24 22:19:57 +00:00
Christian Altamirano 51cd4cb3d6 [dart2js] Implemented constant value query for powerset domain
This fixes the issue with the compiler when the powerset flag is on.
Now the powersetBits test works

Change-Id: I8e63b986a7dafb8937b93303cebe304f79bddabf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159800
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-23 23:21:55 +00:00
Christian Altamirano 42dec58c01 [dart2js] Added powerset bits API and implemented most powerset queries
Change-Id: I3d0940df76e66049f3bd545b1a53dbe6036b4df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158580
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-21 18:10:00 +00:00
Joshua Litt 1e1f407553 [dart2js] Correctly output class types when they are shadowed.
Change-Id: Ie0889a6312aa9f885059873dd8cb2debde64f2cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158724
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-20 22:48:04 +00:00
Stephen Adams ae462475f9 [dart2js] Try to preserve precision of bools in inferrer.
Use abstract type of constant for BoolConstantTypeInformation
as the AbstractValueDomain may have something more precise than 'bool'
for a true/false constant.

Evaluate short-circuit `&&` and `||` for constant inputs.
This can occur with named and -Dxxx= defined constants.

TODO: we should consider adding a node like a guarded-phi to
select an input, with possible boolean conversions on inputs.



Change-Id: I7f54503db87f6a6d2034ca59c16b4f1ff69ebbb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159323
Reviewed-by: Christian Altamirano <coam@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-20 18:26:59 +00:00
Devon Carew d26469f715 update the pubspec.yaml files to reflect actual package usage
Change-Id: I7a46c42dff3506cd5d09d3d793c072258e09a6e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159143
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-20 16:08:59 +00:00
Joshua Litt 23372198a7 [dart2js] Remove unnecessary line.
Change-Id: I7b1f16d156d9cc10fde378aa4b8d69ab66ca701a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158160
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-19 23:02:08 +00:00
Mayank Patke 1cec77f0a6 [dart2js] Fix impliedClasses logic during RTI resolution.
This code was inadvertently falling through to the `throw` if `VoidType`
was encountered (although this case currently never happens). In
addition, we were missing cases for some of the newer `DartType`s.

This CL fixes those cases and removes Object from the classes implied by
`DynamicType`.

Change-Id: Ibfecd92c0113d11eb8870d511d60cbc34ac1bfa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159020
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-18 23:20:00 +00:00
Stephen Adams e09249f97d [dart2js] Clean up old code in types_propagation
This code worked around bugs in how TypeMasks were generated 4+ years
ago. Now subtype cones are generated from the least upper bound of
instantiated subtypes, resulting in TypeMasks that are no longer
disjoint for 'double' and 'int'.

Change-Id: I7189c4447f2c41db7abb7a0ea1240eca6e28aa7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159000
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-18 16:56:10 +00:00
Mayank Patke 41953c8835 [dart2js] Rewrite lib/html/js_typed_interop_type_test to use external
fields.

This brings it more in line with the lib_2 version.

Change-Id: I99e4f6a467fa5b58d6e7c5206e1f6d9956fc60bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158961
Auto-Submit: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-18 15:46:20 +00:00
Mayank Patke bd672a90af [dart2js] Improve simplification of type tests.
Change-Id: I29fd8e32145df61816bf98dd9fdc2dac33cafc75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157662
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-18 09:14:10 +00:00
Mayank Patke e0c956065a [dart2js] Fix nullability handling in createFromStaticType.
Previously, we were creating nullable typemasks and then stripping off
the nullability if non-nullability was specified. We should be assuming
non-nullability as the default and adding nullability in if required.

The former approach has the issue that typemasks for `Null` keep getting
converted to empty typemasks when we try and remove the nullability.

Change-Id: I58907c1c45c756f023d67043ce88eb82c4b1589c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158371
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-18 09:14:10 +00:00
Stephen Adams d2057a0b57 [dart2js] Check non-nullable native call values
When `--null-assertions` is enabled, values returned from @Native
methods and getters with non-nullable return types are checked.

Change-Id: I4b38e651a9a6b370ebed5420a3cfac0a53cfeb60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158527
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-08-18 01:52:55 +00:00
Stephen Adams 6d2390ad8c [dart2js] Add some codegen metrics
- count decided conditions
- count various kinds of interceptor use

Change-Id: Iea8fde8555cfa7247ef78651fb11262e9295c876
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158503
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-08-18 01:52:05 +00:00
Jacob MacDonald 35e9e8f5b8 Support windows uris for multi roots, using nativeToUri instead of Uri.base.resolve
Specifically this allows passing the result of `someUri.toFilePath()` on windows as a multi-root.
These paths have drive letters which are not understood by `Uri.base.resolve`.

Change-Id: I66d452be1e1c6923e61c1843bdfbce83a7c12f94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158900
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2020-08-17 21:41:59 +00:00
Joshua Litt eab26cd2bd [dart2js] Flip flag to defer class types.
Change-Id: Ia1f913a01f2be006158967b145db3ee34b297cfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155660
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-17 20:25:09 +00:00
Joshua Litt c060abfa45 [dart2js] Add regression test for 43055.
Change-Id: Ia83ada924f63ae7d8dfbe034415e5fd8f241cd2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158680
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-15 00:01:00 +00:00
Stephen Adams 588f168164 [dart2js] Add framework for gathering Task metrics
Adds `--report-metrics` and `--report-all-metrics`.
These options print all the Metrics objects exposed by CompilerTask.

This CL has counts and durations and adds metrics to two tasks to
demonstrate the 'framework'. More task metrics will be implemented
as needed. As we do so, we will experiment to see if it is possible
to make it easier and more efficient collect metrics.

```
$ dart2js ... --report-metrics
Info: Metrics:
  type_inference.time: 1.429s
  deferred_load.time: 0.424s
...

$ dart2js ... --report-all-metrics
Info: Metrics:
  type_inference.time: 1.300s
  type_inference.time.analyze: 0.695s
  type_inference.time.refine1: 0.361s
  type_inference.time.refine2: 0.175s
  type_inference.count.exceededMaxChange: 5
  type_inference.count.overallRefines: 90827
  deferred_load.time: 0.270s
  deferred_load.hunkListElements: 1
```




Change-Id: I2ba66f65af604758b0cbd71a688133cb562e32ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156842
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-13 00:18:08 +00:00
Srujan Gaddam e51623f81a [package:js] Add errors for missing @JS on class
Adds errors for class members that have a @JS annotation but the
enclosing class does not.

Change-Id: Id693af71678510047a723863846d89aa29cebe26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157004
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-07 17:09:23 +00:00
Srujan Gaddam 57a522eaaf [dart2js] Allow multiple errors in native_test
native_test is set up so that it validates only one error per static
error. This CL allows multiple errors to be reported and validates
that all are reported.

Change-Id: I97e9abbfbd8273c0c436e44d08f5768eea3f7785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157663
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-07 17:09:23 +00:00
Joshua Litt d384b7a0a6 [dart2js] Gather only required classes in deferred_load.
Currently we are gathering classes for all supertypes, but we only need
to gather classes for applied mixins and super classes.

Change-Id: Ie55a6587b0bc9cacf5061a52d2d9a9ec5fdbf2eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156761
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-07 16:26:15 +00:00
Christian Altamirano 7689769bfc [dart2js] Started skeleton for a powerset abstract value domain
This is based on the wrapped version that also includes a bit integer.
Right now the methods use the old abstract value domain but will use the integer bits in later CLs.
Also added and updated a flag so that now there is one for a wrapped domain and another for a powerset domain..

Change-Id: Iab6b93584a9a644dfef92f689c4be8c42ce8076a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157620
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-07 16:01:55 +00:00
Jacob MacDonald b67d0531e4 Add multi root source provider for dart2js
Bug:https://github.com/dart-lang/sdk/issues/42932
Change-Id: I565b2900fca05d3b88fc24e4cfb46944ef1d4ae4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157475
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-07 00:34:29 +00:00
Joshua Litt e5af4c88e9 [dart2js] Defer loading of class types.
This cl implements deferred loading of class types. The bulk of the
logic is hidden behind a flag.

Change-Id: I7d5139eff72c7d29226a7e46c427c82fc5bda728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154580
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-08-06 18:07:02 +00:00
Mayank Patke fcd88b5b6d [dart2js] Remove late from final fields in
lib/html/js_typed_interop_type_test.

Also update the error produced when an interop type contains a
non-external member in case users run into it via a late field.

Change-Id: I5968f4c8b3a71a3d467412c4499524ec4cc9d838
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157161
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-08-05 23:40:05 +00:00
Mayank Patke 2f1711c798 [dart2js] Reuse SSA optimization for is-tests to optimize as-checks.
Change-Id: Ic33dec84e531f45522069032994d41862d923300
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156620
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-08-05 23:13:35 +00:00
Mayank Patke 909643dd65 [dart2js] Fix throwing lazy initializers.
If an initializer throws, the variable should be treated as
uninitialized so that the next access reevaluates the initializer.

Change-Id: I8428383a7f99527a915962f7be348f4f33b83163
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157040
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-08-04 23:03:31 +00:00
Srujan Gaddam 7bb0d1f39a [package:js] Add error for params in factories of anon classes
Adds a static error to check that factory constructors in anonymous
classes contain no positional parameters.

Change-Id: Iae7c5c1d9e2dc91390c85c58eb5e96718e808f9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156145
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-08-03 23:20:42 +00:00
Christian Altamirano 352262e630 Added a wrapped abstract value domain strategy:
It will be used as a base for the upcoming powerset abstract value domain
Tests that do not depend on the detailes of the TypeMask abstract value will be fixed in a follow-up CL

Change-Id: I42398504d7c09a0b7c3b3d6b0682e1e813ea4d1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154520
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-08-02 18:39:43 +00:00
Christian Altamirano 1d1a775620 [dart2js] Refactored readFromDataSource for TypeMask
This function only uses the CommonMasks and not the JClosedWorld.

Change-Id: I315da588612499324894dbecba7a7983de009ffb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156802
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-08-01 00:20:41 +00:00