351 Commits

Author SHA1 Message Date
Siva
5e596f2ac8
Roll src/third_party/dart 67ab3be10d...43891316ca (#9670)
* Roll src/third_party/dart 67ab3be10d...43891316ca

dart-lang/sdk@/43891316ca [ VM / Observatory ] Emit IsolateReload event after reload completes
dart-lang/sdk@/2ea7e5513b Perform type promotion when NNBD, using flow analysis.
dart-lang/sdk@/766e542e53 handle return in async function
dart-lang/sdk@/51cf8f218a Add entension support to the summary idl
dart-lang/sdk@/0e9957c7b1 [dartdevc] Adding support for analyzer dep pruning
dart-lang/sdk@/c100308ba6 Repro for inferring arrays with out of range lengths
dart-lang/sdk@/5d77657e7a Prepare to publish analyzer version 0.37.0.
dart-lang/sdk@/86ce74caaa update NodeBuilder for default value type arguments
dart-lang/sdk@/439692c9e2 Mark the name in an extension as being in a declaration context
dart-lang/sdk@/372bcae536 [gardening] Fix 3xHEAD Flutter build after revert
dart-lang/sdk@/052874e93e Avoid non-web integer literal in corelib_2/int_round_test
dart-lang/sdk@/480337106e Implementation of extension override AST node
dart-lang/sdk@/4f78ad90df An initial and partial implementation of an element model for extensions
dart-lang/sdk@/744bb47361 [infra] Remove custom timeouts for dart2js compiler config
dart-lang/sdk@/9b53686ffb update NodeBuilder for declared identifier implicit type
dart-lang/sdk@/3d14b75f97 Revert "Reland "[vm/concurrency] Introduce concept of Isolate Groups""
dart-lang/sdk@/527238e008 [vm] Cleanup C99 header includes
dart-lang/sdk@/9f32f9b87e [cfe] Store the initializer tokens in constructor builders
dart-lang/sdk@/bbbeb8b509 Pull in latest pub
dart-lang/sdk@/851958ee54 update NodeBuilder to handle for loop
dart-lang/sdk@/7a73682c6a update NodeBuilder to handle catch clause
dart-lang/sdk@/fc6cb0ac21 [vm/ffi] Revamp struct representation in FFI.
dart-lang/sdk@/5fd51b9fd2 Cleanup remnants of ignoring Dart v1.x subtype checks
dart-lang/sdk@/45172f0690 Revert "Reland "[llvm] Add initial scaffolding""
dart-lang/sdk@/b9a6630367 [ Observatory ] _getVMTimeline -> getVMTimeline in timeline.js
dart-lang/sdk@/1f02c10b9a Update language_2/const_map4_test for type inference
dart-lang/sdk@/99ed4871b3 Fix a hint in analysis server
dart-lang/sdk@/c3c43689d5 [vm] Remove platform/math.h
dart-lang/sdk@/524fdc13a9 Reland "[llvm] Add initial scaffolding"
dart-lang/sdk@/45a9815aff [vm/debugger] break on asyncfunction entry
dart-lang/sdk@/e0eeffaf9b update NodeBuilder parameter tracking when visiting executable declarations
dart-lang/sdk@/182a59cebb Skip all tests that use spawnUri when running in simulator mode as it makes no sense to run the CFE on the simulator.
dart-lang/sdk@/1427a218f3 update DecoratedType asserts
dart-lang/sdk@/f4dc001729 Migration: begin adding support for LUB computations in conditional expressions.
dart-lang/sdk@/585794ab75 Fix status file line.
dart-lang/sdk@/4a69ef4a50 Skip all spawnURI tests for the simulator architectures as these tests involve invoking the front end for compilation which would mean the front end has to run in simulated mode.
dart-lang/sdk@/26f369eb8e Fix doc comment for NullabilityNode.forLUB
dart-lang/sdk@/9ed728ec7a Add: Example usage to fillRange method.
dart-lang/sdk@/fc7049ae7d Migration: implement support for user-definable prefix expressions.
dart-lang/sdk@/77aa5f0c02 Migration: Add support for function-typed formal parameters.
dart-lang/sdk@/326e970b81 Migration: handle method invocations that resolve to a getter.
dart-lang/sdk@/822de210b5 fix branch_canonicalization_test
dart-lang/sdk@/a2e1434603 Breaking changes for analyzer version 0.37
dart-lang/sdk@/6694aa821d [dart2js] new-rti: Temporary work-around for timeouts
dart-lang/sdk@/18ff5ce893 [dart2js] new-rti: Implement general As/Check methods
dart-lang/sdk@/90c88d984e Fix large integer literals in dart2js_extra/round_constant_folding_test
dart-lang/sdk@/9349f71721 bump linter to 0.1.93
dart-lang/sdk@/c384212f9e [vm] Remove vestigial verified_memory_test.cc file
dart-lang/sdk@/f4824d332d [vm] Drop support for MSVC older than 2013
dart-lang/sdk@/bbb027aa2a [vm] Fix offset that was breaking bare_instructions_trampolines_test
dart-lang/sdk@/1db0b4436c [dart2js] new-rti: Implement type bounds check
dart-lang/sdk@/686742585a Migration: add a more robust assertion to the DecoratedType constructor
dart-lang/sdk@/2fd4ca570b set DecoratedType.returnType for FunctionType
dart-lang/sdk@/ca4b6e533a [dart2js] new-rti: Implement basic is-test
dart-lang/sdk@/39b71253ce Fix for curly_braces_in_flow_control_structures lint.
dart-lang/sdk@/b6c3b2c98c Enable 'Surround with XYZ' only for Statement(s) in Block(s).
dart-lang/sdk@/79e478e50e Fixed some links
dart-lang/sdk@/279c1da42d Use absolute paths as canonical paths for inputs digest maps
dart-lang/sdk@/cbf9cff19f Infer types of field formals before all fields.
dart-lang/sdk@/0c6b3d1277 Migration: do better function type formatting in DecoratedType.toString.
dart-lang/sdk@/a76c459239 Migration: Remove unnecessary duplicate type test
dart-lang/sdk@/a515a0c256 Reland "[vm/ffi] SimDBC on Arm64 Android"
dart-lang/sdk@/0baf81e7d6 Tests for Never and potential nullable / non-nullable.
dart-lang/sdk@/26d308aad3 Use flow analysis for reporting use sites of not assigned locals during resolution.
dart-lang/sdk@/79f276e07d Migration: handle field formal parameters.
dart-lang/sdk@/c8c3572ca9 Migration: standardize method names in EdgeBuilderTest.
dart-lang/sdk@/c0c15c1283 Migration: build nullability node for default type parameter bounds directly.
dart-lang/sdk@/b57ff85906 Migration: clean up and test implicit dynamic return type of Function() syntax.
dart-lang/sdk@/0f2eda8644 Migration: add support for function expression invocations.
dart-lang/sdk@/a200980da0 Migration: add support for variable and field type inference.
dart-lang/sdk@/ca25f56883 Migration: add support for type inference of function types.
dart-lang/sdk@/a436c0621f Migration: fix DecoratedType.toString to support named function parameters.
dart-lang/sdk@/9dee307bdb Migration: update nullability graph debug dump to support union edges.
dart-lang/sdk@/b60dcdbf73 Migration: Remove the `create` parameter from Variables.decoratedElementType.
dart-lang/sdk@/18c21ee9d1 Migration: add support for generic instance creation.
dart-lang/sdk@/f7ddfdf6ca Migration: don't forget to visit variable initializers in NodeBuilder.
dart-lang/sdk@/a39e4fabfb Add information about the deprecated ParameterElement.parameterKind
dart-lang/sdk@/f6dfad02f4 [analyzer] add a space to the quick for for REPLACE_COLON_WITH_EQUALS

* Revert changes makde in the engine for the Isolate Group API change.

* Fix compilation error.

* Update license.

* Format.
2019-07-03 17:30:59 -07:00
Chris Bracken
fd24007cac
Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (#9638)
This is a reland of #9364 with fixes for Fuchsia.

000cf0560c clean up type_literal_test
0f20911022 Improve type_literal_test
a108bef7fb [vm, bytecode] Interpreter support for newer recognized natives.
2a15d38759 Revert "[llvm] Add initial scaffolding"
13b470ac46 Parse error expectations in tests.
b71d2d9996 [llvm] Add initial scaffolding
5f2bcd9d6c [vm/bytecode] Reuse flow graph building for recognized methods

This includes a breaking change: https://dart-review.googlesource.com/c/sdk/+/105241
```
  Dart_CreateIsolate -> Dart_CreateIsolateGroup
  Dart_IsolateCreateCallback -> Dart_IsolateGroupCreateCallback
  Dart_IsolateCleanupCallback -> Dart_IsolateGroupShutdownCallback
  Dart_CreateIsolateFromKernel -> Dart_CreateIsolateGroupFromKernel
  Dart_CurrentIsolateData -> Dart_CurrentIsolateGroupData
  Dart_IsolateData -> Dart_IsolateGroupData
  Dart_GetNativeIsolateData -> Dart_GetNativeIsolateGroupData
  Dart_InitializeParams.create -> Dart_InitializeParams.create_group
  Dart_InitializeParams.cleanup -> Dart_InitializeParams.shutdown_group
  Dart_InitializeParams.shutdown -> Dart_InitializeParams.shutdown_isolate
```
2019-07-01 15:47:49 -07:00
Chris Bracken
64b9eef5c1
Revert "Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (#9634)" (#9637)
This broke the Fuchsia build.

This reverts commit 45e1ad27400d5d48941ebffc76537aae11af9ea8.
2019-07-01 14:28:35 -07:00
Chris Bracken
45e1ad2740
Roll Dart to 67ab3be10d35d994641da167cc806f20a7ffa679 (#9634)
000cf0560c clean up type_literal_test
0f20911022 Improve type_literal_test
a108bef7fb [vm, bytecode] Interpreter support for newer recognized natives.
2a15d38759 Revert "[llvm] Add initial scaffolding"
13b470ac46 Parse error expectations in tests.
b71d2d9996 [llvm] Add initial scaffolding
5f2bcd9d6c [vm/bytecode] Reuse flow graph building for recognized methods

This includes a breaking change: https://dart-review.googlesource.com/c/sdk/+/105241
```
  Dart_CreateIsolate -> Dart_CreateIsolateGroup
  Dart_IsolateCreateCallback -> Dart_IsolateGroupCreateCallback
  Dart_IsolateCleanupCallback -> Dart_IsolateGroupShutdownCallback
  Dart_CreateIsolateFromKernel -> Dart_CreateIsolateGroupFromKernel
  Dart_CurrentIsolateData -> Dart_CurrentIsolateGroupData
  Dart_IsolateData -> Dart_IsolateGroupData
  Dart_GetNativeIsolateData -> Dart_GetNativeIsolateGroupData
  Dart_InitializeParams.create -> Dart_InitializeParams.create_group
  Dart_InitializeParams.cleanup -> Dart_InitializeParams.shutdown_group
  Dart_InitializeParams.shutdown -> Dart_InitializeParams.shutdown_isolate
```
2019-07-01 12:55:57 -07:00
Chris Bracken
107fe82343
Add --observatory-host switch (#9485)
Adds --observatory-host, which allows callers to specify the localhost
IP binding directly. Allows users to set 0.0.0.0 or the host IP address
as is possible in the standalone VM, rather than restricting users to
loopback.

We retain the default behaviour of binding to loopback since the vast
majority of observatory use-cases involve local access (e.g. host tests
on flutter_tester) or port-forwarded local access (e.g. flutter driver
device tests). However, some scenarios, such as QA test labs, may
benefit from binding to a publicly-accessible IP address.
2019-06-25 13:20:39 -07:00
Jason Simmons
7a5ec8d792
Remove build flags for dynamic patching (#9394) 2019-06-20 15:25:04 -07:00
Jason Simmons
fcff2d619c
Use the DartServiceIsolate status callback to publish the observatory URI to the Android embedder (#9337)
The Android embedder had been using a JNI call to get the observatory URI from
DartServiceIsolate.  This call was not thread safe and was redundant with the
server status callback mechanism used on iOS.
2019-06-17 16:17:29 -07:00
Jason Simmons
ea7ca9804a
Send the isolate service ID from the engine to the embedder (#9324)
Applications can use an embedder API to obtain the isolate ID and then use it
in calls to the Dart service protocol.
2019-06-17 16:02:26 -07:00
Chinmay Garde
96a1a843cb
Replace lock_guard with scoped_lock and use class template argument deduction. (#9338) 2019-06-17 10:08:45 -07:00
Zachary Anderson
0a2e28d797
Revert tracing changes (#9296)
* Revert "[fuchsia] Fix alignment of Fuchsia/non-Fuchsia tracing (#9289)"

This reverts commit f80ac5f571479053b134e60bca77603269b2ce2a.

* Revert "Align fuchsia and non-fuchsia tracing (#9199)"

This reverts commit 78265484623037c6544dfd5380367bca29fa27b0.
2019-06-12 10:25:49 -07:00
liyuqian
9f088c65ee
Add onReportTimings and FrameRasterizedCallback API (#8983)
Using it, a Flutter app can monitor missing frames in the release mode, and a custom Flutter runner (e.g., Fuchsia) can add a custom FrameRasterizedCallback.

Related issues:
https://github.com/flutter/flutter/issues/26154
https://github.com/flutter/flutter/issues/31444
https://github.com/flutter/flutter/issues/32447

Need review as soon as possible so we can merge this before the end of May to catch the milestone.

Tests added:
* NoNeedToReportTimingsByDefault
* NeedsReportTimingsIsSetWithCallback
* ReportTimingsIsCalled
* FrameRasterizedCallbackIsCalled
* FrameTimingSetsAndGetsProperly
* onReportTimings preserves callback zone
* FrameTiming.toString has the correct format

This will need a manual engine roll as the TestWindow defined in the framework needs to implement onReportTimings.
2019-06-06 10:42:48 -07:00
Dan Field
7826548462
Align fuchsia and non-fuchsia tracing (#9199) 2019-06-05 15:14:27 -07:00
Chinmay Garde
37b367e4d2
Allow specifying both Dart and non-Dart fixtures in engine unit-tests. (#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
Chris Bracken
0f1ff3bdb3
Correct typos, adopt US spellings (#9081)
Corects a bnuch of typeos throughout teh engien codebsae. Also makes
a couple minor Commonwealth -> US spelling adjustments for consistency
with the rest of Flutter's codebase.

Made use of `misspell` tool:
https://github.com/client9/misspell
2019-05-25 13:14:46 -07:00
Matthew Dempsky
3cdfa807fa Replace ararysize macro with fml::size function (#8975)
This is forward compatible with std::size and similar to how Chromium
removed use of the arraysize macro.
2019-05-15 12:43:47 -07:00
Matthew Dempsky
66087301cd Roll tonic and update #includes (#8950) 2019-05-14 11:57:09 -07:00
Jason Simmons
b3b817a9b3
Add a minimal set of symbols to the dynamic symbol table for Linux executables (#8937)
This will reduce executable size.
2019-05-13 16:12:58 -07:00
Dan Field
2b1f9925e4
new lints (#8849)
Dart lints added:
* Avoid optional new
* Avoid optional const
* Prefer single quotes
* Prefer default assignment `=`
2019-05-07 16:10:21 -07:00
Jason Simmons
1502300ccd
Log the sticky error during isolate shutdown (#8742)
The sticky error may be set in cases such as an unhandled asynchronous
exception.  This is similar to the logging done in the Dart command line
embedder's isolate shutdown callback.
2019-04-25 15:08:53 -07:00
Zachary Anderson
3a29e6a7a7
Plumb arguments from Settings to Dart main() (#8710) 2019-04-25 07:57:54 -07:00
Chinmay Garde
2e4f0a4a72
Put the testing lib in the flutter namespace. (#8661) 2019-04-20 20:42:46 -07:00
Chinmay Garde
1239df96aa
Allow native bindings in secondary isolates. (#8658)
The callbacks can be wired in via the Settings object. Both runtime and shell unit-tests have been patched to test this.
2019-04-19 17:36:36 -07:00
Chinmay Garde
6257dfeb53
Add factory methods to FileMapping that make it easy to create common mappings. (#8652)
The GetMapping calls removed in this patch had the same code and had to be repeated across different test harnesses as well as in dart_snapshot.cc. Just make this a factory method so the code is less verbose.
2019-04-19 12:48:53 -07:00
Chinmay Garde
1e5f59d4f6
Reland "Remove DartSnapshotBuffer and dry up snapshot resolution logic". (#8645)
This reverts commit 0fcfa0df2aa19947ad73882ab4fb24fc9124e47b.
Windows depends on referencing the snapshot symbols directly instead of
via dlsym. Something in the way these symbolsa are generated in
bin_to_assembly.py is causing them to be inaccessible at runtime.
2019-04-18 18:54:43 -07:00
Matthew Dempsky
4688dc7700 Remove unnecessary DartIO::EntropySource wrapper (#8635) 2019-04-18 17:15:04 -07:00
Chinmay Garde
0fcfa0df2a
Revert "Remove DartSnapshotBuffer and dry up snapshot resolution logic. (#8640)" (#8644)
This reverts commit 905ddb6ca9f9dcb6b1a7cea67d502da094867623.
2019-04-18 16:46:03 -07:00
Chinmay Garde
905ddb6ca9
Remove DartSnapshotBuffer and dry up snapshot resolution logic. (#8640)
Fixes https://github.com/flutter/flutter/issues/26782.
2019-04-18 16:01:19 -07:00
Chinmay Garde
c6400e2c25
Merge runtime lifecycle unittests into the base test target. (#8634)
`//flutter/runtime: runtime_lifecycle_unittests` was added because the these assumed that there was no VM already running in the process. Running other tests in the base target would mess up that assumption. Now that all test targets have been updated to make sure the VM instance does not leak, the tests in this target can be merged.

LUCI bots don’t need to be patched as these tests were only ever run on the trybots.
2019-04-18 12:15:45 -07:00
Chinmay Garde
8b5a50c0df
Test saving compilation traces. (#8618) 2019-04-17 19:42:33 -07:00
Chinmay Garde
7d3caf8952
Avoid leaking the VM in runtime_unittests and update failing tests. (#8626)
The failing tests were depending on the old assumption that the VM would never
shutdown.
2019-04-17 19:06:03 -07:00
Chinmay Garde
876c4c3390
Assert that all VM launches in the process have the same opinion on whether the VM should be leaked in the process. (#8622)
There is a possibility for a VM launch to not have a requisite shutdown if a previous launch asked to leak the VM instance in the process. Embedders have to ensure (via their Embedding APIs) that all instances of VM launch use consistent settings.
2019-04-17 17:25:16 -07:00
Chinmay Garde
f017fe74aa
Avoid manually shutting down engine managed isolates. (#8621)
These are now shutdown by the VM and cleanup waits for their shutdown.
2019-04-17 16:11:47 -07:00
liyuqian
8ff631f3df
Rename flow namespace to flutter (#8615)
This follows our namespace change from shell to flutter: https://github.com/flutter/engine/pull/8520.
2019-04-17 14:38:45 -07:00
Ben Konyi
0a2869e5c3
Added support for authentication codes for the VM service (#8527) 2019-04-10 14:38:58 -07:00
Chinmay Garde
39e1d00f39
Remove redundant specification of the |flutter| namespace in the engine. (#8523) 2019-04-09 17:50:06 -07:00
Chinmay Garde
eec74e5c92
Rename the blink namespace to flutter. (#8517)
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
2019-04-09 12:44:42 -07:00
Chinmay Garde
046b3cd28e
Get rid of the macro for accessing the current test name. (#8500) 2019-04-08 16:11:21 -07:00
Chinmay Garde
424045c3f2
Enable shutting down all root isolates in a VM. (#8457)
This reverts commit 800ea0a40397d53311715e0de94f0340195bfcea.
2019-04-05 13:34:40 -07:00
Chinmay Garde
800ea0a403
Revert "Enable shutting down all root isolates in a VM. (#8402)" (#8431)
This reverts commit b59c4436ce9fb8aa09bad6eb5ca729350a3ab272.
2019-04-03 17:08:56 -07:00
Chinmay Garde
b59c4436ce
Enable shutting down all root isolates in a VM. (#8402) 2019-04-03 15:44:29 -07:00
Chinmay Garde
7e38b0aa23
Revert "Revert "Separate the data required to bootstrap the VM into its own class. (#8397)" (#8406)" (#8414)
This reverts commit f7b4903d7c9913447af3aaebc4308d1a1e2a4dde.
2019-04-03 13:38:12 -07:00
Zachary Anderson
f7b4903d7c
Revert "Separate the data required to bootstrap the VM into its own class. (#8397)" (#8406)
This reverts commit c991647404f8117dab2ca4ed49aa3ba48a634240.
2019-04-02 09:12:56 -07:00
Chinmay Garde
c991647404
Separate the data required to bootstrap the VM into its own class. (#8397)
When attempting to shutdown and subsequently restart the VM, having the
VM own this data introduces lifecycle issues due to circular references.
2019-04-01 14:58:05 -07:00
Chinmay Garde
8dabd60a30
Remove unused DartVM::IsKernelMapping (#8381) 2019-03-29 20:53:40 -07:00
Chinmay Garde
131cc625a1
Allow native entrypoint registration for runtime unittests. (#8379) 2019-03-29 17:53:49 -07:00
Chinmay Garde
972afdc92b
Allow running runtime_unittests in AOT mode. (#8375)
Previously, only the most basic tests were run in AOT mode.
2019-03-29 17:15:38 -07:00
Chinmay Garde
86f4b741b8
Move libdart selection into its own target in //flutter/runtime. (#8373)
Cleanup repeated rules.
2019-03-29 14:29:09 -07:00
Chinmay Garde
a1a2129bc4
GN Format all files in the engine. (#8369) 2019-03-29 12:44:57 -07:00
Ben Konyi
f521df3839
Fixed service isolate not being initialized correctly due to bad name (#8251)
* Fixed service isolate not being initialized correctly due to bad name

The name for the service isolate was being set to the empty string,
causing the microtask loop to not be run on the service isolate leading
to the service hanging on the first 'await'. See
https://dart-review.googlesource.com/c/sdk/+/97107 for revert due to
this issue.

* Removed unnecessary params from DartCreateAndStartServiceIsolate
2019-03-26 14:36:51 -07:00
Gary Qian
3661d5e43b
Re-land "Buffer lifecycle in WindowData" (#8032) 2019-03-06 15:38:34 -08:00