440 Commits

Author SHA1 Message Date
Gary Qian
c9fa545cf3 Platform resolved locale and Android localization refactor (flutter/engine#18645) 2020-06-16 04:29:50 -07:00
stuartmorgan
c1f2f8e6d9 Support AOT mode for Windows (flutter/engine#18589)
- Adds a way to provide an AOT library to the C API.
- Adds app.so to the information provided by DartProject.
- Fixes the engine to only do static snapshot linking for Windows in
  debug mode, not all modes, so that the provided library is used.

Engine side of https://github.com/flutter/flutter/issues/38477
2020-05-26 11:01:48 -07:00
Jason Simmons
66a59e3138 Remove the global engine entry timestamp (flutter/engine#18182)
The engine was using a global to store a timestamp representing the
launch of the engine.  This timestamp is initialized with a JNI call
on Android and during shell setup on other platforms.  Later the
timestamp is added to a FlutterEngineMainEnter timeline event used to
measure engine startup time in benchmarks.

This PR removes the global and the JNI call and moves the timestamp
into the settings object.
2020-05-07 11:29:28 -07:00
Alexander Aprelev
4b5878c6ab Introduce runtime check that it is root isolate that makes UI native calls. (flutter/engine#18050)
* Revert "Do not register UI-related native functions in secondary isolates (#6401)"

This reverts commit c23deb818efc3813273d28ce7d965d0eb261cca9 as it doesn't work when root and secondary isolates run in the same isolate group.

* Confirm it is root isolate that makes UI native calls.

* Fix format, UIDartState reference from Fuchsia source

* No UI isolate check for fuchsia calls

* Fix typo. Remove redundant runtime calls
2020-05-01 09:05:41 -07:00
Gary Qian
887c1a875e PlatformResolvedLocale localization message channel (flutter/engine#17755) 2020-04-21 15:34:44 -07:00
Mehmet Fidanboylu
2a925e4636 Add support for setting allow http flag in Dart VM (flutter/engine#17653) 2020-04-11 11:55:05 -07:00
Chris Bracken
adb73da22f Use const refs in for loops where reasonable (flutter/engine#17484)
This patch optimizes C++11 range-based for loops where the variable is
copied in each iteration but it would suffice to obtain it by const
reference. This is only applied to loop variables of types that are
expensive to copy which means they are not trivially copyable or have a
non-trivial copy constructor or destructor.

To ensure that it is safe to replace the copy with a const reference
only the following cases are modified:
  * The loop variable is const-qualified.
  * The loop variable is not const, but only const methods or operators
    are invoked on it, or it is used as const reference or value argument
    in constructors or function calls.

This is an application of the internal performance-for-range-copy
clang-tidy analysis.
2020-04-03 11:44:35 -07:00
liyuqian
b5318d05ff More rename from GPU thread to raster thread (flutter/engine#17408)
This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor https://github.com/flutter/engine/pull/17329

Due to file name changes, this PR is expected to change the license files.

We haven't rename `shell/gpu` to `shell/raster` yet. It should be optional but I think it's better to have `raster_surface_software.cc` than `gpu_surface_software.cc`.
2020-03-31 14:05:28 -07:00
Chinmay Garde
319400c37e Document flutter::SkiaConcurrentExecutor. (flutter/engine#17394) 2020-03-30 16:45:51 -07:00
Chinmay Garde
8022f18109 Document flutter::DartVMData. (flutter/engine#17392) 2020-03-30 00:20:54 -07:00
liyuqian
d968e224ca Add service protocol to get SkSLs (flutter/engine#17300)
Fixes https://github.com/flutter/flutter/issues/53114
2020-03-24 21:42:12 -07:00
Chinmay Garde
2f3a5f36fd Document flutter::DartServiceIsolate. (flutter/engine#17301) 2020-03-24 12:49:13 -07:00
Chinmay Garde
da350ee3c9 Documentation cleanups to RuntimeController. (flutter/engine#17256)
Based on feedback gather in https://github.com/flutter/engine/pull/17250 after it landed.
2020-03-22 14:03:22 -07:00
Chinmay Garde
31155ec0a3 Document flutter::RuntimeController. (flutter/engine#17250) 2020-03-21 22:12:54 -07:00
Chinmay Garde
8f5f888826 Use the standard [[nodiscard]] attribute instead of an FML macro. (flutter/engine#17100) 2020-03-11 13:36:01 -07:00
Chinmay Garde
52e75cba16 Use the ELF loader to setup AOT symbols in benchmark runner. (flutter/engine#17051)
We no longer package AOT artifacts as discrete blobs. The portable ELF loader
from the testing library may be used instead.

Fixes https://github.com/flutter/flutter/issues/52263
2020-03-10 12:28:24 -07:00
Dan Field
19fc68d3d2 Refactor isolate test (flutter/engine#16933)
Make the test harness reusable for other tests that want to launch a Dart VM
2020-03-04 11:10:39 -08: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
36f5f76944 Enable runtime_unittests on Fuchsia 2020-02-06 13:52:33 -08:00
stuartmorgan
9c3b20b923 Wrap strdup to use compliant name on Windows (flutter/engine#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
14e4054d2a Expose enable-service-port-fallback switch (flutter/engine#16366) 2020-02-04 12:00:58 -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
Chinmay Garde
2a949ca345 Isolate and move common portable ELF loading from fixtures into //flutter/testing. (flutter/engine#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
408fafbd68 Fix runtime_unittest in AOT mode by loading AOT symbols from ELF loader. (flutter/engine#16283)
This regressed when the symbols were no longer packed in discrete blobs but
instead moved to an ELF file.

Regressed in 5ea9c249cd
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
c5c6871628 Remove superfluous INFO logs from //flutter/runtime. (flutter/engine#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
32e271a2ad Revert "Disable setting a library tag handler." (flutter/engine#16157)
This reverts commit a801e2264fc2f48646d3a3bc2f15a3416e6dc87b. 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
a801e2264f Disable setting a library tag handler. (flutter/engine#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
ef31000576 Allow embedders to schedule a callback on all engine managed threads. (flutter/engine#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
93d67baf2b Move tonic into //flutter/third_party. (flutter/engine#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
e98b1c3ef7 Do not reset the child isolate preparer if the isolate group data already has one (flutter/engine#15952)
See https://github.com/flutter/flutter/issues/49358
2020-01-23 16:04:02 -08:00
Chinmay Garde
e8827952d5 Fix data race in DartIsolateGroupData. (flutter/engine#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
74cbca7c98 [fuchsia] Timeline events in profile mode to observatory (flutter/engine#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
0bd7ad2ab0 Roll src/third_party/dart 83fba7bd54..fe666ce592 (3 commits) (flutter/engine#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
1571512735 Add shell api to set default for windows data (flutter/engine#14002) 2020-01-08 19:36:10 -08:00
gaaclarke
01cd18efc9 Made it so you can specify the old gen heap size. (flutter/engine#15259) 2020-01-08 10:20:52 -08:00
George Wright
b44f4ae767 Fix message_loop_fuchsia and thus enable fml_tests and flow_tests for Fuchsia (flutter/engine#14583) 2019-12-19 17:25:06 -05:00
Gityuan
7a8fde4337 Fix missing API stream when record event in systrace (flutter/engine#14323) 2019-12-11 15:51:47 -08:00
Gityuan
54b31f5547 Fix missing timeline event of flutter engine's startup time (flutter/engine#14319)
Fixes https://github.com/flutter/flutter/issues/46744
2019-12-11 15:40:23 -08:00
Jason Simmons
adeeecaf22 Create separate objects for isolate state and isolate group state (flutter/engine#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
df08c2593a Relanding: Add Flow unittests and fixtures (flutter/engine#14091) 2019-12-03 14:33:02 -08:00
Kaushik Iska
16ee373dc9 Revert "Fix fml_unittests (#14062)" (flutter/engine#14087)
This reverts commit ca9e7fc470843285b50999fa0e41ba29084ad474.
2019-12-03 12:24:19 -08:00
liyuqian
52e74298e0 Revert PRs to unblock David and Jim's work (flutter/engine#14088)
* Revert "Add flow test fixtures and tests (#13986)"

This reverts commit 32915132bacdfd0d631421b23bb6a6d5db1095ab.

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

This reverts commit a13401ce86b3019c39154d56644b7b9eb4a5bbe5.
2019-12-03 12:02:37 -08:00
David Worsham
32915132ba Add flow test fixtures and tests (flutter/engine#13986) 2019-12-03 09:43:02 -08:00
David Worsham
ca9e7fc470 Fix fml_unittests (flutter/engine#14062) 2019-11-27 16:04:30 -08:00
gaaclarke
43dce83fc1 Refactor to passing functions by const ref (flutter/engine#13975)
Moved our code to passing functions by const ref
2019-11-22 12:20:02 -08:00
Alexander Aprelev
b3581aa59b Reland children isolates sharing isolate group change. (flutter/engine#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
7787960f0c reland add lifecycle enum (flutter/engine#13767)
This reverts commit 5e7e183369b3816650f776c767e241bb98a87276.
2019-11-13 11:26:25 -08:00
chunhtai
5e7e183369 Revert "Issues/39832 reland (#13642)" (flutter/engine#13720)
This reverts commit a1824112a46ba1968217be011efd19d528330127.
2019-11-06 11:41:36 -08:00
chunhtai
a1824112a4 Issues/39832 reland (flutter/engine#13642)
* Reland "Added new lifecycle enum (#11913)"
2019-11-05 14:52:16 -08:00