Commit Graph

4698 Commits

Author SHA1 Message Date
Stephen Adams 8f3b2e1853 [dart2j2] Rewriting optimizations of bit operations
Various algebraic simplifications of bitwise operations.
Together they allow the Flutter Color class to be well optimized.

Change-Id: Icf7f4f14f77045f943cdec41c6a526a42c179538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150268
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2020-10-14 20:15:58 +00:00
Stephen Adams 8224b60a9c [dart2js] Recognize length argument to more list constructors
Recognize `List.filled` and `List.generate` and typed list constructors
as having a length argument as first argument.

Change-Id: I6f77ce3e38fa50d663f78432807f83aaccb93503
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163360
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-10-13 06:17:03 +00:00
Johnni Winther 8b07d1902c [kernel] Remove DirectPropertyGet/DirectPropertySet/DirectMethodInvocation
These nodes are no longer used.

Change-Id: I40c8df7376f0c40a4122c22d934fb3c6f6fd520d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165902
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-03 19:15:41 +00:00
Jens Johansen fc7de901ee [kernel] Make LogicalExpression operator an enum (and rename)
Change-Id: I6054e8e44133d2419582d74700c4223d51495978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165606
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-02 09:41:12 +00:00
Jens Johansen 8cdbfe947e [CFE] Remove contextChain from constant evaluator; don't use try-finally
Change-Id: If62e71ae1aee5b33d00a361e5221f871331407aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165603
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-02 09:37:56 +00:00
Mayank Patke b1bc7c73d5 [dart2js] Register findType static uses for constants.
We need to register `findType` with the codegen registry whenever we
construct a `TypeReference` so that the function is available at
runtime. We primarily do this whenever we encounter an `HLoadType`.
However, it's possible that we only construct a `TypeReference` during
constant emission, and therefore never register a static use.

We can use the `CodegenImpactTransformer` to register a static use for
`findType` whenever we encounter a `ConstantUse` whose value requires
it. These correspond to the uses of `_reifiedTypeNewRti` in the constant
emitter.

Change-Id: I93dade3c326f7e2c9d4806d8bdc2ee576a20d1c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165480
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-10-01 02:57:02 +00:00
Mayank Patke cea8843939 [dart2js] Ensure null safety experiment is enabled before inferring
sound null safety.

Change-Id: Idad92bcbad97623c7b2a6b9b3218052e877e6ffb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164941
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-09-30 00:00:18 +00:00
Johnni Winther fc158b1616 [dart2js] Evaluate implicit constants in scope visitor
Change-Id: I2351571a665c8ffff8e9d57649fbf42b483e747b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142983
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-09-29 20:13:08 +00:00
Srujan Gaddam c990450628 [package:js] Add checks for external keyword
Checks to see if a JS interop member is correctly annotated with
the `external` keyword. If it is not, it must be one of several
exceptions to be allowed.

This CL also changes static errors to first check for `JS` and
`external` before processing the member as a JS interop member.
This makes it clearer whether a member is a JS member.

Change-Id: I412eeafbfe8773847bfb9c864e4fb9b65e2d632a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158083
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-09-25 23:30:34 +00:00
Joshua Litt f767363767 [dart2js] Remove obsolete flags.
Removes 'new-deferred-split', 'no-new-deferred-split',
'report-invalid-deferred-types', 'defer-class-types', and
'no-defer-class-types'.

Change-Id: I8d7dd4500c776b2016697bf6c7342846041cc9fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164040
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-09-25 17:04:14 +00:00
Mayank Patke 5be3a355e7 [dart2js] Clean up --experimental-trust-js-interop-type-annotations
flag.

Change-Id: I8622e88afdd1fc3f65f36814eebc8e124de2bc25
Fixes: https://github.com/dart-lang/sdk/issues/43470
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164422
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-09-25 00:17:09 +00:00
Mayank Patke 7eeab86287 [dart2js] Consolidate constant folding logic for null is T.
Change-Id: Ie2a73528c215e2760257ce726d49efc7462ef62f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163900
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-09-24 20:01:57 +00:00
Mayank Patke cd118d19db [dart2js] Clean up useNullSafety option.
Change-Id: I300fc04daa28add93d2f15998fc972db69e153c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163880
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-09-24 20:01:57 +00:00
Mayank Patke fed7fcc0c8 [dart2js] Default useNullSafety flag to true.
More cleanup to follow.

Change-Id: I90a0679adc97d3ea3f89e20f5c7045158fd420ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157562
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-09-24 20:01:57 +00:00
Srujan Gaddam 04e2482696 [dart2js] Add null checks on JS() expressions
Bug: https://github.com/dart-lang/sdk/issues/42536

