Sam Rawlins
462170a86c
Remove unused imports with shared prefixes
...
The analyzer will start reporting these when
https://github.com/dart-lang/sdk/issues/38784 is fixed.
Change-Id: Id7488449e90104eeac65d64095c1ee5a5bfbb469
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172902
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-19 18:02:54 +00:00
Stephen Adams
82637793bf
[dart2js] List.generate tweaks
...
- Use 'isBoundsSafe' property of `[]=` to avoid a bounds check.
- Accept closures with a block containing a single return statement.
Change-Id: I97db02dae14d926345487e863fdb4a1513ab773b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171804
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2020-11-13 19:04:00 +00:00
Johnni Winther
7b89827956
[cfe] Support bit mask for enabling specific late lowerings
...
TEST=pkg/front_end/testcases/late_lowering/late_lowering_bitmasks.dart
Closes #43993
Change-Id: I47d238dd7cf0ea22983a38bed86e415330070596
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171580
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-11-11 14:06:30 +00:00
Stephen Adams
8c13fa841e
[dart2js] Kernel transformer expansion for List.generate
...
Simple calls to `List.generate` are expanded into a list allocation
and a loop. This generates better code for several reasons:
- There is no overhead for the function argument (closure allocation,
closure type, closure class)
- Global type inference is more precise since each List.generate list
is tracked separately, and the assignments in the loop give better
inference to the collection's element type.
To get precise element type inference, there are two new JSArray
constructors. Global type inference starts with the element type being
bottom for these elements, avoiding spurious nulls in the inferred
type.
Change-Id: I5efb90651ae3f9eb2e81af556704960cdf0b75c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168770
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-11 04:27:22 +00:00
Dmitry Stefantsov
d54e2bb568
[cfe,ddc,dart2js,vm] Add NullType
...
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/170342/
* https://dart-review.googlesource.com/c/sdk/+/170344/
* https://dart-review.googlesource.com/c/sdk/+/170345/
* https://dart-review.googlesource.com/c/sdk/+/170346/
* https://dart-review.googlesource.com/c/sdk/+/170347/
The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.
Closes #40122 .
TEST=Verified by changes in .expect files in pkg/vm/.
Bug: https://github.com/dart-lang/sdk/issues/40122
Change-Id: Ib8197802fdc69694387ae47ac990c58b3aaab7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170689
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-06 12:43:52 +00:00
Johnni Winther
d70796bae8
[kernel] Add caching ability to StaticTypeContext
...
Dart2js is changed to use the caching scheme in preparation for dart2js
to use the static types computed by the CFE instead its own custom
static type computation.
Change-Id: I1d45eda2f67ce4b23d669ec49e476ee357b37fc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166845
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-10-30 17:55:21 +00:00
Srujan Gaddam
ed009afc4c
[package:js] Add static errors for invalid extends
...
Bug: https://github.com/dart-lang/sdk/issues/37896
dart2js disallows JS interop classes from extending Dart classes,
and ddc does not work as expected. Dart classes that extends JS
interop classes can't be declared in ddc and throw an error on
usage in dart2js. This CL adds static errors for both cases.
Change-Id: I72001d2e8bec046c0e1ab4c06fed8fcf84ade259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164840
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-10-28 16:04:15 +00:00
Jens Johansen
ae5fc78992
[kernel] Remove 'addMember'
...
Most of the time one already knows at the call site if it's a Field,
a Procedure etc --- so use that instead.
For now I'll leave the corresponding getters that are basically
documented as "don't use" ("[...] for convenience, not efficiency.
Consider manually iterating the members [...]").
Change-Id: Ib732759432c62963e6645f85f6df301c4281df9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168826
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-27 11:36:58 +00:00
Johnni Winther
b42f954364
[cfe] Use experiment release version when non-nullable is enabled explicitly
...
Even when non-nullable is enabled by default, enabling the experiment
explicitly should result in the experiment release version (and not
the experiment enabled version) to be used for opting in.
For this change, the semantics of parseExperimentalFlags was change
to _not_ normalize the flags to a full mapping including default values.
For this reason all uses of such maps are renamed to
'explicitExperimentalFlags'.
Closes #43879
Change-Id: I0d0262e68ec1403549abcfd305ae3a4404fe93e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168654
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-22 06:17:39 +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
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
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
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
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
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
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
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
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
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
Mayank Patke
ca743398c2
Ensure CFE provides correct setter name to instantiateInvocation.
...
All of the backends (dart2js, DDC, VM) were checking if the invocation
name was tagged with "set:" and appending "=" to the name if so.
Instead, we can simply have the CFE perform this logic at the callsite.
Note that the name of the setter itself is still unchanged. Backends may
still need to generate the correct name themselves when handling NSMs
via code paths other than instantiateInvocation.
Change-Id: Iae42c849d3557be3e3b77c3af6f3993347ba0b6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156142
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2020-07-30 06:21:20 +00:00
Mark Zhou
0ef03fdc82
[dart2js] Adding null-safe semantics for static fields.
...
* Adds a bool `isNonNullableByDefault` field to Library entities.
* Adds a bool `usesNonNullableInitialization` to the JS emitter's StaticField.
* Emits two lazy-variable initialization functions: one for
pre-null-safety and one for post
New issues:
* Always emits both lazy init functions - even when only one is ever used.
Fixes #42419
Change-Id: I6a76798946b13842fbb2ad566d4505bbcd9ca0d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156063
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2020-07-29 18:39:25 +00:00
Mayank Patke
4fcd77cbf3
[dart2js] Ensure setter Invocation names end with "=".
...
This is the same approach DDC and the VM take. Longer term, it may make
sense to move this logic into the CFE.
Change-Id: I9118747f187ca7bfa7eabe74d45e69a8c4cf240c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155823
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2020-07-24 19:28:35 +00:00
Srujan Gaddam
7c40665f91
[package:js] Add static errors for named parameters and tests
...
Adds error for named params in JS interop functions, static error
tests, and removes redundant code from dart2js.
Change-Id: Ie16ebdd7a816983c1250579ea346e31e77227112
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154752
Commit-Queue: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-07-20 20:27:07 +00:00
Mayank Patke
5c99205769
[dart2js] Support required named parameters in weak NNBD function types.
...
We cannot simply discard the `required` modifier in weak mode function
types since function types that differ in the placement of `required`
cannot compare equal. Instead, we do that during subtype checks.
We continue to ignore `required` in the actual calling convention in
weak mode.
Change-Id: I7dbb28550095c635f65592f78e495e8e4e8d7026
Fixes: https://github.com/dart-lang/sdk/issues/42608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153386
Reviewed-by: Mark Zhou <markzipan@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2020-07-07 21:00:40 +00:00
Johnni Winther
b6a0c50bf6
[dart2js] Support conversion of local function type variables from K to J model
...
This CL adds support for converting local function type variables from
the K model to the J model. The entity use for the J model type variables
isn't created before the closure classes and closure call methods have
been created. Therefore, the [ClosureData] is now registered
with the [JsToFrontendMap] object, once computed, allowing conversion of
local function type variables. Conversion of [BackendUsage] is moved
after closure creation because [RuntimeTypeUse] can refer to local
function type variables.
Closes #42088
Change-Id: Ifc00e69b5db0dd05710ea97017c41e8c7f5e520e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153080
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-07-07 06:46:21 +00:00
Sigmund Cherem
be0f94b218
[dart2js] include dart:_js_annotations into the platform file by default
...
Change-Id: I7d93347cc41e344213a5c62f72638d4d2fd18728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153366
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2020-07-06 21:41:02 +00:00
Mark Zhou
b4c60e6e1c
[dart2js] Removing switch class restrictions.
...
From the spec: `It is no longer required that the [case expression] evaluate to instances of the same class.`
Fixes #42409
Change-Id: Ieecd96cb75d683658ffc767d973b0ff2f5e6d834
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153060
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2020-07-06 19:12:51 +00:00
Mayank Patke
cf62339751
[dart2js] Ensure type arguments are passed when invoking a generic
...
function property.
Change-Id: I387977e2f1fb7732d94331b7a97cceeec767aaae
Bug: https://github.com/dart-lang/sdk/issues/41449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151301
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2020-06-24 20:12:39 +00:00
Dmitry Stefantsov
929d5e4a98
[cfe,ddc,dart2js,vm] Add FutureOrType
...
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/149297/
* https://dart-review.googlesource.com/c/sdk/+/149299/
* https://dart-review.googlesource.com/c/sdk/+/149320/
* https://dart-review.googlesource.com/c/sdk/+/149321/
* https://dart-review.googlesource.com/c/sdk/+/149323/
The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.
Closes #40123 .
Bug: https://github.com/dart-lang/sdk/issues/40123
Change-Id: Ice52250a98acfe455b1d7fa5bb0624c115ca5dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150934
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-06-15 12:18:46 +00:00
Mayank Patke
9f6510b31b
[dart2js] Replace accesses to options.nullSafetyMode with
...
`options.useLegacySubtyping` where possible.
Change-Id: I462044e536f061cc0c67b044b986494801f58e1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150765
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2020-06-11 17:35:41 +00:00
Harry Terkelsen
54fe29e965
support @JS annotation from SDK
...
Attempt at fixing https://github.com/dart-lang/sdk/issues/39740 to allow the flutter web engine to use @JS
interop to avoid the overhead of the SDK available js interop.
Bug: 39740
Change-Id: I7ba9c8981e639cd267bee3086ba900b89bfc0d6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150501
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Harry Terkelsen <het@google.com >
2020-06-09 17:10:15 +00:00
Stephen Adams
e3fac1dde2
[dart2js] Remove Options.useNewRti
...
Change-Id: Ib959cddf7929e2e5d6f3e514e718976fd0135b7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150473
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2020-06-09 17:01:55 +00:00
Joshua Litt
f9f1ca6171
[dart2js] Create tests/dart2js for nnbd.
...
Change-Id: Ib8721cf976803d8d1b9d723b7e691e344c768b67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149881
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2020-06-09 16:53:15 +00:00
Joshua Litt
451694e855
[dart2js] Move dart2js_native to dart2js/native.
...
Change-Id: I2f879fe18376b8c1b82fc201d488425dc154d2b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149341
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Joshua Litt <joshualitt@google.com >
2020-06-04 18:11:49 +00:00
Joshua Litt
05ca544f15
[dart2js] Move tests/compiler/dart2js_extra to tests/dart2js_2.
...
Change-Id: Iaa0ca2b4f2d1b15f79ddca37834d3ed2497bc068
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149242
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-06-03 15:15:30 +00:00
Johnni Winther
3a021a6545
[cfe] Remove EvaluationMode.legacy
...
This is no longer valid. Since the SDK is agnostic we should default to weak mode.
Change-Id: Ia9fbf911e7ebb595c93a71afe3bb8de7495cebba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149065
Reviewed-by: Jens Johansen <jensj@google.com >
2020-05-30 09:47:02 +00:00
Mayank Patke
bbb8923ebb
[dart2js] Ensure all top/raw type predicates go through DartTypes.
...
Conceptually, this makes sense because a type is not intrinsically top
or bottom or raw, but only in the context of a type system. This also
makes these predicates much more maintainable and puts them in a form
identical to the one at the RTI level.
Change-Id: I83154a82cef6cbaa9c4d0f27cb95f01473c1e015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149049
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2020-05-27 05:28:03 +00:00
Mayank Patke
d1546cac87
[dart2js] Make diagnostic message arguments strongly typed.
...
We were passing arguments as just a `Map` and forcing the Message to
handle the String conversion, but the caller is much better equipped to
do it and prevents the dynamic typing.
Change-Id: Icc4ab91edf233b81a64aa3b03462b541349fa751
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149048
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-05-27 05:28:03 +00:00
Mayank Patke
46dc9fb9a7
[dart2js] Set NNBD mode based on entry point.
...
Tested with https://github.com/dart-lang/null_safety_sample_package/ .
Change-Id: Icecbee11da44eb9eb9cb3eb36f905f4a7126996b
Bug: https://github.com/dart-lang/sdk/issues/41208
Fixes: https://github.com/dart-lang/sdk/issues/41208
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148580
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-05-26 22:08:52 +00:00
Mayank Patke
e16b45c550
[dart2js] Add --nnbd-strong SDK.
...
Change-Id: I31bfdfd3f2cfe04a940bc9374d88da53dbfc0090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148150
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2020-05-15 00:37:45 +00:00
Johnni Winther
a35a42e408
[dart2js] Support pseudo-conflicting supertypes
...
Closes #41576
Closes #41696
Change-Id: Ibb650c49ce8cf6b5a279d0c4790f976a54db0f40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145780
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-05-01 20:31:35 +00:00
Joshua Litt
364a2ac7d5
[dart2js] Fix cfe_annotations_test nnbd.
...
Change-Id: I00c32a74bd8995fe40b88f75c2a1431e04f927d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144993
Commit-Queue: Joshua Litt <joshualitt@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-05-01 20:07:44 +00:00