39 Commits

Author SHA1 Message Date
Zachary Anderson
40ca25819e Use a prebuilt Dart SDK during Fuchsia builds (flutter/engine#29680) 2021-11-11 13:24:37 -08:00
Jason Simmons
2c8702d096 Build a specialized snapshot for launching the service isolate in profile mode on Android (flutter/engine#29245) 2021-10-27 11:03:01 -07:00
Zachary Anderson
5c4431a610 Use a pool for dart actions to avoid OOMs (flutter/engine#27781)
* Use a pool for dart actions to avoid OOMs

* Add Windows support
2021-07-29 23:43:49 -07:00
Zachary Anderson
9b78f2cd77 Use the prebuilt SDK's VM to run its frontend_server (flutter/engine#27274) 2021-07-09 08:04:22 -07:00
Zachary Anderson
83066bd45d Add an option to use a prebuilt Dart SDK (flutter/engine#26931) 2021-07-08 10:36:34 -07:00
Dan Field
8ab4d95ea5 Partial reland for VM tests (flutter/engine#27069) 2021-06-30 10:54:50 -07:00
Dan Field
81388c9511 Revert "--sound-null-safety instead of enable-experiment where possible (#26999)" (flutter/engine#27059)
This reverts commit a34de4830b50728b589903abfe69a7d809967b73.
2021-06-29 21:36:07 -07:00
Dan Field
a34de4830b --sound-null-safety instead of enable-experiment where possible (flutter/engine#26999) 2021-06-29 15:36:03 -07:00
Martin Kustermann
fde57f1f1d Remove usages of --no-causal-async-stacks (flutter/engine#26877)
Passing the --causal-async-stacks flag to the VM will cause it to error
on VM startup. The VM will remove the flag entirely, but before doing so
we'll have to remove usages of the negated version of the flag, namely
--no-causal-async-stacks.
2021-06-23 14:30:26 +02:00
Emmanuel Garcia
1bad6de1da Reland Dart plugin registrant (flutter/engine#25496) 2021-04-12 13:30:01 -07:00
Chris Bracken
9b4a0264d5 Correct typos throughout the engine/embedder (flutter/engine#25346)
Used the the `misspell` tool available at
https://github.com/client9/misspell, then applied hand-corrections. It's
possible we could adopt this as a presubmit, but there are still enough
false positives that it may not be worth the effort.
2021-04-01 11:08:19 -07:00
Gary Qian
9352ed557e Split AOT Engine Runtime (flutter/engine#22624) 2020-12-02 13:28:01 -08:00
Clement Skau
559463b492 Enable lazy-async-stacks by-default in all modes (Take 4) (flutter/engine#21802) 2020-10-20 10:31:15 +02:00
Chinmay Garde
db5c793ed5 Enable loading snapshots with sound null safety enabled. (flutter/engine#21820)
Snapshots compiled with sound null-safety enabled require changes to the way in
which isolates are launched. Specifically, the `Dart_IsolateFlags::null_safety`
field needs to be known upfront. The value of this field can only be determined
once the kernel snapshot is available. This poses a problem in the engine
because the engine used to launch the isolate at shell initialization and only
need the kernel mappings later at isolate launch (when transitioning the root
isolate to the `DartIsolate::Phase::Running` phase). This patch delays launch of
the isolate on the UI task runner till a kernel mapping is available. The side
effects of this delay (callers no longer having access to the non-running
isolate handle) have been addressed in this patch. The DartIsolate API has also
been amended to hide the method that could return a non-running isolate to the
caller.  Instead, it has been replaced with a method that requires a valid
isolate configuration that returns a running root isolate. The isolate will be
launched by asking the isolate configuration for its null-safety
characteristics.

A side effect of enabling null-safety is that Dart APIs that work with legacy
types will now terminate the process if used with an isolate that has sound
null-safety enabled. These APIs may no longer be used in the engine. This
primarily affects the Dart Convertors in Tonic that convert certain C++ objects
into the Dart counterparts. All known Dart Converters have been updated to
convert C++ objects to non-nullable Dart types inferred using type traits of the
corresponding C++ object. The few spots in the engine that used the old Dart
APIs directly have been manually updated. To ensure that no usage of the legacy
APIs remain in the engine (as these would cause runtime process terminations),
the legacy APIs were prefixed with the `DART_LEGACY_API` macro and the macro
defined to `[[deprecated]]` in all engine translation units. While the engine
now primarily works with non-nullable Dart types, callers can still use
`Dart_TypeToNonNullableType` to acquire nullable types for use directly or with
Tonic. One use case that is not addressed with the Tonic Dart Convertors is the
creation of non-nullable lists of nullable types. This hasn’t come up so far in
the engine.

A minor related change is reworking tonic to define a single library target.
This allows the various tonic subsystems to depend on one another. Primarily,
this is used to make the Dart convertors use the logging utilities. This now
allows errors to be more descriptive as the presence of error handles is caught
(and logged) earlier.

Fixes https://github.com/flutter/flutter/issues/59879
2020-10-16 14:53:26 -07:00
Zachary Anderson
5ef8d060bc Revert "Enable lazy-async-stacks by-default in all modes (Take 3) (#20895)" (flutter/engine#21043)
This reverts commit 4200d23617a13ae4e477483ad43493dd36e4d00b.
2020-09-09 09:25:17 -07:00
Clement Skau
4200d23617 Enable lazy-async-stacks by-default in all modes (Take 3) (flutter/engine#20895)
Lazy async stacks were already enabled by-default in AOT mode in [0] - which made the
gen_snapshot invocations use "--lazy-async-stacks --no-causal-async-stacks".

This change does the same with the engine defaults, which makes this be enabled
by-default in JIT mode as well.

See go/dart-10x-faster-async for more information.

This is a re-land: A fix for what we believe to have caused the last revert has landed upstream in Dart in dart-lang/sdk@0004589

[0] flutter/flutter@3478232
2020-09-07 10:55:48 +02:00
Jason Simmons
6de80232b2 Revert "Enable lazy-async-stacks by-default in all modes (2) (#19270)" (flutter/engine#20165)
This reverts commit 9a94fd08b4493c7af12d2c119f1f67f3a4288264.
2020-07-30 18:34:51 -07:00
Siva
03706dce89 Manual roll of Dart from 24c7666def...40fd1c456e (flutter/engine#20092)
* Manual roll of Dart from 24c7666def...40fd1c456e

dart-lang/sdk@40fd1c456e Revert "[dart:io] Add Abort() on HttpClientRequest"
dart-lang/sdk@17d7296a42 [vm/nnbd/bytecode] Fix reuse of type arguments in bytecode
dart-lang/sdk@58b6f40c73 Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns. (reland)
dart-lang/sdk@fc8a6d9f9b [VM/compiler] Dereference TypeRef literal when propagating constants.
dart-lang/sdk@0689ec527a Move "test.dart" (well, most of its contents) into pkg/test_runner.
dart-lang/sdk@1094b3c61d Prepare static error test updater tool to handle web tests.
dart-lang/sdk@b258585f2f [observatory] Migrate from deprecated isInstanceOf to isA.
dart-lang/sdk@dfe1d9b682 Disable OverrideContributor for Cider.
dart-lang/sdk@aea99b2f5c scope debug property assist to Diagnosticables
dart-lang/sdk@4b96f20a79 [dart:io] Add Abort() on HttpClientRequest
dart-lang/sdk@1b1a39708c [build] Use frameworks instead of libs
dart-lang/sdk@3fef522496 Revert "Reland "[vm] Replaces fuchsia.deprecatedtimezone""
dart-lang/sdk@8c664d4f3f Revert "Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns."
dart-lang/sdk@2efb5bebc7 [ dart:_http ] Fix typo in HTTP response timeline event
dart-lang/sdk@0884dae36c Revert "Fix the #include path for ICU headers"
dart-lang/sdk@5171534e81 Scope tweaks. Report REFERENCED_BEFORE_DECLARATION in more places.
dart-lang/sdk@6bba75079a Issue 42797. Understand in legacy libraries that a function returning Never (in Null Safety library) never returns.
dart-lang/sdk@b4ebbb7f5c [build] Update gn to match Fuchsia
dart-lang/sdk@cb428a7a02 [dart2js] Remove old bug work around in collector.
dart-lang/sdk@08663c20ab Change flutter patch to match existing DEPS on master branch
dart-lang/sdk@146ad014d9 update js/meta for the 2.10 dev sdk
dart-lang/sdk@488c718793 [co19] Roll co19 to d79951e06e443213243e54c2c32694b79a221b65
dart-lang/sdk@ba20edd7be Add patch for flutter-engine when changing to version 2.10

* Rev buildroot to latest version.

* Update license.

* update.

* Update gn revision.

* Format BUILD.gn files as the gn revision has been updated.
2020-07-29 13:10:15 -07:00
Clement Skau
9a94fd08b4 Enable lazy-async-stacks by-default in all modes (2) (flutter/engine#19270) 2020-07-29 12:25:30 +02:00
Chinmay Garde
84c394ba80 Abbreviate names of intermediate generated targets in testing.gni. (flutter/engine#18617) 2020-05-26 20:07:05 -07:00
Dan Field
0267c56245 Revert "Enable lazy-async-stacks by-default in all modes (#16556)" (flutter/engine#16781)
This reverts commit a39aad4a0305f2525479d055ecc3ddfbf45d303b.
2020-02-24 20:04:40 -08:00
Martin Kustermann
a39aad4a03 Enable lazy-async-stacks by-default in all modes (flutter/engine#16556)
This was already enabled by-default in AOT mode in [0] - which made the
gen_snapshot invocations use "--lazy-async-stacks --no-causal-async-stacks".

See go/dart-10x-faster-async for more information.

[0] https://github.com/flutter/flutter/commit/347823234fd
2020-02-20 18:31:26 +01:00
George Wright
69e635c0fc Enable shell_unittests on Fuchsia with Vulkan dependencies. (flutter/engine#16376)
This also adds a dependency on SwiftShader's Vulkan frontend.
2020-02-06 15:07:01 -08:00
George Wright
252134fac8 Expose the dart kernel snapshot target and copied assets as a public dependency (flutter/engine#16266)
This allows for targets to depend on the assets generated by the test_fixtures target.
2020-02-04 12:30:48 -08:00
Chinmay Garde
426c48aaac Remove all uses of the redundant flutter_root variable. (flutter/engine#16311)
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
2020-01-31 21:49:48 -08:00
George Wright
274356d3ab Ensure GetFixturesPath works on Fuchsia (flutter/engine#15978) 2020-01-24 15:47:29 -08:00
Jason Simmons
2c61d2336b Reformat BUILD.gn files to comply with the format checker presubmit script (flutter/engine#13401) 2019-10-29 09:49:16 -07:00
sjindel-google
5ea9c249cd Remove use of the blobs snapshot format from unittests (flutter/engine#12563)
* Remove uses of the "blobs" snapshot format in Engine tests.

* Comments

* Rebasing against updated ELF loader API.
2019-10-10 14:03:42 +02:00
Jonah Williams
c341326d6a Add support for JIT release mode (flutter/engine#12446) 2019-09-27 11:20:54 -07:00
Chris Bracken
116b9729ec Ensure trailing newline before EOF in C++ sources (flutter/engine#11489)
In generated text fixture location lookup code:
When the second argument to write_file() is a list, it is written one
item per line to the path specified by the first argument. This ensures
that we emit a trailing newline at EOF to comply with -Wnewline-eof.

Elsewhere:
Lack of a newline at EOF was undefined behaviour prior to C++11. The
Fuchsia tree sets -Wnewline-eof in its buildroot, so we plan to do the
same. This cleans up remaining first-party C++ sources that don't
include a trailing newline.
2019-08-27 00:13:00 -07:00
Chinmay Garde
cb00aac583 Allow specifying both Dart and non-Dart fixtures in engine unit-tests. (flutter/engine#9113)
* Allow specifying both Dart and non-Dart fixtures in engine unittests.

This fixes numerous issues in the way in which fixtures were managed
in the engine unit-tests.

* Instead of only being able to specify Dart fixtures, unit-tests may specify
  non-Dart fixtures as well. These are simply copied over to the fixtures
  directory known to the unit-test at runtime.
* An issue where numerous Dart files could be given to the kernel snapshotter
  has been addressed. It was anticipated that such a (legal) invocation to the
  kernel snapshotter would produce a snapshot with the contents of all the Dart
  files added to the root library. This is incorrect and the behavior in this
  case is undefined.
* Dart files referenced by the main Dart file are correctly tracked via a
  depfile.
* The snapshotter arguments have been cleaned up to get rid of unused
  arguments (`—strong`) and  the use of the VM product mode argument has been
  corrected to no longer depend on the Flutter product mode.
2019-05-28 19:11:47 -07:00
Chinmay Garde
1a7c5d7bf3 GN Format all files in the engine. (flutter/engine#8369) 2019-03-29 12:44:57 -07:00
Jason Simmons
a0f4916009 Remove the Dart JIT snapshot data from AOT builds of the embedder library (flutter/engine#7806)
Also extend the embedder unit tests to cover AOT execution
2019-02-15 09:43:23 -08:00
Chris Bracken
01da26e047 Support custom kernel blob path in test fixtures (flutter/engine#7525)
Updates the test_fixtures rule to support a custom kernel output file
name. Improves rule documentation.
2019-01-22 11:35:34 -08:00
Chris Bracken
8a0cc94b1a Compile embedder unit test Dart to kernel (flutter/engine#7231)
As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.

This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.

Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.

This also updates all existing sub-targets to be testonly.

This relands commit 4e4fb4608da95d198b0e796478462285ab974a3c, which was
reverted in commit 566db0ecb8f293bb9f7ff1fc39076b08336e0148. Rather than
running as prebuilt_dart_action, we use dart_action to ensure the
frontend snapshot it compatible with the VM on which it's executed.
2018-12-16 12:23:18 -08:00
Chris Bracken
566db0ecb8 Revert "Compile embedder unit test Dart to kernel (#7227)" (flutter/engine#7230)
This reverts commit 4e4fb4608da95d198b0e796478462285ab974a3c.

This broke dynamic release mode builds of
//flutter/runtime:runtime_fixtures_kernel (likely all product-mode
builds).
2018-12-15 14:43:26 -08:00
Chris Bracken
4e4fb4608d Compile embedder unit test Dart to kernel (flutter/engine#7227)
Compile embedder unit test Dart to kernel

As of the migration to Dart 2, it has been necessary to compile Dart to
kernel prior to execution. The embedder currently requires that the
resulting kernel file be named `kernel_blob.bin` and be located at the
root of the assets directory passed to the embedder API.

This patch updates the test_fixtures build rule to perform a kernel
compile using frontend_server, outputting `kernel_blob.bin` to
`fixtures/test_target_name` directory, and updates the embedder
unittests to specify the kernel file rather than the Dart source file.

Since the kernel compiler requires a `main()` function to be defined, it
also updates `simple_main.dart` from runtime_unittests to define
`main()` rather than `simple_main()`.

This also updates all existing sub-targets to be testonly.
2018-12-15 13:59:58 -08:00
Michael Goderbauer
0def82ddb0 Unify copyright lines (flutter/engine#6757) 2018-11-07 12:24:35 -08:00
Chinmay Garde
f0df2b460d Add a test_fixtures GN rule that allows unittests to reference fixtures. (flutter/engine#4280) 2017-10-25 14:54:20 -07:00