Commit Graph

2388 Commits

Author SHA1 Message Date
Mark Zhou 67a7aae567 [dartdevc] Adding logic for required named parameter runtime checks.
Change-Id: I9de1617f10306977f55807c1566630914503f830
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122720
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-30 21:17:13 +00:00
Nicholas Shahan f99a28407f [dartdevc] Temporarily run NNBD tests with a "hybrid" SDK
- Adds a temporary modular test suite to prevent regressions on NNBD tests.
- New modular tests build the standard SDK with the dart:_runtime library from
  the NNBD fork.
- Unblocks DDC development while the forked SDK is in a state that does not
  build.

Change-Id: If422f5d19237f9d11e26aad503f1be960b331c57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123541
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-30 20:10:13 +00:00
Anna Gringauze 33274b6fae [dartdevc] removed unnecessary '.bind(this)' + added doc comments.
Bug https://github.com/dart-lang/sdk/issues/38896

Change-Id: If5399c19c178e7b379d7827bde1277c2bf18062e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123470
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-10-30 18:18:01 +00:00
Anna Gringauze 32c212e3eb [dartdevc] Add binding to 'this' for spread and 'yield' expressions
DDC does not generate correct bindings for async operations in spread,
 resulting in errors on member accesses.

```
class A {
    m1() => [1, 2];
    Future run() async {
      return [await null, ...m1()];
    }
}
```

Another case with yield:

```
class C {
    List<int> m2() => [1, 2];

    Future run() async {
      return await run3().toList();
    }

    Stream<int> run3() async* {
      for(var k in [... await m2()])
        yield k;
    }
}
```

Fixes #38896

Change-Id: I6ea28080414e5843ab647516cc223fd218f8c17e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123465
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2019-10-29 21:20:26 +00:00
Dmitry Stefantsov 9910fa8454 [cfe] Implement the first part of NNBD-aware isSubtypeOf
This CL is a squashing of the following smaller CLs:

* https://dart-review.googlesource.com/c/sdk/+/120669/
* https://dart-review.googlesource.com/c/sdk/+/120670/
* https://dart-review.googlesource.com/c/sdk/+/121331/
* https://dart-review.googlesource.com/c/sdk/+/121381/
* https://dart-review.googlesource.com/c/sdk/+/121383/
* https://dart-review.googlesource.com/c/sdk/+/121620/
* https://dart-review.googlesource.com/c/sdk/+/121707/
* https://dart-review.googlesource.com/c/sdk/+/122144/
* https://dart-review.googlesource.com/c/sdk/+/122360/
* https://dart-review.googlesource.com/c/sdk/+/122381/
* https://dart-review.googlesource.com/c/sdk/+/122783/
* https://dart-review.googlesource.com/c/sdk/+/122787/

Change-Id: I9d850f531f0fce07055ff9b5cd39abb605752005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122868
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-25 16:37:39 +00:00
Konstantin Shcheglov 80b0aaf9b8 Deprecate FunctionTypeAliasElement.instantiate2(), replace with instantiate().
Change-Id: Iead94143fb3d02536309e464039493981cf853d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122965
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-25 14:38:50 +00:00
Mark Zhou e1f972cb86 Reland "[dartdevc] Making multi-root paths consistently use url-relative path separators."
This is a reland of eafe8b04c0

Original change's description:
> [dartdevc] Making multi-root paths consistently use url-relative path separators.
> 
> Fixes #38802
> 
> Change-Id: I8b0e9525d0be9a00b9189d673f2881d432de4b66
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122419
> Auto-Submit: Mark Zhou <markzipan@google.com>
> Reviewed-by: Jake Macdonald <jakemac@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

Change-Id: Ie5a6cb2c73ef1411dd73e12109bd406908aa5fb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122660
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-10-23 18:16:55 +00:00
Martin Kustermann e82fedc345 [vm] Remove deprecated (and untested) ARMv5 support from the VM
Since we have no CQ/CI test coverage of ARMv5 and none of our customers
uses it, a breaking change request was made (see issue further down).

