421 Commits

Author SHA1 Message Date
George Wright
0517627988 Enable runtime_unittests on Fuchsia 2020-02-06 13:52:33 -08:00
stuartmorgan
9ad81dae16
Wrap strdup to use compliant name on Windows (#16372)
A number of POSIX methods were renamed on Windows to match standards
requirements, giving deprecation warnings when calling strdup on Windows.
This adds a wrapper, to allow calling _strdup on Windows instead.

Part of #16256
2020-02-05 22:32:56 -08:00
Jonah Williams
7e1d1440a3
Expose enable-service-port-fallback switch (#16366) 2020-02-04 12:00:58 -08:00
Chinmay Garde
f7b78e001d
Remove all uses of the redundant flutter_root variable. (#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
Chinmay Garde
dffe3fb276
Isolate and move common portable ELF loading from fixtures into //flutter/testing. (#16305)
Also update all known test harnesses to use this and fixes the broken shell_unittests harness.

Fixes https://github.com/flutter/flutter/issues/49853
2020-01-31 12:52:00 -08:00
Chinmay Garde
42069bef1c
Fix runtime_unittest in AOT mode by loading AOT symbols from ELF loader. (#16283)
This regressed when the symbols were no longer packed in discrete blobs but
instead moved to an ELF file.

Regressed in d9080029af
Unnoticed because of https://github.com/flutter/flutter/issues/49733
Fixes https://github.com/flutter/flutter/issues/49763
2020-01-31 11:21:22 -08:00
Chinmay Garde
d6b75b7c08
Remove superfluous INFO logs from //flutter/runtime. (#16280)
These add no value to engine developers anymore and are not visible to external
users because of the low log severity.
2020-01-30 18:53:45 -08:00
Chinmay Garde
5a1439c8e1
Revert "Disable setting a library tag handler." (#16157)
This reverts commit ef3aa0144c54ccd22efe014a4ee004aa6ba5b796. This address the use case of an internal customer. In a subsequent patch, I will add a test for this functionality. Instead of removing support for the same from tonic (along with the stuff surrounding filesystem access and package map handling), I’ll rework the same to use FML to avoid code duplication and maintainability.
2020-01-28 11:44:27 -08:00
Chinmay Garde
ef3aa0144c
Disable setting a library tag handler. (#16086)
This is only used in the command line VM. The only conceivable use of this would
be with IsolateMirror.loadURI which is not supported in Flutter or used in known
embedder API implementations (even ones that use mirrors).
2020-01-27 18:31:00 -08:00
Chinmay Garde
c5329ef5c4
Allow embedders to schedule a callback on all engine managed threads. (#15980)
`FlutterEnginePostCallbackOnAllNativeThreads` schedule a callback to be run on
all engine managed threads. The engine will attempt to service this callback the
next time the message loops for each managed thread is idle. Since the engine
manages the entire lifecycle of multiple threads, there is no opportunity for
the embedders to finely tune the priorities of threads directly, or, perform
other thread specific configuration (for example, setting thread names for
tracing). This callback gives embedders a chance to affect such tuning.

Fixes flutter/flutter#49551
Fixes b/143774406
Fixes b/148278215
Fixes b/148278931
2020-01-27 13:49:39 -08:00
Chinmay Garde
276481c4d3
Move tonic into //flutter/third_party. (#15895)
Tonic used to be used by multiple consumers outside of Flutter Engine. Due to
this, it has an unnecessary abstraction layer as well as utilities duplicated in
FML and other engine subsystems. The sole user of Tonic is now the Flutter
Engine. It is intended that the Flutter Engine team now owns this subsystem,
remove unnecessary utilities and document the headers. This is the first step in
the transition. No history is being imported as the initial history was already
lost in the transition of this component to fuchsia.googlesource. As this
component was unmaintained there, I could see no additional value in importing
the history of the patches there.

No functional change. Just moved the repo from //third_party to
//flutter/third_party and updates GN refs.
2020-01-25 17:01:56 -08:00
Jason Simmons
75c59c4f7d
Do not reset the child isolate preparer if the isolate group data already has one (#15952)
See https://github.com/flutter/flutter/issues/49358
2020-01-23 16:04:02 -08:00
Chinmay Garde
f10f03a6c4
Fix data race in DartIsolateGroupData. (#15949)
This class is meant to be thread safe. In fact, its headerdoc statement on
thread safety even mentions this. All fields on the class are readonly except
the child isolate preparer. This field is set during VM instantiated isolate
initialization. The VM may launch multiple isolate in the same isolate group on
at the same time (each on a VM backed thread pool thread). Attempting to set the
field without synchronization is a data race.

Fixes https://github.com/flutter/flutter/issues/49358
Fixes b/147798920
2020-01-23 16:03:37 -08:00
Kaushik Iska
5c9c6276c1
[fuchsia] Timeline events in profile mode to observatory (#15900)
This is to address fxb/44063

In all the other modes they will be sent to the systrace
2020-01-23 11:53:03 -08:00
Ben Konyi
82a851cf21
Roll src/third_party/dart 83fba7bd54..fe666ce592 (3 commits) (#15619)
fe666ce Report unused public static members of private classes by Sam Rawlins · 14 hours ago
43ceb5c Revert "De-dup js_util between ddc and dart2js" by Vijay Menon · 15 hours ago
04e2c97 NNBD preview: Fix the position of the navigation by Sam Rawlins · 17 hours ago
83fba7b [ VM ] Move vmservice_io code from runtime/bin to dart:_internal/vm/bin by Ben Konyi · 18 hours ago
c0b1a0a Switch analyzer perf to using analyzer Packages. by Konstantin Shcheglov · 18 hours ago
5b391ba [tests] Break the monolithic async* tests into multiple files by Nicholas Shahan · 19 hours ago
980a200 [vm/vmservice] Make sure writing service info file is awaited by Alexander Markov · 19 hours ago
7997162 Fix getHover test on Windows. by Konstantin Shcheglov · 19 hours ago
301a3a2 Fix incorrect .packages files in DAS tests. by Konstantin Shcheglov · 19 hours ago
c41812b Incremental work in the completion_metrics.dart file. by Jaime Wren · 19 hours ago
5169a52 Use @patch for List.of factory constructor by Stephen Adams · 20 hours ago
2a7789d De-dup js_util between ddc and dart2js by Vijay Menon · 20 hours ago
aaaaa47 [dartjs] Remove unsound `contains` method from AbstractValueDomain. by Mayank Patke · 20 hours ago
fd9d3f9 relevance test re-structure by pq · 20 hours ago
5d96b23 [dartdevc] Fix analysis error in runtime library by Nicholas Shahan · 20 hours ago
2c121e4 Migration: modify pass through edit plans to integrate up the tree stepwise. by Paul Berry · 21 hours ago
6669849 Initial commit with some work starting the metrics collection around code completion metrics gathering. by Jaime Wren · 21 hours ago
c6d6eed Include type arguments when converting to a stateful widget (issue 40095) by Brian Wilkerson · 22 hours ago
b9c5798 Support latest analyzer in analyzer_plugin by Simon Binder · 22 hours ago
16f07ea Revert "Use nullable context type for operand of null-check operator." by Konstantin Shcheglov · 23 hours ago
c8f2683 Add a reason to the MakeNullable change and plumb it through to the AtomicEdit by Brian Wilkerson · 23 hours ago
5357052 [vm/compiler] Fix handling of function types in type tests for type parameters by Alexander Markov · 23 hours ago
8a1a4e7 Add flag to specify which null-safety semantics to use for codegen by Sigmund Cherem · 23 hours ago
b3c6af3 [vm/compiler] Introduce base class for instance calls in IL by Alexander Markov · 24 hours ago
67f3cf3 Revert "[vm, gc] Sweep non-executable large pages concurrently." by Ryan Macnak · 24 hours ago
00a6b52 Test that invocation of a method on a nullable interface type prefers nullable extension. by Konstantin Shcheglov · 24 hours ago
b5f4351 Move ABSTRACT_SUPER_MEMBER_REFERENCE tests. by Konstantin Shcheglov · 25 hours ago
ca31f1d Refactor FunctionExpressionInvocationResolver to support Never. by Konstantin Shcheglov · 25 hours ago
4495c2b [vm, gc] Run weak processing in parallel for old-space GCs. by Ryan Macnak · 26 hours ago
2dd37b6 Add findPackagesFrom(). by Konstantin Shcheglov · 27 hours ago
abe7c1a When NNBD, use nullable iterable type for null-aware spreads. by Konstantin Shcheglov · 27 hours ago
6f1bcee Extract ifNull resolution in BinaryExpressionResolver. by Konstantin Shcheglov · 27 hours ago
9c9c283 [vm, gc] Remove dead allocation stats code. by Ryan Macnak · 27 hours ago
a4207fd [vm/aot] Avoid loading the code register (in bare-AOT) and zeroing IC data reg (in AOT) for closure calls by Martin Kustermann · 33 hours ago base
4cb8816 [gardening] Also ignore OSError in verify_http_timeline_test. by Teagan Strickland · 34 hours ago
d1e11f0 Enable prefer_final_fields in three packages by Brian Wilkerson · 2 days ago
856a270 Use nullable context type for operand of null-check operator. by Konstantin Shcheglov · 2 days ago
da6696b Use analyzer Packages. by Konstantin Shcheglov · 2 days ago
5b1065a Enable avoid_init_to_null in analysis_server by Brian Wilkerson · 2 days ago
99cdbee Use getDisplayString() for hover. by Konstantin Shcheglov · 2 days ago
04b5bd9 Extract null check in PostfixExpressionResolver. by Konstantin Shcheglov · 2 days ago
ac8a2a6 Enable avoid_init_to_null in analyzer_plugin by Brian Wilkerson · 2 days ago
f1c81da Add a fix for unnecessary_null_in_of_null_operators by Brian Wilkerson · 2 days ago
9254683 Remove packageMap and hasFlutterDependency from Workspace interface. by Konstantin Shcheglov · 2 days ago
ecebc29 Do negation resolution in one method. by Konstantin Shcheglov · 2 days ago
489c0be Extract PostfixExpressionResolver. by Konstantin Shcheglov · 2 days ago
113f034 completion manager test harness by pq · 2 days ago
7ed7bff Fix some hints caused by previous CL and add some failing tests by Brian Wilkerson · 3 days ago
2020-01-14 12:06:56 -08:00
chunhtai
7a27e75c67
Add shell api to set default for windows data (#14002) 2020-01-08 19:36:10 -08:00
gaaclarke
46adf73d51
Made it so you can specify the old gen heap size. (#15259) 2020-01-08 10:20:52 -08:00
George Wright
1d3bb8c271
Fix message_loop_fuchsia and thus enable fml_tests and flow_tests for Fuchsia (#14583) 2019-12-19 17:25:06 -05:00
Gityuan
9dc23b8be8 Fix missing API stream when record event in systrace (#14323) 2019-12-11 15:51:47 -08:00
Gityuan
d698d96cea Fix missing timeline event of flutter engine's startup time (#14319)
Fixes https://github.com/flutter/flutter/issues/46744
2019-12-11 15:40:23 -08:00
Jason Simmons
b7d4278b4f
Create separate objects for isolate state and isolate group state (#14268)
Isolate data may need to be deleted on the same thread where it was allocated.
In particular, the task observer set up in the UIDartState ctor must be removed
from the same message loop where it was added.

The engine had been using the same DartIsolate object as the root isolate data
and as the isolate group data.  This object would be deleted when the isolate
group was shut down.  However, group shutdown may occur on a thread associated
with a secondary isolate.  When this happens, cleanup of any state tied to the
root isolate's thread will fail.

This change adds a DartIsolateGroupData object holding state that is common
among all isolates in a group.  DartIsolateGroupData can be deleted on any
thread.

See https://github.com/flutter/flutter/issues/45578
2019-12-10 10:34:50 -08:00
David Worsham
2fc1e1bce1 Relanding: Add Flow unittests and fixtures (#14091) 2019-12-03 14:33:02 -08:00
Kaushik Iska
ea228f2f83
Revert "Fix fml_unittests (#14062)" (#14087)
This reverts commit 6c605f8a9624a99573c6801395f03bff7ee8cc4c.
2019-12-03 12:24:19 -08:00
liyuqian
84bf72917c
Revert PRs to unblock David and Jim's work (#14088)
* Revert "Add flow test fixtures and tests (#13986)"

This reverts commit 620f5281b819f304e8e9e945222e26b17b087cc3.

* Revert "Dynamically determine whether to use offscreen surface based on need (#13976)"

This reverts commit a86ef946563b020108320bbfb974bf7343284fd3.
2019-12-03 12:02:37 -08:00
David Worsham
620f5281b8 Add flow test fixtures and tests (#13986) 2019-12-03 09:43:02 -08:00
David Worsham
6c605f8a96
Fix fml_unittests (#14062) 2019-11-27 16:04:30 -08:00
gaaclarke
89e395853c
Refactor to passing functions by const ref (#13975)
Moved our code to passing functions by const ref
2019-11-22 12:20:02 -08:00
Alexander Aprelev
096ba6892a
Reland children isolates sharing isolate group change. (#13758)
* Revert "Revert "Provide dart vm initalize isolate callback so that children isolates belong to parent's isolate group. (#9888)" (#12327)"

* Ensure that when isolate shuts down it calls isolate_data, rather than isolage_group_data callback.
2019-11-15 09:22:26 -08:00
chunhtai
1f1e2ba58e
reland add lifecycle enum (#13767)
This reverts commit 8ebb318401344793daa10c3bec97c34891cf7cc8.
2019-11-13 11:26:25 -08:00
chunhtai
8ebb318401
Revert "Issues/39832 reland (#13642)" (#13720)
This reverts commit 1bfb928e071674a21779cee94908fbcae1c2e657.
2019-11-06 11:41:36 -08:00
chunhtai
1bfb928e07
Issues/39832 reland (#13642)
* Reland "Added new lifecycle enum (#11913)"
2019-11-05 14:52:16 -08:00
Gary Qian
0928c1af2f
Add 'Cough' test font and support multiple test fonts. (#13649) 2019-11-05 12:27:34 -08:00
chunhtai
fe0838e948
Revert "Added new lifecycle enum (#11913)" (#13632)
This reverts commit 02a479007420b05df8e075978ecdd15442ea520f.
2019-11-04 13:40:20 -08:00
chunhtai
02a4790074
Added new lifecycle enum (#11913) 2019-11-04 12:33:41 -08:00
Dan Field
0a8bd9dd6f
Fix mDNS for iOS13 (#13451) 2019-11-01 15:29:15 -07:00
gaaclarke
1eb15c12fb
Revert 78a8ca0f62b04fa49030ecdd2d91726c0639401f (#13467)
Put `Picture.toImage` back on the GPU thread.  Left the unit tests intact.
2019-10-31 16:57:52 -07:00
Ryan Macnak
f6900001eb
Roll Dart to 6a65ea9cad4b014f88d2f1be1b321db493725a1c. (#13294)
Remove dead shared snapshot arguments to Dart_CreateIsolateGroup.

6a65ea9cad4b [vm] Remove shared snapshot and reused instructions features.
db8370e36147 [gardening] Fix frontend-server dartdevc windows test.
4601bd7bffea Modified supertype check error message to be more descriptive.
0449905e2de6 [CFE] Add a serialization-and-unserialization step to strong test
c8b903c2f94f Update CHANGELOG.md
2a12a13d9684 [Test] Skips emit_aot_size_info_flag_test on crossword.
b26127fe01a5 [cfe] Add reachability test skeleton
2019-10-22 13:14:20 -07:00
Jason Simmons
4ecfa62735
Hold a reference to the Skia unref queue in UIDartState (#13239)
Obtaining the SkiaUnrefQueue through the IOManager is unsafe because
UIDartState has a weak pointer to the IOManager that can not be dereferenced
on the UI thread.
2019-10-21 14:15:03 -07:00
Chinmay Garde
c147eddc2d
Document //flutter/runtime/dart_snapshot.h (#13196)
Related to https://github.com/flutter/flutter/issues/42778
2019-10-17 13:20:18 -07:00
Chinmay Garde
a925df1898
Remove incomplete static thread safety annotations. (#13151)
Fixes https://github.com/flutter/flutter/issues/42704.
2019-10-16 17:28:31 -07:00
Chinmay Garde
e235c5920e
Document //flutter/runtime/dart_isolate.h (#13162)
Related to https://github.com/flutter/flutter/issues/42778
2019-10-16 12:06:34 -07:00
Chinmay Garde
73d6e3f531
Make the Dart isolate constructor private. (#13153)
Found this while attempting to document //flutter/runtime. The only reason this was public was because of the desire to use make_shared. I want to documentation changes to include no code changes. Hence this separate patch.
2019-10-15 15:06:57 -07:00
Chinmay Garde
ecf325f505
Document //flutter/runtime/dart_vm (#13144) 2019-10-15 14:11:07 -07:00
Chinmay Garde
cef6751dba
Revert "Test child isolates are terminated when root is shutdown (#13048)" (#13067)
This reverts commit e96c740410b18ae8e06ebcaab051e3c649b175c3.
2019-10-10 13:02:27 -07:00
Gary Qian
e96c740410
Test child isolates are terminated when root is shutdown (#13048) 2019-10-10 15:31:46 -04:00
Chinmay Garde
86e3ebb748
Allow embedders to specify arbitrary data to the isolate on launch. (#13047)
Since this is currently only meant to be used by the embedding internally, the setter in Objective-C is only exposed via the FlutterDartProject private class extension. Unit tests have been added to the shell_unittests harness.

Fixes https://github.com/flutter/flutter/issues/37641
2019-10-10 12:31:14 -07:00
Jonah Williams
6f5eb1332f
Add support for JIT release mode (#12446) 2019-09-27 11:20:54 -07:00
Alexander Aprelev
5f3b749e92
Update test to verify that secondary isolate gets shutdown before root isolate exits. (#12342)
* Update secondary-isolate-launch test to verify that secondary isolate gets shutdown before root isolate exits.

* ci/format.sh
2019-09-23 14:29:00 -07:00
Kaushik Iska
7f7250f476
[flutter_runner] Do not use prebuilts just yet (#12340) 2019-09-18 15:31:57 -07:00
Kaushik Iska
23835f5529
Revert "Provide dart vm initalize isolate callback so that children isolates belong to parent's isolate group. (#9888)" (#12327)
This reverts commit e6620ddb73280c5658e39b13d335aaae641c53e0.
2019-09-17 15:57:37 -07:00