Commit Graph

181 Commits

Author SHA1 Message Date
Filip Filmar 9f68048cae [vm] Replaces fuchsia.deprecatedtimezone
The FIDL library `fuchsia.deprecatedtimezone` is going away.  There are
different and better ways to obtain the same functionality.  This change
removes the dependency on `fuchsia.deprecatedtimezone` from the Dart SDK.
Thus setting the stage for the removal of `fuchsia.deprecatedtimezone`.

Adds inspect metrics that allow whitebox testing of the runners.  Here's
a sample `fx iquery` excerpt from a running device, showing a dart
runner exposing the same OS diagnostic metrics.

Adds support for asynchronous timezone updates, which was missing from
previous versions of this commit.

```
dart.cmx:
  metadata:
    filename = fuchsia.inspect.Tree
    component_url = fuchsia-pkg://fuchsia.com/dart_test_debug#meta/dart.cmx
    timestamp = 12241877209826
  payload:
    root:
      os:
        dst_status = 1
        get_profile_status = 0
        num_get_profile_calls = 1
        num_intl_provider_errors = 0
        num_on_change_calls = 0
        timezone_content_status = 0
        tz_data_close_status = -1
        tz_data_status = -1
```

This functionality is guarded by Fuchsia integration tests at
//src/tests/intl.

Tested:

1. (compile locally for Fuchsia and deploy)

  ```
  fx test //src/tests/intl
  ```

  This runs the specific timezone tests that should break if the
  functionality itself is broken.

2. Compile dart for Fuchsia and run tests:

   The instructions are here: https://github.com/dart-lang/sdk/commit/15dfcca89f0d7eabd60ff049444e203a82dbcb1e

   I used the instructions above to build and run all tests from
   `dart_test_debug` package.  The tests were ran against the main
   branch (and then, the tests that failed there were filtered out),
   then the remaining tests were ran against a Dart version that
   contains this change.

See:
  - https://github.com/dart-lang/sdk/issues/42245
  - https://github.com/dart-lang/sdk/issues/39650

Prior attempts (most recent first):

- rolled back as it... didn't compile.  It turned out, when building the
  change with flutter the compilation process has some different
  settings, so the compilation of the change worked in flutter, but
  didn't in dart.  The compilation error is now fixed, and I ran
  additional tests: https://dart-review.googlesource.com/c/sdk/+/155582

- rolled back as it had a regression which was not caught by tests.
  Tests are fixed now at
  https://fuchsia-review.googlesource.com/c/fuchsia/+/409840

Fixes #39650

TEST=See "Tested" section above.
Change-Id: Idd78ea42e3ae38dca2ab4c4126e930e53ef8a793
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185302
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-02-18 07:38:04 +00:00
Filip Filmar eea10ee6f8 Revert "[vm] Replaces fuchsia.deprecatedtimezone"
This reverts commit 9474c2355d.

Reason for revert: Doesn't compile (?)