The breaking change has been approved and a corresponding email has been
sent out:

https://groups.google.com/a/dartlang.org/forum/?nomobile=true#!topic/announce/vRQja7di3FQ

This CL removes any armv5 related code from our codebase.

Closes https://github.com/dart-lang/sdk/issues/36666

Change-Id: I9abf32f1980ca19a9cf882b43c9966b2127f89e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122540
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-10-23 14:44:33 +00:00
David Morgan 107546a18e Revert "[dartdevc] Making multi-root paths consistently use url-relative path separators."
This reverts commit eafe8b04c0.

Reason for revert: Breaks google3.

Original change's description:
> [dartdevc] Making multi-root paths consistently use url-relative path separators.
> 
> Fixes #38802
> 
> Change-Id: I8b0e9525d0be9a00b9189d673f2881d432de4b66
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122419
> Auto-Submit: Mark Zhou <markzipan@google.com>
> Reviewed-by: Jake Macdonald <jakemac@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

TBR=jakemac@google.com,markzipan@google.com

Change-Id: I5b2878b69f3d01852eb4d4429f7cd8909760d6f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122620
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-10-23 07:24:59 +00:00
Nicholas Shahan 1451e9ee39 [dartdevc] Respect the NNBD experiment flag setting more often when patching SDK
Tested with the dart:math migration.
https://dart-review.googlesource.com/c/sdk/+/120060

Change-Id: Id62dd197dfa4d4e744ae581c6cd423444baeb1dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122521
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-22 23:00:46 +00:00
Mark Zhou eafe8b04c0 [dartdevc] Making multi-root paths consistently use url-relative path separators.
Fixes #38802

Change-Id: I8b0e9525d0be9a00b9189d673f2881d432de4b66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122419
Auto-Submit: Mark Zhou <markzipan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-10-22 20:59:58 +00:00
Robert Nystrom ed0cc81e81 Get DDC and DDK test builds working with the forked NNBD SDK.
With these changes, I can run:

  ./tools/build.py -m release --nnbd dartdevc_test

In a checkout that also includes a migrated core library that uses
NNBD features.

I haven't verified if the resulting JS is *correct*, but the build
doesn't error out.

Change-Id: I7d89efe5da8c46e2a9805743e4e61858da8097dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122280
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-10-21 17:19:59 +00:00
jonahwilliams c26d5969f7 [flutter] JavaScript support to frontend_server
Adds support to the frontend server for producing javascript when
compiling with a target model of dartdevc. This uses the ProgramCompiler
and associated types from the dev_compiler package to output the kernel
AST into a "bundle" format.

dev_compiler:
* Exposes additional types needed for JavaScript compilation.
* Allows  overriding CoreTypes instead of forcing it to be created from
Component. This is require to support compilation of the
partial Components created by the incremental compiler.
* provides extraIndexedLibraries in Target class so the CoreTypes produced by the incremental compiler have indexed them.

frontend_server:
* When the target model is dartdev, JavaScript is output instead of
kernel. For each Component we compile, we first compute the strongly
connected components and produce a List of new Components to interop
with the dev compiler. The file uri is used as module name.

Change-Id: I4cc117b20671ffd48dd43f9786961c016a02d056
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121400
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
2019-10-21 15:41:29 +00:00
Kallen Tu 531aaa9ad2 [ddk] Emit variance modifiers for classes, mixins, mixin applications.
Will be used for runtime subtype changes in future CLs.

Change-Id: I53ba10c994f13300541b3ae7a9e14d52c3836771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121821
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-10-19 01:03:41 +00:00
Vijay Menon ffcfab3093 [dartdevc] support null-check bang operator
Change-Id: I730be139f45448e3544c79e676316eb1ad36066e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122027
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-10-18 14:23:38 +00:00
Nicholas Shahan a73eba9823 [dartdevc] Preliminary additions to support NNBD runtime subtype checks
Uses a temporary representation for nullable and legacy types that is subject to
change.

Updated subtype test to include expectations when running with strict mode
checks.

