101 Commits

Author SHA1 Message Date
Jason Simmons
f1a8c5468d Load the precompiled snapshot from a group of asset files on Android (#2621)
Previously the AOT snapshot was packaged as a dynamic library (similar to the
scheme used on iOS).  This change eliminates the need for a native code
toolchain when building for AOT.
2016-04-27 15:35:25 -07:00
Jason Simmons
9d19f93386 Do not create the service isolate when Dart is built in product mode (#2618) 2016-04-25 17:05:21 -07:00
Jason Simmons
b478563ea6 Support ahead-of-time compilation on Android in the engine (#2614)
This include build system changes for selecting Dart's precompiler mode
plus a way to locate and load the precompiled snapshot library from an
Android application
2016-04-25 10:45:23 -07:00
Yegor
7a919c0f58 record startup timestamp in Android; pass it to Dart timeline (#2612) 2016-04-22 13:41:38 -07:00
Jason Simmons
e6ce967fce Roll Dart and set dart_runtime_mode in the GN script (#2610) 2016-04-22 11:02:41 -07:00
Jason Simmons
48de25e19b Do not modify the set of active streams within the embedder tracing callbacks (#2600)
Dart invokes Start/StopTracing callbacks within the _setVMTimelineFlags service
method whenever the embedder timeline stream toggles on or off.  Flutter's
implementation of these callbacks was modifying the set of enabled streams,
which could override the intended behavior of _setVMTimelineFlags.

Start/StopTracing will now only control Flutter's embedder-specific log.

Also needed to change the Flutter engine's --trace-startup flag to set the
corresponding timeline stream flag on the Dart VM.
2016-04-19 10:38:22 -07:00
Jason Simmons
5704322798 Add a --deploy build option that enables Dart product mode (#2598) 2016-04-15 12:18:57 -07:00
Jason Simmons
7182341f85 Merge pull request #2579 from jason-simmons/skia_skp_capture
Add an HTTP server for exporting Flutter debug info and a request han…
2016-04-06 10:22:46 -07:00
Jason Simmons
b93e9419bd Support the JNI bridge in secondary isolates
This requires detaching from the JVM at thread shutdown using a callback
that was recently added to the Dart VM.
2016-03-28 10:03:18 -07:00
Chinmay Garde
2bde94c703 Merge pull request #2525 from chinmaygarde/master
Update Dart dependency
2016-03-18 11:29:50 -07:00
Adam Barth
410aac589b Flutter apps in Mozart should have reasonable Uri.base
Previously this value was the temp directory that we used to store the FLX
bundle. Now it's the URL given to us by MojoShell.
2016-03-18 09:53:44 -07:00
Chinmay Garde
0616669659 Update Dart dependency 2016-03-17 17:51:02 -07:00
John McCutchan
4d7272446d Auto select Observatory port on Android and iOS simulators 2016-03-17 11:43:41 -07:00
Chinmay Garde
f5f8636cc6 Merge pull request #2502 from chinmaygarde/master
Wire up the TracingController to the the Dart embedder timeline API
2016-03-16 18:17:30 -07:00
Chinmay Garde
09972ad11c Wire up the TracingController to the the Dart embedder timeline API 2016-03-16 16:08:47 -07:00
Adam Barth
693935c169 Don't dump core on startup exceptions
Instead, log the exception to the console and exit with an error code.

Fixes #2362
2016-03-15 14:06:20 -07:00
Chinmay Garde
26d5aeb2e2 Avoid importing the internal lib into the builtin since its disallowed after Dart_Precompile.
Import the library directly in dart_ui.dart.
2016-03-10 14:40:26 -08:00
Jason Simmons
0ce96c8a55 Delete DartState during isolate shutdown
This solves two problems:
* UIDartState was being deleted during destruction of DartController after the
  isolate had been shut down.  The UIDartState held persistent handles to Dart
  objects, and deleting them when the isolate no longer exists caused an
  assertion failure.
* DartStates created for secondary isolates were never being deleted

Fixes https://github.com/flutter/flutter/issues/2549
2016-03-10 10:47:46 -08:00
Chinmay Garde
446984ec33 Conditional directives are a snapshotter option. Remove the same from the embedder VM and add the flag to the precomp snapshotter. 2016-03-07 17:17:02 -08:00
Chinmay Garde
9b2e93a06b iOS: Only add the kDartConditionalDirectivesArgs flags when not using precompilation 2016-03-07 16:53:32 -08:00
Collin Jackson
22d7bc4a3a Enable conditional directives 2016-03-06 17:29:42 -08:00
Adam Barth
962597e0f5 Fix crash when running widget example
Dart_IsolateMakeRunnable was returning false, which can indicate that the
isolate was already running. This patch seems harmless, but I'll follow up to
understand more about what's happening here.

Fixes #2383
2016-03-03 16:45:00 -08:00
Chinmay Garde
b407fc48ca Dont include any of the machinery to generate a precompilation snapshot on the embedder VM 2016-03-03 14:30:32 -08:00
Chinmay Garde
88dc138126 Merge pull request #2451 from chinmaygarde/master
Ignore checked mode when running from a precompilation snapshot.
2016-03-03 11:59:42 -08:00
Chinmay Garde
6df38242ae Ignore checked mode when running from a precompilation snapshot. 2016-03-03 11:18:40 -08:00
Jason Simmons
41f93f4099 Rename DOMDartState to UIDartState 2016-03-02 10:47:30 -08:00
Jason Simmons
d474e9d2b6 Merge pull request #2439 from jason-simmons/isolate_mojo_services
Implement support for invoking Mojo services from secondary isolates
2016-03-02 10:04:03 -08:00
John McCutchan
08d1ea32b3 Allow service protocol tests to run against sky_shell 2016-03-01 09:00:30 -08:00
Jason Simmons
0ede7dded8 Implement support for invoking Mojo services from secondary isolates 2016-02-29 16:20:27 -08:00
Jason Simmons
320d8e012b Merge pull request #2421 from jason-simmons/isolate_spawn
Support spawning new Dart isolates from within a Flutter app
2016-02-24 17:24:11 -08:00
Jason Simmons
470118b0de Support spawning new Dart isolates from within a Flutter app 2016-02-24 14:59:59 -08:00
Adam Barth
09e87f5865 Enable background compilation by default
We've been enabling it in the flutter tool for a while. This patch enables by
default in general.
2016-02-24 14:55:58 -08:00
Chinmay Garde
ab145b1fa9 Update the Dart VM and wire in the extra kDataSnapshot symbol for the precompiler 2016-02-19 16:48:28 -08:00
Jason Simmons
0b8038fa1e Support loading of custom fonts
The FLX will contain a font manifest JSON file that maps font family names
to custom font assets.  Flutter will provide a FontSelector that loads
fonts on demand and caches typeface and style data.
2016-02-17 12:07:22 -08:00
Adam Barth
b09cd543bd Add an off-by-default flag for background compilation 2016-02-12 16:01:18 -08:00
John McCutchan
d089e76e24 Enable and test sky_shell --start-paused 2016-02-10 14:39:52 -08:00
John McCutchan
c9cdcf4ebb Revert "Use tonic's message handler that supports pause on start and exit"
This reverts commit c0a61a0332c4c1a53ae8409d7489e35304e1bcaa.
2016-02-10 11:49:33 -08:00
John McCutchan
c0a61a0332 Use tonic's message handler that supports pause on start and exit 2016-02-10 09:49:50 -08:00
Chinmay Garde
c7de490b93 Update flag passed in during VM initialization to account for updates in dart-lang/sdk 2016-02-09 14:17:29 -08:00
John McCutchan
c76877487d Fix Observatory 2016-02-09 09:25:52 -08:00
Chinmay Garde
930bfee5dc Wire in the device observatory port while initializing the Dart VM 2016-02-08 15:43:12 -08:00
Jason Simmons
7980c7fc5c Roll Dart to 1.14.1 2016-02-04 14:05:55 -08:00
Devon Carew
3c83f895ed some work towards a --start-paused flag 2016-02-02 11:44:01 -08:00
Adam Barth
4fe584c757 Revert "Update the DartVM"
This reverts commit 3e7cf0b74e5b49ac7a92fa34e4c4117ea871b3da.
2016-01-29 13:38:32 -08:00
Adam Barth
3e7cf0b74e Update the DartVM 2016-01-29 12:39:29 -08:00
Adam Barth
9ee9721b1b Revert "Update DartVM"
This reverts commit ca0342acd20bf2beeeb02bf147fe0071ce5ada65.
2016-01-28 11:19:32 -08:00
Adam Barth
ca0342acd2 Update DartVM 2016-01-27 12:34:17 -08:00
Adam Barth
0140555b54 Remove integration between tonic and WTFString
We used to share memory between Dart strings and WTF::String objects by
way of the Dart externalized strings. That used to be important when the
DOM shared many strings between C++ and Dart. However, now that we don't
retain strings in C++ much anymore, we don't need this complexity.

This patch removes DartStringCache and the integration. It also unwinds
several cases where we were converting back and forth between
WTF::String and std::string for no reason. Now we use std::string more
consistently.

For the case of ParagraphBuilder::addText, we now take a raw const
char*, which more closely matches the API the DartVM exposes. That means
we do a single copy out of the VM and into the render tree at that
point.
2016-01-18 20:47:46 -08:00
Adam Barth
1f4416f87b Move microtask queue into tonic
Moving the microtask queue into tonic solves three problems:

1) Removes three levels of indirection when invoking microtask
callbacks.
2) Removes the sky/engine/dom directory entirely.
3) Removes the last client of the (inefficient) DartValue class.
2016-01-18 16:59:52 -08:00
Jason Simmons
fd672e4196 JNI/Dart: support for more data types
* Conversion of all primitive types, wrapped Java objects, and nulls between Dart and Java
* A way to distinguish float arguments from doubles when calling Java methods
* Construction of a Dart JniClass from a Java class object
2016-01-14 13:32:07 -08:00