Adds null checks on `JS()` invocations in dart:html and related
libraries if the static type is non-nullable. Renames option to
enable this to be consistent with DDC and adds tests.

Change-Id: Ia8c170cf0e1e4135966f36b25a83ec62becad701
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163210
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-09-23 17:49:49 +00:00
Johnni Winther 5d8a9340ae [cfe] Add support for using backend defined sentinels in late lowering
Change-Id: Iabcd0c79fb8f09c9de99856e50518eb7ace38464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163860
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-09-23 08:07:26 +00:00
Stephen Adams 64939041f2 [dart2js] Make length-forwarding work with Arrays that have Rti
The type-tagging code was confusing the optimization, so we failed at:

    t1 = setRuntimeTypeInfo(new Array(size), type$.xxx);
    t2 = t1.length
-->
    t1 = setRuntimeTypeInfo(new Array(size), type$.xxx);
    t2 = size

Change-Id: Iba5442112aea18ee45b501f5ddded39637d61c85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163363
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-09-18 21:12:26 +00:00
Mayank Patke 4d9b3b54c6 [dart2js] Add support for LateInitializationError.
Change-Id: I15f2ec292096824a0c61026d4a8fcdd752456410
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163131
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-09-17 23:20:51 +00:00
Stephen Adams ec4ccb7051 [dart2js] Update inferrer with current List constructors
Use the 'growable:' argument or its absence to pick a better type for
List.of, List.from, List.generate, List.empty and List.filled.

Fixes a bug where it was assumed that List.filled was always fixed length.

Slightly better type analysis on some apps, but nothing that is measurable on benchmarks.

Change-Id: Ibe029a93488412956273fc981f626d33bd295386
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163132
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-09-17 20:37:53 +00:00
Johnni Winther f4501b6e83 Reland "[kernel] Rename Name.name to Name.text"
Including a deprecated getter to avoid breaking dependent code outside
the Dart repo.

Change-Id: I365957b7c2da6e0cb5c71eb8d2906b0dc6ff18ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163062
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-17 06:10:49 +00:00
Johnni Winther 644df9b9fb Revert "Reland: [kernel] Rename Name.name to Name.text"
This reverts commit c430a0ac0b.

Reason for revert: Will break flutter_frontend_server when rolled into google3

Original change's description:
> Reland: [kernel] Rename Name.name to Name.text
> 
> Change-Id: I5240b0ff09faf35184998920202d7600dc97766d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162746
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>

TBR=jensj@google.com,johnniwinther@google.com

Change-Id: Ib6961f49dd416171c5d5935c490d79d6f7be779e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162748
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-16 08:22:55 +00:00
Johnni Winther c430a0ac0b Reland: [kernel] Rename Name.name to Name.text
Change-Id: I5240b0ff09faf35184998920202d7600dc97766d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162746
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-16 07:42:42 +00:00
Stephen Adams 62987736e8 [dart2js] Add --experiment-unreachable-throw
If a method appears unreachable because a parameter is inferred
'[empty]', compile the body to a throw.

Playing with the flag found some cases where the inferrer was not
inferring parameters because the call sites are not visible in Kernel.
The first example is _isTestViaProperty, which is referenced as a raw
function. To fix this we consider RAW_DART_FUNCTION_REF to escape the
function. The inputs are now inferred to be TOP, and we can remove the
dynamic entry checks with 'trust' annotations.

Other cases are functions that are injected into generators by a
JavaScript-level transform. Annotate these to prevent bad codegen.



Change-Id: I991fe85936ffde6fc2c794f753171df141dde8f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162822
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-09-16 01:46:42 +00:00
Daco Harkes 7302e01a79 Revert "[kernel] Rename Name.name to Name.text"
This reverts commit 3ff8dd2f51.

Reason for revert: Fails all CI builders. Possibly something landed
in the mean time.

Original change's description:
> [kernel] Rename Name.name to Name.text
> 
> Change-Id: I93162fb387ba123b949e19a7829bd5614845b15d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162722
> Reviewed-by: Jens Johansen <jensj@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>

TBR=jensj@google.com,johnniwinther@google.com

Change-Id: I2ffe526dabf37ae09d5e4ab1fbe514925f6e8768
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162744
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-09-15 15:21:35 +00:00
Johnni Winther 3ff8dd2f51 [kernel] Rename Name.name to Name.text
Change-Id: I93162fb387ba123b949e19a7829bd5614845b15d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162722
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-15 14:27:22 +00:00
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
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
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