Does not yet include support for:
* Required named parameters
* Weak checking modes (currently only strict checking)
* Caching the results of a check for a later lookup

Issue: #38128
Change-Id: I60935c071affdb56c368e9555fce8f86931103e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119537
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-15 23:00:58 +00:00
Mark Zhou b368a6de1c [dartdevc] copying over sourcemap file from build_web_compilers
Change-Id: Id5e4554c775becc9b1313c5cd85bd02920ea52f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121440
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-10-15 20:03:34 +00:00
Konstantin Shcheglov 37a0c1ed93 Create FunctionTypeImpl.synthetic() in DDC.
Change-Id: I7f45a9496d6dca3bfb3526bd2a37cceee8863b6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121762
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-15 17:28:47 +00:00
Konstantin Shcheglov 127b582a2f Update instantiateElementTypeToBounds() to use precomputed default types for type parameters.
Change-Id: I0f0c1af192dc44368203373fc0a824d1e262bae8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121541
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-10-14 20:19:09 +00:00
Konstantin Shcheglov 0dd6ea1354 Deprecate 'useDart2jsPaths' in SdkLibrariesReader_LibraryBuilder.
Change-Id: Id9a7bf06e270572d7df1dc4c78c2ea72c6e5eaf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121145
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-10 21:13:03 +00:00
jonahwilliams cc3e22f724 [flutter] expose dartdevc target to incremental compiler
Doesn't do anything with the new target, but establishes a public API for dev_compiler (at least within the SDK)

Change-Id: I4c86b890d3993f96cf32ed0f749608a72a173da6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119526
Commit-Queue: Jonah Williams <jonahwilliams@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-10-09 20:02:42 +00:00
Konstantin Shcheglov 3260bb29e0 Remove references to ElementHandle in analyzer and DDC.
Change-Id: I890d263552d3d08a00ff6f9fdf7291a03e8760db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120630
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-08 15:25:14 +00:00
Konstantin Shcheglov ad47b1ca64 Remove summary1, part 2.
Change-Id: I050b62bbbd77db6bd6a2d815e70cfe92cc9432a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-07 17:35:55 +00:00
Mark Zhou 36e4d5e3c2 Reland "[dartdevc] cleaning up unused web files"
This is a reland of e866f043cf

Original change's description:
> [dartdevc] cleaning up unused web files
>
> Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649
>
> Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

Change-Id: I7e01fb4ad60e47808721fa49b3ca3498e7aeaf46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120200
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-10-05 00:27:22 +00:00
David Morgan d6c6d12ebf Revert "[dartdevc] cleaning up unused web files"
This reverts commit e866f043cf.

Reason for revert: Breaks google3.

Original change's description:
> [dartdevc] cleaning up unused web files
> 
> Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649
> 
> Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

TBR=scheglov@google.com,vsm@google.com,markzipan@google.com

Change-Id: I1db094d94d699d4d18c4091f57c7cb775eb95dd5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120040
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-10-04 10:11:30 +00:00
Mark Zhou e866f043cf [dartdevc] cleaning up unused web files
Dependent on these google3 changes: https://critique.corp.google.com/#review/272749649

Change-Id: I9e89142cd5b2a619acfc35badb9cf3c549b3be9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119587
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-10-04 02:40:43 +00:00
Mark Zhou 26b1aca71e [dartdevc] Canonicalizing partial instantiation constants
Fixes #38703

This fixes the last whitelisted DDK test.

Change-Id: I1fd79c2bc361b2a4bf7fce60a406be521408024b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119921
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-10-03 20:45:13 +00:00
Sigmund Cherem 33494de2f9 (ddk modular test) exclude sources from dill files.
This fixes the issue we had with shared/diamond depedencies.  This also matches
more closely how DDK is invoked internally and externally.

While the change to use `--dart-sdk-summary` is not necessary, this brings the
API closer to how it is used elsewhere. It should be cleaned up in the future to
reuse the `--input-summary` flag instead.