Original change's description:
> [vm] Replaces fuchsia.deprecatedtimezone
>
> (prior attempt was rolled back as it had a regression which was not
> caught by tests.  Tests are fixed now at:
> https://fuchsia-review.googlesource.com/c/fuchsia/+/409840)
>
> The FIDL library fuchsia.deprecatedtimezone is going away.  There are
> different and better ways to obtain the same functionality.  This change
> removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.
>
> Adds inspect metrics that allow whitebox testing of the runners.  Here's
> a sample `fx iquery` excerpt from a running device, showing both a dart
> and a flutter runner exposing the same OS diagnostic metrics.
>
> Adds support for asynchronous timezone updates, which was missing from
> previous versions of this commit.
>
> ```
> /hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
>   /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
>     dst_status = 0
>     get_profile_status = 0
>     timezone_content_status = 0
>     tz_data_close_status = 0
>     tz_data_status = 0
> /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
>   /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
>     dst_status = 0
>     get_profile_status = 0
>     timezone_content_status = 0
>     tz_data_close_status = 0
>     tz_data_status = 0
> ```
>
> Under nominal operation, all of the above values should be equal to 0.
> Nonzero values indicate an error.
>
> This functionality is guarded by Fuchsia integration tests at
> //src/tests/intl.
>
>
> Tested:
>   (compile locally for Fuchsia and deploy)
>   fx test //src/tests/intl
>
> See:
>   - https://github.com/dart-lang/sdk/issues/42245
>   - https://github.com/dart-lang/sdk/issues/39650
>
> Fixes #39650
> TEST=see Tested: above
> Change-Id: Icb72ddd554c263f970e18b9cbbaab7adf43c8710
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155582
> Auto-Submit: Filip Filmar <fmil@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>

Change-Id: Ic45c09a49796f8fb8b21cfaa8005db4b57f5eb52
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185301
Auto-Submit: Filip Filmar <fmil@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-02-17 06:50:22 +00:00
Filip Filmar 9474c2355d [vm] Replaces fuchsia.deprecatedtimezone
(prior attempt was rolled back as it had a regression which was not
caught by tests.  Tests are fixed now at:
https://fuchsia-review.googlesource.com/c/fuchsia/+/409840)

The FIDL library fuchsia.deprecatedtimezone is going away.  There are
different and better ways to obtain the same functionality.  This change
removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.

Adds inspect metrics that allow whitebox testing of the runners.  Here's
a sample `fx iquery` excerpt from a running device, showing both a dart
and a flutter runner exposing the same OS diagnostic metrics.

Adds support for asynchronous timezone updates, which was missing from
previous versions of this commit.

```
/hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
  /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
    dst_status = 0
    get_profile_status = 0
    timezone_content_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
/hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
  /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
    dst_status = 0
    get_profile_status = 0
    timezone_content_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
```

Under nominal operation, all of the above values should be equal to 0.
Nonzero values indicate an error.

This functionality is guarded by Fuchsia integration tests at
//src/tests/intl.


Tested:
  (compile locally for Fuchsia and deploy)
  fx test //src/tests/intl

See:
  - https://github.com/dart-lang/sdk/issues/42245
  - https://github.com/dart-lang/sdk/issues/39650

Fixes #39650
TEST=see Tested: above
Change-Id: Icb72ddd554c263f970e18b9cbbaab7adf43c8710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155582
Auto-Submit: Filip Filmar <fmil@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-02-17 04:34:10 +00:00
Lasse R.H. Nielsen d352bc28b8 Remove (most) uses of the "non-nullable" experiment flag.
Since the flag is now enabled by default, there should be no mention of it.
There are still some uses in front_end/testcases that are not just removable
(it also uses `no-non-nullable`). There migth be more uses that are not
as easily found as grepping for `--enable-experiment

Removes two VM tests where fixing them meant they were just duplicating
the corresponding non *_2/ tests.
Fixes #44941

TEST= Large number of tests chaged.=(no-)?non-nullable`.

Change-Id: Ief755981ccde9a5482fcdf408c2929c74433a710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183688
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-12 17:16:54 +00:00
James Clarke 50a2216b31 Changes to make support WinUWP target
TEST=no new tests added for this change, existing tests should work.
Bug: 43762
Change-Id: I1cc4c18526c0eef62c441567e8a7e55dd3dd8b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167041
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-12-04 22:46:12 +00:00
Clement Skau 2d36c85ff8 [vm] Removes support for --causal-async-stacks
All existing embedders have been opted into --lazy-async-stacks, the
VM also uses it as it's default in all configurations.

After this CL, any user of --causal-async-stacks will get an error
message when trying to use it.
=> In any such case, please simply remove the flag.

TEST=Exhaustive CQ.

Bug: https://github.com/dart-lang/sdk/issues/37668
Change-Id: Ia440afcf2dba464aa8b8cf381b93bbac8eb9f8dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172564
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-12-01 07:27:14 +00:00
Liam Appelbe 504e9a32f9 Reland "[wasm] Remove dart:wasm"
This is a reland of ade333dd54

Original change's description:
> [wasm] Remove dart:wasm
>
> I'm not entirely sure why I had to modify a random set of fingerprints
> in runtime/vm/compiler/recognized_methods_list.h, but when I did a debug
> build it had some fingerprint errors.
>
> Change-Id: Ib0a0cccb37f2efba509e2b37b6eabe790fa933c4
> TEST= Deleting stuff, so not really necessary
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170620
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Change-Id: I0d1388f6312358cc62bb32f5ac7b88a3187223c9
TEST= Deleting stuff, so not really necessary
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171940
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-11-13 20:40:24 +00:00
Siva Annamalai 54a91f26c4 Revert "[wasm] Remove dart:wasm"
This reverts commit ade333dd54.

Reason for revert: This broke both the Flutter HHH and Google3 bots. It looks like some co-ordination is required between the Google3 and Flutter engine build changes for this CL to land.

Original change's description:
> [wasm] Remove dart:wasm
>
> I'm not entirely sure why I had to modify a random set of fingerprints
> in runtime/vm/compiler/recognized_methods_list.h, but when I did a debug
> build it had some fingerprint errors.
>
> Change-Id: Ib0a0cccb37f2efba509e2b37b6eabe790fa933c4
> TEST= Deleting stuff, so not really necessary
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170620
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,liama@google.com

Change-Id: I244d7b3549845dd71719176a62b6ec3a4c4b5f86
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171860
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-11-13 01:54:10 +00:00
Liam Appelbe ade333dd54 [wasm] Remove dart:wasm
I'm not entirely sure why I had to modify a random set of fingerprints
in runtime/vm/compiler/recognized_methods_list.h, but when I did a debug
build it had some fingerprint errors.

Change-Id: Ib0a0cccb37f2efba509e2b37b6eabe790fa933c4
TEST= Deleting stuff, so not really necessary
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170620
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-11-12 19:22:29 +00:00
Clement Skau e90967f29d [SDK] Makes --lazy_async_stack default.
Bug: https://github.com/dart-lang/sdk/issues/42062
Change-Id: If22ed42b363e2d75d0be5cc14aef9e909b8ff2e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149288
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-06 14:12:52 +00:00
Alexander Markov d014a0f59b Remove bytecode mode of Dart SDK build
This change cleans up build.py --bytecode and gn.py --bytecode options.

Change-Id: Ie251e7049ce3f8f9da28d35eda139b60ee23af98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167842
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-21 22:43:14 +00:00
Ryan Macnak 4182cbe1a3 Remove use of set_sources_assignment_filter
The sources assignment filter is considered a misfeature of gn
and is planned for removal (see discussion at [1]).

Convert dart BUILD.gn rules to manually filter the files that
are build using explicit `if` expressions. Remove obsolete call
to set_sources_assignment_filter() to filter '*_test.*' files
as no such files are present in the variables used to build the
`sources` value.

[1]: https://groups.google.com/a/chromium.org/g/gn-dev/c/oQcYStl_WkI/m/roukYTxSDAAJ

Bug: gn:125
Change-Id: I591fbb746cf694f7d2a5a330f81652380acf5c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166629
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-10-08 20:08:59 +00:00
Liam Appelbe 0f14261176 Reland "[vm/wasm] Boilerplate for package:wasm"
This is a reland of 2bafc322fd

Original change's description:
> [vm/wasm] Boilerplate for package:wasm
>
> So far this just builds the wasmer library, copies it into the sdk
> directory, loads the library, and allows you to compile WASM modules.
> You can't actually do anything with the modules yet.
>
> Bug: https://github.com/dart-lang/sdk/issues/37882
> Change-Id: I7d7cfe5721bbe38a6afe76f326518e714d236ed4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158367
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I8056df1e301acde2772ba2273148faa53d03173e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159321
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-08-21 18:23:00 +00:00
Tess Strickland 2546ad268f Revert "[vm/wasm] Boilerplate for package:wasm"
This reverts commit 2bafc322fd.

Reason for revert: Build failures on Flutter HHH CI bots and golem (Dart VM ARMv8, Flutter).

Original change's description:
> [vm/wasm] Boilerplate for package:wasm
> 
> So far this just builds the wasmer library, copies it into the sdk
> directory, loads the library, and allows you to compile WASM modules.
> You can't actually do anything with the modules yet.
> 
> Bug: https://github.com/dart-lang/sdk/issues/37882
> Change-Id: I7d7cfe5721bbe38a6afe76f326518e714d236ed4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158367
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com

Change-Id: I2c5b390987bf45704a3de98e050f4bcf1cb235d8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159243
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-08-19 08:07:19 +00:00
Liam Appelbe 2bafc322fd [vm/wasm] Boilerplate for package:wasm
So far this just builds the wasmer library, copies it into the sdk
directory, loads the library, and allows you to compile WASM modules.
You can't actually do anything with the modules yet.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I7d7cfe5721bbe38a6afe76f326518e714d236ed4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158367
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-08-18 23:55:31 +00:00
Filip Filmar 3fef522496 Revert "Reland "[vm] Replaces fuchsia.deprecatedtimezone""
This reverts commit e3a682480a.

Reason for revert: Broke time reporting on new
devices.

Original change's description:
> Reland "[vm] Replaces fuchsia.deprecatedtimezone"
>
> This is a reland of 16f09f20b3
>
> The apparent break of internal tests was not caused by this change.
>
> Original change's description:
> > [vm] Replaces fuchsia.deprecatedtimezone
> >
> > (prior attempt was rolled back as it caused downstream tests to time
> > out.  See prior attempt at: See:
> > https://dart-review.googlesource.com/c/sdk/+/149206)
> >
> > The FIDL library fuchsia.deprecatedtimezone is going away.  There are
> > different and better ways to obtain the same functionality.  This change
> > removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.
> >
> > Adds inspect metrics that allow whitebox testing of the runners.  Here's
> > a sample `fx iquery` excerpt from a running device, showing both a dart
> > and a flutter runner exposing the same OS diagnostic metrics.
> >
> > ```
> > /hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
> >   /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
> >     dst_status = 0
> >     get_profile_status = 0
> >     timezone_content_status = 0
> >     tz_data_close_status = 0
> >     tz_data_status = 0
> > /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
> >   /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
> >     dst_status = 0
> >     get_profile_status = 0
> >     timezone_content_status = 0
> >     tz_data_close_status = 0
> >     tz_data_status = 0
> > ```
> >
> > Under nominal operation, all of the above values should be equal to 0.
> > Nonzero values indicate an error.
> >
> > This functionality is guarded by Fuchsia integration tests at
> > //src/tests/intl.
> >
> > Tested:
> >   (compile locally for Fuchsia and deploy)
> >   fx test //src/tests/intl
> >
> > See:
> >   - https://github.com/dart-lang/sdk/issues/42245
> >   - https://github.com/dart-lang/sdk/issues/39650
> >
> > Fixes #39650
> >
> > Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
> > Commit-Queue: Filip Filmar <fmil@google.com>
> > Reviewed-by: Martin Kustermann <kustermann@google.com>
>
> Change-Id: I5da6b0f481af0eb42c3b5e74c920588ac2ef5be9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151862
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Filip Filmar <fmil@google.com>

TBR=kustermann@google.com,kaushikiska@google.com,fmil@google.com

Change-Id: I6e590cf22347f9153e5203b255f37872dbd91fa6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155505
Commit-Queue: Filip Filmar <fmil@google.com>
Reviewed-by: Filip Filmar <fmil@google.com>
2020-07-22 21:36:19 +00:00
Liam Appelbe 6fc75e6a2b [vm] Add tests and packages to the Fuchsia package
Also, delete some unnecessary files from build/fuchsia, and add an async
dispatcher to os_fuchsia.

Change-Id: I477e58d54330e83b2c7b6463395a1212707f8ab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154162
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-07-15 20:44:06 +00:00
Filip Filmar e3a682480a Reland "[vm] Replaces fuchsia.deprecatedtimezone"
This is a reland of 16f09f20b3

The apparent break of internal tests was not caused by this change.

Original change's description:
> [vm] Replaces fuchsia.deprecatedtimezone
>
> (prior attempt was rolled back as it caused downstream tests to time
> out.  See prior attempt at: See:
> https://dart-review.googlesource.com/c/sdk/+/149206)
>
> The FIDL library fuchsia.deprecatedtimezone is going away.  There are
> different and better ways to obtain the same functionality.  This change
> removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.
>
> Adds inspect metrics that allow whitebox testing of the runners.  Here's
> a sample `fx iquery` excerpt from a running device, showing both a dart
> and a flutter runner exposing the same OS diagnostic metrics.
>
> ```
> /hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
>   /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
>     dst_status = 0
>     get_profile_status = 0
>     timezone_content_status = 0
>     tz_data_close_status = 0
>     tz_data_status = 0
> /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
>   /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
>     dst_status = 0
>     get_profile_status = 0
>     timezone_content_status = 0
>     tz_data_close_status = 0
>     tz_data_status = 0
> ```
>
> Under nominal operation, all of the above values should be equal to 0.
> Nonzero values indicate an error.
>
> This functionality is guarded by Fuchsia integration tests at
> //src/tests/intl.
>
> Tested:
>   (compile locally for Fuchsia and deploy)
>   fx test //src/tests/intl
>
> See:
>   - https://github.com/dart-lang/sdk/issues/42245
>   - https://github.com/dart-lang/sdk/issues/39650
>
> Fixes #39650
>
> Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
> Commit-Queue: Filip Filmar <fmil@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

Change-Id: I5da6b0f481af0eb42c3b5e74c920588ac2ef5be9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151862
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
2020-07-09 01:41:53 +00:00
Filip Filmar 5d02a18d2f Revert "[vm] Replaces fuchsia.deprecatedtimezone"
This reverts commit 16f09f20b3.

Reason for revert: Trigger finger.  Shouldn't have been merged.

Original change's description:
> [vm] Replaces fuchsia.deprecatedtimezone
> 
> (prior attempt was rolled back as it caused downstream tests to time
> out.  See prior attempt at: See:
> https://dart-review.googlesource.com/c/sdk/+/149206)
> 
> The FIDL library fuchsia.deprecatedtimezone is going away.  There are
> different and better ways to obtain the same functionality.  This change
> removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.
> 
> Adds inspect metrics that allow whitebox testing of the runners.  Here's
> a sample `fx iquery` excerpt from a running device, showing both a dart
> and a flutter runner exposing the same OS diagnostic metrics.
> 
> ```
> /hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
>   /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
>     dst_status = 0
>     get_profile_status = 0
>     timezone_content_status = 0
>     tz_data_close_status = 0
>     tz_data_status = 0
> /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
>   /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
>     dst_status = 0
>     get_profile_status = 0
>     timezone_content_status = 0
>     tz_data_close_status = 0
>     tz_data_status = 0
> ```
> 
> Under nominal operation, all of the above values should be equal to 0.
> Nonzero values indicate an error.
> 
> This functionality is guarded by Fuchsia integration tests at
> //src/tests/intl.
> 
> Tested:
>   (compile locally for Fuchsia and deploy)
>   fx test //src/tests/intl
> 
> See:
>   - https://github.com/dart-lang/sdk/issues/42245
>   - https://github.com/dart-lang/sdk/issues/39650
> 
> Fixes #39650
> 
> Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
> Commit-Queue: Filip Filmar <fmil@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,kaushikiska@google.com,fmil@google.com

Change-Id: I7e3f8b9724e30653ca5fccaf912e940edcbcf974
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151861
Reviewed-by: Filip Filmar <fmil@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
2020-06-19 19:21:15 +00:00
Filip Filmar 16f09f20b3 [vm] Replaces fuchsia.deprecatedtimezone
(prior attempt was rolled back as it caused downstream tests to time
out.  See prior attempt at: See:
https://dart-review.googlesource.com/c/sdk/+/149206)

The FIDL library fuchsia.deprecatedtimezone is going away.  There are
different and better ways to obtain the same functionality.  This change
removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.

Adds inspect metrics that allow whitebox testing of the runners.  Here's
a sample `fx iquery` excerpt from a running device, showing both a dart
and a flutter runner exposing the same OS diagnostic metrics.

```
/hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
  /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
    dst_status = 0
    get_profile_status = 0
    timezone_content_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
/hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
  /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
    dst_status = 0
    get_profile_status = 0
    timezone_content_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
```

Under nominal operation, all of the above values should be equal to 0.
Nonzero values indicate an error.

This functionality is guarded by Fuchsia integration tests at
//src/tests/intl.

Tested:
  (compile locally for Fuchsia and deploy)
  fx test //src/tests/intl

See:
  - https://github.com/dart-lang/sdk/issues/42245
  - https://github.com/dart-lang/sdk/issues/39650

Fixes #39650

Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
Commit-Queue: Filip Filmar <fmil@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-19 19:15:03 +00:00
Liam Appelbe 764e72800f Reland "Revert "Add an --os=fuchsia option to build.py:""
This reverts commit d39d4d0d55.

Reason for revert: Relanding with fix

Change-Id: I6d6911b6cdc578a3b576b237db94c7f1db9824b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151600
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-18 00:24:31 +00:00
Martin Kustermann 168539d61d Reland "[vm] Build dart2native dependencies with the normal "create_sdk" target"
The flutter engine DEPS got new icu/boringssl so this CL can safely
land and roll into engine. A small change is made in Patchset 1..3.

This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

Issue https://github.com/dart-lang/sdk/issues/42230

Change-Id: I8d9b37acbb5eb94e44d97652f838948a946fd372
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151505
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-17 16:12:26 +00:00
Leaf Petersen d44457f79d [Core Libraries] Eliminate the fork in the core libraries.
Move the nnbd core libraries from sdk_nnbd to sdk, and updates
references in build files and elsewhere accordingly.

Change-Id: I09760fe1e006657aacdfe80f3b22fdf6f7e30a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151121
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-16 23:37:36 +00:00
Martin Kustermann 21222b64c4 Revert "[vm] Build dart2native dependencies with the normal "create_sdk" target"
This reverts commit a88a328b7f.

Reason for revert: Auto roller hasn't rolled previous changes from
Dart yet. Those changes updated DEPS for icu/boringssl. We have to
wait with this CL until the DEPS changes have been done in the engine.

Original change's description:
> [vm] Build dart2native dependencies with the normal "create_sdk" target
> 
> This removes special logic for creating the `dart-sdk` we distribute
> which used to build release and product mode and copied some binaries
> from the latter into the former, before the SDK was actuallly ready to
> test and distribute.
> 
> This changes the GN build rules to build the necessary
> gen_snapshot/dart_precompiled_runtime product binaries during the normal
> release build.
> 
> Normally during --mode=product builds the global build config in
> //build/config/BUILDCONFIG.gn will set `-fvisibility=false`.
> 
> => Doing so results in much smaller binaries - because only explicitly
>    exported symbols are visible, the rest can be tree shaken by the linker.
> 
> Since we are building --mode=release, the `-fvisibility=false` will not
> be set. In order to set the flag for the 2 special product-mode binaries
> we need to add -fvisibility=hidden manually, in:
> 
>   * dart_product_config: Which is used for compiling VM sources.
>   * 3rd party double-conversion library
>   * 3rd party boringssl library
>   * 3rd party icu library
> 
> The upstream CLs are:
> 
>   * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
>   * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407
> 
> Issue https://github.com/dart-lang/sdk/issues/42230
> 
> Change-Id: I3e47664d9fadb9ed1ad033bb17d46e769442f741
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=kustermann@google.com,zra@google.com,athom@google.com,asiva@google.com

Change-Id: Ied0f2f5b58dceb2b59bc2ac6e11e5fd717c8885e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151382
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-16 10:41:27 +00:00
George Wright d39d4d0d55 Revert "Add an --os=fuchsia option to build.py:"
This reverts commit 4ce18ab931.

Reason for revert: bad merge, caused build breakages in flutter/engine

Original change's description:
> Add an --os=fuchsia option to build.py:
> 
> tools/build.py --os=fuchsia runtime create_sdk
> 
> This is analogous to --os=android. It cross compiles from Linux x64 to
> Fuchsia.
> 
> A lot of the build rules are just slightly different between the existing
> Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
> example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
> So to support this I had to add a new variable, using_fuchsia_gn_sdk,
> analogous to using_fuchsia_sdk. Flutter will need to set this to false.
> 
> Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

TBR=rmacnak@google.com,asiva@google.com,liama@google.com,kaushikiska@google.com,matthewcarroll@google.com

Change-Id: If01ee34eba906c55f2d56ba650748a86e81e701c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151321
Auto-Submit: George Wright <wrightgeorge@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-06-15 23:01:53 +00:00
Liam Appelbe 4ce18ab931 Add an --os=fuchsia option to build.py:
tools/build.py --os=fuchsia runtime create_sdk

This is analogous to --os=android. It cross compiles from Linux x64 to
Fuchsia.

A lot of the build rules are just slightly different between the existing
Fuchsia build rules used by Flutter, and the ones added by GN SDK. For
example "$fuchsia_sdk_root/pkg:fdio" is now "$fuchsia_sdk_root/pkg/fdio".
So to support this I had to add a new variable, using_fuchsia_gn_sdk,
analogous to using_fuchsia_sdk. Flutter will need to set this to false.

Change-Id: Ief275d65f30a42a801607de93cf2d27a1fe825dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150689
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-06-15 20:05:16 +00:00
Martin Kustermann a88a328b7f [vm] Build dart2native dependencies with the normal "create_sdk" target
This removes special logic for creating the `dart-sdk` we distribute
which used to build release and product mode and copied some binaries
from the latter into the former, before the SDK was actuallly ready to
test and distribute.

This changes the GN build rules to build the necessary
gen_snapshot/dart_precompiled_runtime product binaries during the normal
release build.

Normally during --mode=product builds the global build config in
//build/config/BUILDCONFIG.gn will set `-fvisibility=false`.

=> Doing so results in much smaller binaries - because only explicitly
   exported symbols are visible, the rest can be tree shaken by the linker.

Since we are building --mode=release, the `-fvisibility=false` will not
be set. In order to set the flag for the 2 special product-mode binaries
we need to add -fvisibility=hidden manually, in:

  * dart_product_config: Which is used for compiling VM sources.
  * 3rd party double-conversion library
  * 3rd party boringssl library
  * 3rd party icu library

The upstream CLs are:

  * BoringSSL: https://dart-review.googlesource.com/c/boringssl_gen/+/150482
  * ICU: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/2236407

Issue https://github.com/dart-lang/sdk/issues/42230

Change-Id: I3e47664d9fadb9ed1ad033bb17d46e769442f741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150524
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2020-06-15 15:17:35 +00:00
Martin Kustermann 7da7e9d06b [vm] Remove -lrt dependency: It was required for clock_gettime with GLIBC before 2.17 (~ 2012)
Originally this dependency got added in this CL:

   https://codereview.chromium.org/8463032


Debian Wheezy used to have older glibc but Wheezy's LTS has expired.


Change-Id: I667da14f7dc8054837d0946c041e1021a5f3128a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150104
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-08 17:23:01 +00:00
Kaushik Iska 02915ec5ce Revert "Replaces fuchsia.deprecatedtimezone"
This reverts commit cf30ff2953.

Bug: b/158105817 for more details
Change-Id: I8b37329f8d90cbf5012aa4fb3c5a45dac649f555
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149920
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-03 21:58:10 +00:00
Filip Filmar cf30ff2953 Replaces fuchsia.deprecatedtimezone
The FIDL library fuchsia.deprecatedtimezone is going away.  There are
different and better ways to obtain the same functionality.  This change
removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.

Adds inspect metrics that allow whitebox testing of the runners.  Here's
a sample `fx iquery` excerpt from a running device, showing both a dart
and a flutter runner exposing the same OS diagnostic metrics.

```
/hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
  /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
    dst_status = 0
    get_profile_status = 0
    timezone_content_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
/hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
  /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
    dst_status = 0
    get_profile_status = 0
    timezone_content_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
```

Under nominal operation, all of the above values should be equal to 0.
Nonzero values indicate an error.

This functionality is guarded by Fuchsia integration tests at
//src/tests/intl.

Tested:
  (compile locally for Fuchsia and deploy)
  fx test //src/tests/intl

Fixes #39650

Change-Id: I5fc3ed305301abe1b183948a7cf478e014f351e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149206
Commit-Queue: Filip Filmar <fmil@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-05-29 18:36:58 +00:00
P.Y. Laligand 65f132afe7 [fuchsia] Update more trace-engine/trace labels.
Change-Id: I19c165a42d199e1ea314aad00b212b2990745dba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148544
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-05-20 01:33:21 +00:00
P.Y. Laligand db75896497 [fuchsia] Update label for trace-engine library.
Change-Id: I4b30ebb576e64d0b2448a815fb5f5cee2bc5655b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148235
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-05-16 00:04:22 +00:00
Filip Filmar a394be48fc [vm] Fixes Fuchsia dependencies for inspect
This change only affects dart SDK when built from source in the
Fuchsia OS tree, without using the Fuchsia SDK.

The BUILD.gn rules are slightly different for a SDK and a non-SDK build.
My last change (see link below) omitted the non-SDK build flavor, which
led to dart roller break when rolling into Fuchsia.  This change should
make the non-SDK build in Fuchsia work.

Tested:
  (locally on Fuchsia, tried with and without the change to
  third_party/dart):
  fx set workstation.x64 --release --with=//topaz
  fx build -k

See the problem here:
https://dart-review.googlesource.com/c/sdk/+/144480/3/runtime/vm/BUILD.gn

Bug: https://github.com/dart-lang/sdk/issues/41884
Bug: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=52080
Change-Id: I1bcfff1576be33717ce49d1b714bc4867ba2c736
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147816
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
2020-05-13 08:12:11 +00:00
asiva 03ce33f80c [BUILD] - Initial CL to unfork the NNBD Dart SDK
- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I729630a7bd36ea7ae38134f9285b44e93c283c68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138902
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-05-07 21:12:47 +00:00
Filip Filmar d2e4a3c991 Adds inspect to vm/os_fuchsia.cc
This will allow introspection of the state of tzdata loader, making
error diagnostics easier on Fuchsia.

Must be merged only after this pull request is merged into flutter
https://github.com/flutter/engine/pull/17876
Otherwise, the call to the `dart::ComponentContext()` could prevent
the runners from initializing the component context correctly.

Tested:
  Compiled and deployed on a Fuchsia device.
  The result on Fuchsia is as seen below.

```
$ fx iquery
/hub/c/flutter_jit_product_runner.cmx/21608/out/diagnostics:
  /hub/c/flutter_jit_product_runner.cmx/21608/out/diagnostics#os:
    dst_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
```

See issue https://github.com/dart-lang/sdk/issues/41525 for details.

Bug: fuchsia:43341
Change-Id: I43ea289003e1e1d09cca4163236bc477eb9cee80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144480
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
2020-04-30 23:16:46 +00:00
Siva Annamalai 726d3c7725 Revert "[BUILD] - Initial CL to unfork the NNBD Dart SDK"
This reverts commit cab69e7706.

Reason for revert: It was a temporary submit

Original change's description:
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> NOTE: This is a trial submit and will be reverted immediately.
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com

Change-Id: Ib0f99fc1a42c9c7a8b21f8542f4a35dba9105d5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144900
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-27 05:00:10 +00:00
asiva cab69e7706 [BUILD] - Initial CL to unfork the NNBD Dart SDK
NOTE: This is a trial submit and will be reverted immediately.

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-27 04:59:26 +00:00
Siva Annamalai 63a92a3b00 Revert "This is a trial submit of the unfork CL, it will be reverted immediately."
This reverts commit 393468dc89.

Reason for revert: This was a trial submit and so reverting it.

Original change's description:
> This is a trial submit of the unfork CL, it will be reverted immediately.
> This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.
> 
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com,liama@google.com

Change-Id: I7b50fae71764eceb17893338d1981e40ea2de520
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144083
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-20 03:50:49 +00:00
asiva 393468dc89 This is a trial submit of the unfork CL, it will be reverted immediately.
This commit is being done so we can roll it into Flutter and run some device lab testing to see the effect this CL will have on Flutter.

[BUILD] - Initial CL to unfork the NNBD Dart SDK

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I83c813aee2a5b61ad876d8a7b0988705bb24c839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144082
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-20 03:46:06 +00:00
Jason Simmons af1410b070 [vm] Add missing dependency on the Fuchsia trace-engine library
Change-Id: I4e08a28b941307119f11cb035ac6fc501278f136
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143981
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2020-04-17 20:02:14 +00:00
Vyacheslav Egorov a41a1dc917 [vm/compiler] Split compiler sources out of normal VM sources.
Make them form its own source set (libdart_compiler) and completely exclude
them from AOT runtime targets.

Previously we had some inconsistencies, with some files were using
DART_PRECOMPILED_RUNTIME to fully or partially exclude either contents
from their headers or from implementation, while other files did nothing
and relied on linker to throw their contents away.

This change tries to address this inconsistency.

A follow up change would include a check in most compiler headers which
would prohibit to use them while building AOT runtime.

Change-Id: Ief11b11cbc518b301d3e93fce80580a31bbad151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142993
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-04-16 22:59:03 +00:00
Dmitry Stefantsov 928f9fc932 [cfe] Remove flag --force-nnbd-checks
The checks are now always enabled for the "non-nullable" experiment

Closes #40980.

Bug: https://github.com/dart-lang/sdk/issues/40980
Change-Id: I32a141a93f0ba86ebdab554e1f312c2147927993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-03-16 15:01:38 +00:00
Dmitry Stefantsov 25d7331443 Pass --force-nnbd-checks whenever NNBD experiment is enabled
This is a preliminary step before removing the flag completely.

Bug: https://github.com/dart-lang/sdk/issues/40980
Change-Id: Ib2135180aa0f30dd301beaacb842105096f8948c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139289
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-03-13 15:08:11 +00:00
Régis Crelier 928ed9c766 [VM/nnbd] Apply legacy erasure on constants compiled in agnostic mode (fixes #40800).
Adds 2 bits to RawLibrary flags to encode CFE compilation mode.
If in weak mode, apply legacy erasure to types of constants from agnostic
libraries, i.e.:
- Map Never to Null
- Set nullability to legacy
- Erase 'required' flag on named parameters

Change-Id: I57feeef3fa1689a5cb93b3fa983ea3d65047b8c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137735
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-02-28 21:52:40 +00:00
Filip Filmar 5c42f91362 Revert "[i18n] Replaces fuchsia.deprecatedtimezone"
This reverts commit c063f5d0c3.

Reason for revert: release blocker

Original change's description:
> [i18n] Replaces fuchsia.deprecatedtimezone
>
> The FIDL library fuchsia.deprecatedtimezone is going away.  There are
> different and better ways to obtain the same functionality.
>
> Fixes #39650
>
> Change-Id: If4e4234568c276d3cd2be34863f00165b6e97e0e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129005
> Commit-Queue: Filip Filmar <fmil@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,fmil@google.com

Change-Id: I0a74a537c4269075eb13282c5738a30b263c706e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133747
Reviewed-by: Filip Filmar <fmil@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
2020-01-29 21:10:40 +00:00
Victor Lima 3fa4194008 [vm] Update offsets
Make the offsets extracted reflect changes in classes that have
fields that do not exist in product mode, since it affects the
entity size.

Change-Id: I0ec277663ba3ddc956ca651ccc0395e39ba185f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133229
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
2020-01-27 15:59:56 +00:00
Victor Lima 17fff9b721 [vm] Generate different offsets for dart_precompiled_runtime
Some raw objects have fields that do not exist in
dart_precompiled_runtime, making the instance size of such objects
smaller. The offsets extractor should therefore generate different
offsets for the precompiled runtime in order to reflect those
differences.

Change-Id: I367e20744fe5b2f8ffaba03bd19b2c74a422c750
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133064
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
2020-01-24 22:03:05 +00:00
Filip Filmar 842c54809e Replace fuchsia.deprecatedtimezone
The FIDL library fuchsia.deprecatedtimezone is going away.  There are
different and better ways to obtain the same functionality.

Fixed reland of:
https://dart-review.googlesource.com/c/sdk/+/129005
Original rollback at:
https://dart-review.googlesource.com/c/sdk/+/132172

Fixes #39650

Change-Id: I7ed73c0b50215daa28491e1f9445f15f8207675b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132444
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
2020-01-21 19:09:09 +00:00
Alexander Aprelev 843bd29908 Revert "[i18n] Replaces fuchsia.deprecatedtimezone"
This reverts commit c063f5d0c3 as it broke
dart->flutter engine roller, fuchsia build.

Change-Id: I60c8e758dff005569be7c96f2af1a0217019cb41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132172
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-01-17 02:41:55 +00:00
Filip Filmar c063f5d0c3 [i18n] Replaces fuchsia.deprecatedtimezone
The FIDL library fuchsia.deprecatedtimezone is going away.  There are
different and better ways to obtain the same functionality.

Fixes #39650

Change-Id: If4e4234568c276d3cd2be34863f00165b6e97e0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129005
Commit-Queue: Filip Filmar <fmil@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-01-17 00:37:35 +00:00