* Roll Dart to 011676641a8b4b77bb372384c712709cbf037675.
Reverts b6be9377c58c488afea042a1b0ed8910b158c319 and uses Dart_NewExternalTypedDataWithFinalizer.
* update license goldens
fe606f890b Revert [vm/compiler] Canonicalize more intermediate constants in IL.
54531ad4e7 Bring in the latest pub_semver
61b15fede8 [build] Remove unnecessary inputs from uses of application_snapshot.
9968728df1 Remove package:cli_util deps from package:analyzer.
0ca8b6e5be Improve recovery when "assert" is used in an expression
6de5da1f58 fix#32649, add an option to disable asserts in DDC/K
afbaf0c4a6 Add 'Extract Widget' to getAvailableRefactorings().
d4a1896cfb Demote IMPORT_DUPLICATED_LIBRARY_NAMED to a warning
f85480b4dd Add tests for CFE implementation of expression compilation.
a865531f57 Remove two unused classes from the public API
3b7199fe63 [standalone] Only allow one outstanding load when running with --deterministic.
35fecb4a10 Issue 32896. Add isXYZ accessors to ParameterElementForLink_VariableSetter.
8df94f34fd Improve fasta parser await-for statement recovery
dd897d35a2 Move the task API out of the public API
c32e0e4bf3 [vm] Clear trailing bytes of objects that end up in snapshot images.
3a5fcf5a87 Upgrade the dep on package:isolate.
973a1a0219 Remove uses of upper-case constants in remaining SDK code.
b3595d59b3 [VM] Revert small change in FlowGraphCompiler::EmitTestAndCallCheckCid
0cbd4b520a Address review comments from change 51120
5dd283e783 fix#32270, DDC tests can now work with preview-dart-2
ce2b0db370 Improve fasta parser "assert" recovery
f8f5365a94 [vm/compiler] Fix sorting of instructions stats.
30655dcea0 [vm/aot] Treat Endian.host as a compile time constant.
eeaea82b75 Update status on test that often times out
805c08d8bf Fix a run-time type issue when running in Dart 2 mode
b1bc4ed2b5 Handle as in nested const constructors
823dfda5a5 Delete serialization, except for equivalence and helpers used in other tests.
7383cd46e0 Fix for issue 32872
86ba29265a Clean up the use of deprecated API in the analyzer_plugin package
fbb60b786f Add generic bounds test to function_type_variable_test
fd5f998796 [vm] Delta-encode offsets into ROData.
6fe7a86e7f Replace SourceFactory.resolveUri() with resolveRelativeUri() in resynthesizer.
2fb94418cd Mark mirrors test crashing.
c2b338f1b7 Remove fuzzy arrow support from analyzer
9976cddcd7 Shared cache of FileState contents.
b52931ff30 Revert "[vm/kernel] Fix non-canoncialized type arguments in partial instantiation."
c214c43758 Make LineInfo a public class
bd12c869ae [vm/kernel] Fix non-canoncialized type arguments in partial instantiation.
51a2f96a71 Always call writeAnnotationList to write annotations.
974a8ee21d Fix crash in named function expression
988de9c925 Thread forest object through calls
51f9d243e7 [VM] Mark type as finalized before calling the Canonicalize() method
a8578eaf69 Clean up some imports in Fasta type inference
e9616da13e Cleanup TypeInfo
3b414a277c Reland "[VM] Introduction of type testing stubs - Part 1-4"
c5f69dff2d Include `call` on Closure in inference
826928e2ab Use _trust to test inference of --omit-implicit-checks
6802746ad7 Fixed a couple of typos in subtyping.md
782cfe04d1 fix#32756, DDC dynamic calls to generics will work with emit-metadata
8613938e33 fix DDK to track mock setters correctly.
92f1d0fab4 [gn] Allow single or double quotes in .config
e2ee654cd1 Make a method in MempryResourceProvider private
b0fafbd1f4 Clean up js_runtime parse/tryParse methods
5e1cb4d41b Make SourceRange part of analyzers public API
1ab4cee181 Add a benchmark for running flutter analyze --flutter-repo against flutter head.
ff24a5ee6b fasta: make strong-mode inference aware of the type of LoadLibrary and CheckLibraryIsLoaded
6d7df88fa3 Delay computing file name sets until they are requested.
b7cc1e7ce7 Fix stack overflow in RTI computation
6db4ea4ca5 [vm] Use unsigned varints when possible in the clustered snapshot.
* Roll dart sdk again. Previous roll required 23ae4fa098 revert.
Changes since last roll:
```
23ae4fa098 Revert "[VM] Reduce Smi size to 32 bit on 64 bit platforms"
6ab6d1eda9 Suppress fromRect its only available in DOMRect and not in ClientRect - will open bug to fix this issue.
f4621b1898 [tests hot-reload] Remove obsolete crash entry in status file (issue #31660).
f3cec061eb Capture type variables in global NSM stubs
2247843f48 Update checked-in SDKs to 2.0.0-dev.47.0
34be5de0c7 Fixed _DomRect class to map to both ClientRect and DOMRect for browser backward compat.
5c508ff785 Update more IdentifierContext type reference recovery
8054721512 Move DeclaredVariables to a better location
3851591642 [infra] Keep comments intact when updating status files.
7764e6962e Initial API to build analysis contexts (replaces ContextLocator.locateContexts)
5ea271bb01 Clean up documentation of implicit new/const insertions tests.
cf93009caf Removed the magic const feature from implicit-creation.md
bd39320b3b Recover from error on undefined continue label.
5d89a1ac32 Add tests for mixin application constructor forwarding.
e6962790a1 Use import URIs when invalidating files
23c59bd819 Fix compare_failures
290cc58e71 Use actual receiver when error-wrapping a null-aware property get.
34763bc4c9 Reland "[VM] Introduction of type testing stubs - Part 1-4"
a86b864fa9 Handle updated .packages in incremental compiler
f555ae505a Trust type annotations in strong mode
0a4a3bed68 When cloning YieldStatement, copy the flags
91bbc798fa Skip abstract forwarding stubs
7689dc9e06 Bring in the latest pub_semver
f71d204185 Fix expected type in substByContext
5e99872770 Improve missing/invalid type reference recovery
899dbe4dae Forward type arguments in one-shot interceptors.
1fd3011f47 dart2js: Add more whole-program information to dump-info
5e23c2843d Revert "[infra] Temporarily disable Windows SDK builder on CQ"
2471888d4a Serialize any MethodInvocation as possible const.
b430570364 dart2js: handle constant casts with type variable substitutions
3575b810b3 Only add const in a constant context (issue 32819)
09f7d2aee5 dart2js: naive support for instantiations in constants - ignore the actual instantiation
4dd5e6e6ad js_runtime: fix _JsonMap keys list type
71ffe976a9 Correctly handle constant fields when computing constness (take 2)
d58b0e2d44 [VM] Mark bigint test slow after small Smi change
1e997ee6b7 Revert "Reland "[VM] Introduction of type testing stubs - Part 1-4""
00097adce0 Remove reference to deprecated setter
cb065a116f [infra] Update checked-in SDK version to 2.0.0-dev.46.0
0e9a77a360 [VM] Reduce Smi size to 32 bit on 64 bit platforms
34bfefd508 [gardening] Update status file
969c0de335 Avoid crash on EOF error in file with Windows line encoding
8054409a02 Reland "[VM] Introduction of type testing stubs - Part 1-4"
```
* Update license hash
* Support multiple shells in a single process.
The Flutter Engine currently works by initializing a singleton shell
instance. This shell has to be created on the platform thread. The shell
is responsible for creating the 3 main threads used by Flutter (UI, IO,
GPU) as well as initializing the Dart VM. The shell, references to task
runners of the main threads as well as all snapshots used for VM
initialization are stored in singleton objects. The Flutter shell only
creates the threads, rasterizers, contexts, etc. to fully support a
single Flutter application. Current support for multiple Flutter
applications is achieved by making multiple applications share the same
resources (via the platform views mechanism).
This scheme has the following limitations:
* The shell is a singleton and there is no way to tear it down. Once you
run a Flutter application in a process, all resources managed by it
will remain referenced till process termination.
* The threads on which the shell performs its operations are all
singletons. These threads are never torn down and multiple Flutter
applications (if present) have to compete with one another on these
threads.
* Resources referenced by the Dart VM are leaked because the VM isn't
shutdown even when there are no more Flutter views.
* The shell as a target does not compile on Fuchsia. The Fuchsia content
handler uses specific dependencies of the shell to rebuild all the
shell dependencies on its own. This leads to differences in frame
scheduling, VM setup, service protocol endpoint setup, tracing, etc..
Fuchsia is very much a second class citizen in this world.
* Since threads and message loops are managed by the engine, the engine
has to know about threading and platform message loop interop on each
supported platform.
Specific updates in this patch:
* The shell is no longer a singleton and the embedder holds the unique
reference to the shell.
* Shell setup and teardown is deterministic.
* Threads are no longer managed by the shell. Instead, the shell is
given a task runner configuration by the embedder.
* Since the shell does not own its threads, the embedder can control
threads and the message loops operating on these threads. The shell is
only given references to the task runners that execute tasks on these
threads.
* The shell only needs task runner references. These references can be
to the same task runner. So, if the embedder thinks that a particular
Flutter application would not need all the threads, it can pass
references to the same task runner. This effectively makes Flutter
application run in single threaded mode. There are some places in the
shell that make synchronous calls, these sites have been updated to
ensure that they don’t deadlock.
* The test runner and the headless Dart code runner are now Flutter
applications that are effectively single threaded (since they don’t
have rendering concerns of big-boy Flutter application).
* The embedder has to guarantee that the threads and outlive the shell.
It is easy for the embedder to make that guarantee because shell
termination is deterministic.
* The embedder can create as many shell as it wants. Typically it
creates a shell per Flutter application with its own task runner
configuration. Most embedders obtain these task runners from threads
dedicated to the shell. But, it is entirely possible that the embedder
can obtain these task runners from a thread pool.
* There can only be one Dart VM in the process. The numerous shell
interact with one another to manage the VM lifecycle. Once the last
shell goes away, the VM does as well and hence all resources
associated with the VM are collected.
* The shell as a target can now compile and run on Fuchsia. The current
content handler has been removed from the Flutter engine source tree
and a new implementation has been written that uses the new shell
target.
* Isolate management has been significantly overhauled. There are no
owning references to Dart isolates within the shell. The VM owns the
only strong reference to the Dart isolate. The isolate that has window
bindings is now called the root isolate. Child isolates can now be
created from the root isolate and their bindings and thread
configurations are now inherited from the root isolate.
* Terminating the shell terminates its root isolates as well as all the
isolates spawned by this isolate. This is necessary be shell shutdown
is deterministic and the embedder is free to collect the threads on
which the isolates execute their tasks (and listen for mircrotasks
flushes on).
* Launching the root isolate is now significantly overhauled. The shell
side (non-owning) reference to an isolate is now a little state
machine and illegal state transitions should be impossible (barring
construction issues). This is the only way to manage Dart isolates in
the shell (the shell does not use the C API is dart_api.h anymore).
* Once an isolate is launched, it must be prepared (and hence move to
the ready phase) by associating a snapshot with the same. This
snapshot can either be a precompiled snapshot, kernel snapshot, script
snapshot or source file. Depending on the kind of data specified as a
snapshot as well as the capabilities of the VM running in the process,
isolate preparation can fail preparation with the right message.
* Asset management has been significantly overhauled. All asset
resolution goes through an abstract asset resolver interface. An asset
manager implements this interface and manages one or more child asset
resolvers. These asset resolvers typically resolve assets from
directories, ZIP files (legacy FLX assets if provided), APK bundles,
FDIO namespaces, etc…
* Each launch of the shell requires a separate and fully configured
asset resolver. This is necessary because launching isolates for the
engine may require resolving snapshots as assets from the asset
resolver. Asset resolvers can be shared by multiple launch instances
in multiple shells and need to be thread safe.
* References to the command line object have been removed from the
shell. Instead, the shell only takes a settings object that may be
configured from the command line. This makes it easy for embedders and
platforms that don’t have a command line (Fuchsia) to configure the
shell. Consequently, there is only one spot where the various switches
are read from the command line (by the embedder and not the shell) to
form the settings object.
* All platform now respect the log tag (this was done only by Android
till now) and each shell instance have its own log tag. This makes
logs from multiple Flutter application in the same process (mainly
Fuchsia) more easily decipherable.
* The per shell IO task runner now has a new component that is
unfortunately named the IOManager. This component manages the IO
GrContext (used for asynchronous texture uploads) that cooperates with
the GrContext on the GPU task runner associated with the shell. The
IOManager is also responsible for flushing tasks that collect Skia
objects that reference GPU resources during deterministic shell
shutdown.
* The embedder now has to be careful to only enable Blink on a single
instance of the shell. Launching the legacy text layout and rendering
engine multiple times is will trip assertions. The entirety of this
runtime has been separated out into a separate object and can be
removed in one go when the migration to libtxt is complete.
* There is a new test target for the various C++ objects that the shell
uses to interact with the Dart VM (the shell no longer use the C API
in dart_api.h). This allows engine developers to test VM/Isolate
initialization and teardown without having the setup a full shell
instance.
* There is a new test target for the testing a single shell instances
without having to configure and launch an entire VM and associated
root isolate.
* Mac, Linux & Windows used to have different target that created the
flutter_tester referenced by the tool. This has now been converted
into a single target that compiles on all platforms.
* WeakPointers vended by the fml::WeakPtrFactory(notice the difference
between the same class in the fxl namespace) add threading checks on
each use. This is enabled by getting rid of the “re-origination”
feature of the WeakPtrFactory in the fxl namespace. The side effect of
this is that all non-thread safe components have to be created, used
and destroyed on the same thread. Numerous thread safety issues were
caught by this extra assertion and have now been fixed.
* Glossary of components that are only safe on a specific thread (and
have the fml variants of the WeakPtrFactory):
* Platform Thread: Shell
* UI Thread: Engine, RuntimeDelegate, DartIsolate, Animator
* GPU Thread: Rasterizer, Surface
* IO Thread: IOManager
This patch was reviewed in smaller chunks in the following pull
requests. All comments from the pulls requests has been incorporated
into this patch:
* flutter/assets: https://github.com/flutter/engine/pull/4829
* flutter/common: https://github.com/flutter/engine/pull/4830
* flutter/content_handler: https://github.com/flutter/engine/pull/4831
* flutter/flow: https://github.com/flutter/engine/pull/4832
* flutter/fml: https://github.com/flutter/engine/pull/4833
* flutter/lib/snapshot: https://github.com/flutter/engine/pull/4834
* flutter/lib/ui: https://github.com/flutter/engine/pull/4835
* flutter/runtime: https://github.com/flutter/engine/pull/4836
* flutter/shell: https://github.com/flutter/engine/pull/4837
* flutter/synchronization: https://github.com/flutter/engine/pull/4838
* flutter/testing: https://github.com/flutter/engine/pull/4839
* Roll dart to 7764e6962e22afcf4b58c4e3cef3147330f3c884.
Changes since last roll:
```
7764e6962e Initial API to build analysis contexts (replaces ContextLocator.locateContexts)
5ea271bb01 Clean up documentation of implicit new/const insertions tests.
cf93009caf Removed the magic const feature from implicit-creation.md
bd39320b3b Recover from error on undefined continue label.
5d89a1ac32 Add tests for mixin application constructor forwarding.
e6962790a1 Use import URIs when invalidating files
23c59bd819 Fix compare_failures
290cc58e71 Use actual receiver when error-wrapping a null-aware property get.
34763bc4c9 Reland "[VM] Introduction of type testing stubs - Part 1-4"
a86b864fa9 Handle updated .packages in incremental compiler
f555ae505a Trust type annotations in strong mode
0a4a3bed68 When cloning YieldStatement, copy the flags
91bbc798fa Skip abstract forwarding stubs
7689dc9e06 Bring in the latest pub_semver
f71d204185 Fix expected type in substByContext
5e99872770 Improve missing/invalid type reference recovery
899dbe4dae Forward type arguments in one-shot interceptors.
1fd3011f47 dart2js: Add more whole-program information to dump-info
5e23c2843d Revert "[infra] Temporarily disable Windows SDK builder on CQ"
2471888d4a Serialize any MethodInvocation as possible const.
b430570364 dart2js: handle constant casts with type variable substitutions
3575b810b3 Only add const in a constant context (issue 32819)
09f7d2aee5 dart2js: naive support for instantiations in constants - ignore the actual instantiation
4dd5e6e6ad js_runtime: fix _JsonMap keys list type
71ffe976a9 Correctly handle constant fields when computing constness (take 2)
d58b0e2d44 [VM] Mark bigint test slow after small Smi change
1e997ee6b7 Revert "Reland "[VM] Introduction of type testing stubs - Part 1-4""
00097adce0 Remove reference to deprecated setter
cb065a116f [infra] Update checked-in SDK version to 2.0.0-dev.46.0
0e9a77a360 [VM] Reduce Smi size to 32 bit on 64 bit platforms
34bfefd508 [gardening] Update status file
969c0de335 Avoid crash on EOF error in file with Windows line encoding
8054409a02 Reland "[VM] Introduction of type testing stubs - Part 1-4"
```
* Ignore freetype2 in skia since 'we use our own version'
* Update license hash
Engine build is currently broken, so reverting Dart SDK roll for now.
* Revert "Roll Dart to ef926f98f525b085e1488be8c42b1c3f0a24c50d (#4951)"
This reverts commit 7be9d6f3c21799d83e9524f2763f9d0528ab2601.
* Dart roll
b5b8080b2c Disable the conflicting generics check when using the old task model.
9986b6de25 Fix bugs in implicit-creation tests. Add one more test.
d22ac9f071 Faster first/last on VM implementation of (Linked)HashSet.
f8f97bf105 *.status files and DEPS updated to include latest fixes for co19 tests
235e62264e [VM] Reland Support some 32bit instructions in 64bit assemblers.
17d5c44d40 [fasta] Invalidate part file when init from dill
d3c3ac48a3 Remove implicit 'implements Function' for strong mode
6baae53a5b Check functionTypeIndex in rti_emission_test
e047586a0e Fix bad merge after 2181119d879da8e0293ddee698dc50e3de631750
2181119d87 Test and fix invalidating file exporting main
080e7e6073 Fix status files: file is excluded and so dartanalyzer errs on test.
c8ee601268 Add feature specification draft for Dart 2.0 subtyping
73944a3a5c Stop running corelib_2 in dart2js legacy
748cfdff7e Refactor to efficiently find analysis roots correctly fix#31343 & #31344.
c2a8632665 Cleanup language_2 .status
6189b9a360 Change Flutter Outline API to provide full instrumented code instead of edits.
2448814e83 Also exclude 'Ok' as a valid status to ignore when checking for runtime errors in Runtime.none
b1778e5c34 Stop running language_2 tests on legacy mode
4066804e5f Remove hint suppression now that MapEntry has landed
f5e4f88c71 Skip assertions in InlineWeeder unless enabled
ce715c3157 [Kernel] Annotate status file with newly filed issues.
a4c69b7729 Pass platform sdk as uri to frontend server.
1d159e7c23 Rename annotation testing methods in Element
4688be6320 Pass sdkRoot as file path to frontend server.
3ac86d759e Revert "[VM] Support some 32bit instructions in 64bit assemblers."
d0eb2d63e8 [infra] Add front-end builder to test matrix
a5f173f165 [VM] Support some 32bit instructions in 64bit assemblers.
d1203a382f [fasta] Use platform as outline in incremental test; assert non-empty mixin bodies
5fd560f96b Add getters to replace ParameterKind
0b332de3a8 Refactor where AST re-writing is happening to not interact poorly with inference (issue 32342)
a528f09443 Update status for dartkp test null_nosuchmethod_test
e59018e714 Revert "Do not return this on RandomAccessFile.close"
14c1834334 [fasta] Add mixin test to incremental compiler test
2993476129 Report an error if a class inconsistently implements a generic interface.
e5295eb6d1 [fasta] Small changes to the incremental compiler
b2fa7c4497 Always create problems to ensure lines are removed from status files
c89055ee32 [VM] Fix type finalization for Kernel function types.
4ff939d3e4 [frontend-server] Keep output kernel file name through reload request.
11cbdbe26e When checking mixin type inference errors, don't skip mixins with explicit type args.
e74e2b3c3e Pass varFinalOrConst in beginVariablesDeclaration event
44aa9a17fd Do not return this on RandomAccessFile.close
9be25848e1 Roll async in DEPS to 2.0.6
8e8287f4e0 Add classes for instantiations
cae6d89429 Prepare language_dart2js.status to enable CFE by default on dart2js
7fd5294bb3 Add rules to build dart2js platform in strong mode
47ba426b62 [vm] Dump stack on SIGILL; print exception codes.
751de54dc0 Remove invalid dart:collection link in doc comments
22f860a229 Update AstBuilder to report illegal assignment
109316c484 Force inlining to match AST version
34f8c356a3 Fix sdk stack trace mapping so tools recognize it
514271e494 Prepare corelib.status for flipping on CFE on dart2js
80e2d30c20 [vm] Fix issue causing recursive_mixin_test to crash
2c956749a5 [VM] Add support to HierarchyInfo to not only create [CidRangeVector]s of subtypes but also subclasses
5d92543f42 [VM] Fix accidental double assignment
80805ff1c1 [VM] Make FlowGraphCompiler::EmitTestAndCallCheckCid static and therefore usable from stubs
9cfd721f78 [VM] Handle kVoidCid/kDynamicCid/kVectorCid the same way
65b2b1a671 [VM] Split handling of Code from non-Code in Thread::{CanLoadFromThread,OffsetFromThread}
2f10ab76f7 Mark incremental_load_from_dill_test slow on Windows
b70d7d55b7 Fix setting of body for procedures patched with redirecting factories
3a769b9dbe Add missing methods to make classes Dart 2 valid.
57a01968ed [fasta] Incremental compilation fallback
7d83584c5b Some kernel status file adjustments
c67cf2090a Make warning more warning-y.
e38e98afbe Update dart2js_native.status: updated to be accurate with our many configurations
1ce131b317 fix section for update_from_log
bde6603d92 Update dart2js_extra.status: now it correctly declares expectations for non-minified, minified, host-checked, checked, and fast-startup
be62fff82f Reland "[VM runtime] Switch intrinsics from old to new Bigint implementation."
* Update license
* Roll dart to ee15c8eb689791f6777eb3f6b0a1e9c58ff0671b.
* Update dart deps
* Skip over .emf-files.
.emf-files are binary media files in Microsoft enhanced mediaformat.
* Update license
* Cleanup license
* Clean up 3rd party licenses
This didn't break anything that we know of, but the engine is not
currently rollable to the framework due to a Dart bug. I'm reverting
this so we can get a fix landed for the Dart SDK, then roll, then
re-land this, then roll, to allow us to measure the performance impact
of the Dart SDK roll and the Skia roll independently.
This reverts commit 94ce14fb6a3c1568b8f641d114001ca22e308db4.
If Progress is instantiated with a max of 0, throw immediately to avoid
a divide-by-zero later in toString(). This typically happens if the tool
recurses over an empty top-level component, which can happen when a
component is moved around in the repo and the developer hasn't cleaned
up old empty directories from their git client.
* Roll garnet to b3ba6b6d6ab8ef658278cc43c9f839a8a8d1718e
Also includes a buildroot patch to pick up new dependency:
build/config/fuchsia/sdk.gni
This fixes a build breakage in
garnet/public/lib/fxl/strings/string_view_unittest.cc wherein a variable
'sw5' was declared but the test erroneously tested against 'sw4' from
the previous test.
* Update license script for garnet
Reflects structural changes in directories we do not depend on. This
filters out the following directories in addition to what was already
filtered:
garnet/drivers
garnet/packages
garnet/public/build/
garnet/public/rust/
* Update licenses
The hermetic Xcode tooling in that repo is not yet easily usable for
Xcode 9. There are two main issues:
1. The tooling currently assumes that macOS host builds should use
Xcode 8, whereas iOS builds should use Xcode 9. Flutter builds should
use Xcode 9 in all cases.
2. The tooling currently includes a bail-out condition for iOS builds
that exits non-zero immediately (Chrome hasn't yet migrated its iOS
build to this tooling).
In the meantime, I've manually updated the bot infra with Xcode 9 and
we'll continue to use the current find_xcode.py tooling until Chrome's
new Mac/iOS tooling is ready.
* Add dependency on chromium/src/build for Mac/iOS build
Preparation for migrating to mac_toolchain.py for installing/configuring
Xcode versions on the Mac build bots.
* Exclude third_party/chromium_build from licence script
It's used only at build time to fetch and install the correct Xcode
version.