Change-Id: Iec3695b5541ffaf7f5762a3d77f071a596237da1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119723
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-10-02 22:22:11 +00:00
Nicholas Shahan 2e99a418a0 [dartdevc] Only generate temporary id for a library when it is needed
Cleanup missed in https://dart-review.googlesource.com/c/sdk/+/119460

Change-Id: I34a48c3767938c9930baf4fb4ada5c3f18649de0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119501
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-02 19:43:00 +00:00
Dmitry Stefantsov bdf6b9505e [cfe] Ask for subtype checking mode explicitly
The interpretation of the subtype check result depends on the mode.  In partial
NNBD mode all type errors that wouldn't be errors in non-NNBD programs should
become warnings.  In full NNBD mode all such errors are errors.  This CL adds
the mode explicitly to the interface of the subtype check as a parameter.

Bug: http://dartbug.com/38673
Change-Id: I14bcdd260618530cfdd8189c01abba7469a16679
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119545
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-02 11:30:29 +00:00
Nicholas Shahan b49d08fb01 [dartdevc] Allow dart:_runtime imports in modular tests
The modular test framework relies on temp files and a multi-root
file system. The uri of a script from this kind of tests uses a
specific scheme we can use to identify it and allow the import in
tests.

Change-Id: I94f81bac3a920546f1d33186fb9d9ca555d6cf8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119301
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-01 18:23:16 +00:00
Nicholas Shahan 036c404076 [dartdevc] Copy subtype test into modular framework
Create ddc only modular test suite. Serves as the base for upcoming diffs adding
NNBD tests.

Change-Id: I03364a63074173f203a1aee7ef7ae4d6f1be90eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119485
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-01 17:33:06 +00:00
Jens Johansen 05c75c096d [CFE] Merge DDC and bazel incremental modular entrypoint code
Change-Id: Ia6ff627d50131fb55817e0d1adf2bc15240aeec1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119338
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-01 13:56:32 +00:00
Nicholas Shahan 6af513d7b4 [dartdevc] Fix duplicate imports of dart:_runtime in runtime unit tests
Fixes issue with importing dart:_runtime in the modular framework that relies
on the es6 module format.

Change-Id: I17b7537d36e5df6be2c5d29546e6968b26a6c4ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119460
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-09-30 21:08:44 +00:00
Konstantin Shcheglov 595022bdea Remove summary1, part 1.
Change-Id: I557785ac13fa411280ce032324b0305bf25a0a6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119170
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-28 14:30:05 +00:00
Nicholas Shahan b47c8f0d24 [dartdevc] Actually apply SDK patch files from fork in DDC modular test
The previous fix didn't work correctly because the nnbd experiment flag can be
applied per test, not per run of the entire modular suite.

Change-Id: Iffeadb57afee51ceb35f9441751eaea17f8d8d91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119185
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-09-28 00:23:41 +00:00
Chingjun Lau e5661b469d Parse all startup arguments from a file param.
Change-Id: I9aca910b170ceacf37844f6c962420675c366345
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119183
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2019-09-27 19:57:10 +00:00
Vijay Menon 5c5a76078e [dartdevc] improve escaping to handle kernel extension symbols
Fixes https://github.com/dart-lang/sdk/issues/38542

Change-Id: I54007cf8ff159634404a22772030d320997aaa6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118915
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-09-26 16:58:42 +00:00
Mark Zhou 6b1b530081 [dartdevc] Renaming reserved JS members only when not explicitly used in JS interop.
Fixes #38398

Change-Id: I9ac0c8b790e350e29b08095c665dd0b71efb83ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118888
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2019-09-26 05:13:32 +00:00
Nicholas Shahan f5ce531db3 [dartdevc] Allow ddc modular suite to apply SDK patch files from forked directory
Uses the forked patch files when a test runs with the nnbd flag.

Change-Id: I0e5367fcab02c4b870d0d1a43f078db7c906e159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118603
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-09-25 17:23:00 +00:00
Jacob MacDonald 7972c61aab fix detection of dart sdk lines in stack traces to recognize the ddk sdk
Change-Id: Ic94460833e9358b631bf1485a495ae386ff3e863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118780
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2019-09-25 15:45:09 +00:00
Dmitry Stefantsov e034104f04 [cfe] Remove TypeEnvironment.*Type getters
The getters were returning types of undefined nullabilities.  Now the
nullability-aware getters on CoreTypes should be used instead.

Closes #38224.

Bug: http://dartbug.com/38224
Change-Id: I617a0ef8ee17ebd792c2bc1ec6477a5ee469fee1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118570
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-25 13:28:28 +00:00
Jonas Termansen 8cbc4f3982 [benchmark] Add support for benchmarking DDC.
This change adds the required support to benchmark DDC just like dart2js.

The ddb tool gains the following options:

  --compile-vm-options=VM-OPTIONS
      The value of the DART_VM_OPTIONS environment variable set when running
      dartdevc. This option is required to measure the memory use of
      dartdevc while compiling.

  --packages=PACKAGES-FILE
      The .packages file to use when compiling. This option is required for
      special benchmarks with a .packages in a subdirectory and is generally
      useful.

  --out=OUTPUT-FILE
      Write the compiled javascript to this path and the other generated
      files along it. This option makes the benchmark configuration easier
      and is generally useful.

The dartdevc and dartdevc.bat scripts in the released Dart SDK now gains
support for the DART_VM_OPTIONS environment variable, just like the dart2js
scripts. This feature is needed to measure the memory usage of the Dart VM
executing dartdevc.

tools/bots/try_benchmarks.sh now tests that ddb can compile and run
benchmarks using the needed features.

Change-Id: Ib1ef07b0888a8c0cf900fe2fbb5697aab733db08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118440
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2019-09-25 09:48:00 +00:00
Vijay Menon a6cc7b94c7 Reland "[dartdevc] fix for const / overridden fields"
This reverts commit 43cacafb51.

Patchset 1 is the original CL.  Compare PS 1 to 4 to see additional fix.

It undoes an optimization that assumes private fields
are not overridden in the SDK.  This patterns happens in dart:ui
and would be difficult to enforce now that flutter web also adds to
the SDK.  As a result, all private SDK fields are virtualized, adding 0.7% to the size of
dart_sdk.js.

Fixes https://github.com/dart-lang/sdk/issues/38455

Change-Id: If969dddcb7143316ac8c771df1ed83def21412b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118362
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2019-09-23 21:31:49 +00:00
Konstantin Shcheglov 7d436b0815 Update DDC to avoid calling '.type', create legacy types instead.
I ran TAP presubmit, and there are no new failing tests.
https://test.corp.google.com/ui#id=OCL:270582162:BASE:270582204:1569204806081:7dd58c7

Change-Id: Ic0a5231f3ee01c7439fc3f58eea4f4ced31cfa6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118361
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-23 19:28:46 +00:00
Johnni Winther 94dd49cdb6 [cfe] Add NullCheck expression node
Change-Id: I17223bffa5dec7b1ce7652b21bf1a3381137f4f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118380
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-23 10:04:48 +00:00
Vijay Menon 43cacafb51 Revert "[dartdevc] fix for const / overridden fields"
This is breaking Flutter Web - see:

https://github.com/flutter/flutter/issues/40876

Will need to reopen: https://github.com/dart-lang/sdk/issues/38455

Change-Id: I6942cdc136533286c3a5eee93439d4f0f9beb28b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118261
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-09-20 20:09:08 +00:00
Vijay Menon 0051da7f55 [nnbd] change modular nnbd test to enable non-nullable for sdk
Change-Id: Ic585a885c75f54a21d3ae62fa81bb6e14cadd178
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118162
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-09-20 00:47:44 +00:00
Vijay Menon 596bd5b61c [dartdevc] Add modular NNBD test
Change-Id: I61cdd4a1f03232f1f8bab8b029e50b34bf7a1648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117760
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-09-19 16:53:50 +00:00
Dmitry Stefantsov 515a597710 [cfe] Remove Class.rawType
Bug: http://dartbug.com/38224
Change-Id: If0af5487b1d43125738575ee3e0fcd747db54fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117546
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-19 10:42:10 +00:00