Ben Konyi
dbbd71cd75
[ VM ] Remove requirement for presence of current isolate for
...
Dart_ServiceSendDataEvent
Fixes https://github.com/dart-lang/sdk/issues/44720
Fixed: 44720
TEST=Existing dart:io tests
Change-Id: I003a339a91dca84dafc39c44ba804ecf3f6f84ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190303
Commit-Queue: Ben Konyi <bkonyi@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2021-03-10 00:42:37 +00:00
Ryan Macnak
3379eefd5f
[vm] Remove DART_CHECK_VALID; add check for a current isolate to Dart_PropagateError.
...
Use DART_CHECK_VALID has been incorrect since the introduction of Isolate.kill and Dart_Cleanup because it crashes when given an unwind error.
Remove long-broken FullSnapshot1 test.
Change-Id: I1427249349e8138427bc7833980b5eff6ac466db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98263
Commit-Queue: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2019-04-02 20:06:19 +00:00
Ben Konyi
ccf2366398
[ VM ] Exported functionality used by Flutter engine to public headers
...
Change-Id: Ia00487506d34c15c18f60c866b61d97242b2af95
Reviewed-on: https://dart-review.googlesource.com/77014
Auto-Submit: Ben Konyi <bkonyi@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2018-09-28 21:13:52 +00:00
Zachary Anderson
130f3be297
[dart:io] Move _getUriBaseClosure to dart:io
...
In a forthcoming change, this will allow Uri.base to be aware of
the isolate's current namespace.
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/2998373002 .
2017-08-24 20:06:52 -07:00
Zachary Anderson
6cd8a79078
VM: Re-format to use at most one newline between functions
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson
479a97b129
clang-format runtime/bin
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2480793002 .
2016-11-04 12:30:56 -07:00
Vyacheslav Egorov
206daf356e
Delete builtins that became unused after source loading was refactored.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2468993002 .
2016-11-02 15:02:24 +01:00
Ivan Posva
3884fd4e4b
- Allow for loading dart:html and friends into the standalone
...
dart_bootstrap binary to evaluate startup and compilation
performance.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1916793003 .
2016-05-03 20:33:14 -07:00
Zachary Anderson
1336e6149f
Search for a native extension for the host architecture
...
R=iposva@google.com
Review URL: https://codereview.chromium.org/1896203002 .
2016-04-20 08:02:16 -07:00
Zachary Anderson
45661a7091
Cleanup in //runtime/bin
...
R=iposva@google.com
Review URL: https://codereview.chromium.org/1800863002 .
2016-03-16 10:01:00 -07:00
Zachary Anderson
c888f04ba3
Fixes setjmp clobbering warnings.
...
Also fixes an unused result warning.
BUG=https://github.com/dart-lang/sdk/issues/25052
R=whesse@google.com
Review URL: https://codereview.chromium.org/1484653002 .
2015-11-28 14:00:53 -08:00
Todd Turnidge
b243fa53cf
Redo the interface for capture stdio.
...
Flutter doesn't care to import tons of our include files.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1460863002 .
2015-11-19 09:24:23 -08:00
Todd Turnidge
1d2d1ce0fc
Don't use global variables for capturing stdio.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1458983002 .
2015-11-18 12:47:34 -08:00
John McCutchan
dc2450aaad
Move file i/o natives from builtin list to io native list
...
- This is being done so that Sky programs can perform file i/o.
R=asiva@google.com
Review URL: https://codereview.chromium.org//1265703004 .
2015-07-30 09:08:40 -07:00
Todd Turnidge
e4684c7627
Provide stdout and stderr output in the Observatory debugger.
...
Implement two new streams, 'Stdout' and 'Stderr' in the service protocol.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1232193003 .
2015-07-14 12:54:07 -07:00
iposva@google.com
f469f59b60
Reland r45669:
...
- Refactor builtin.dart before any further work in this file.
Change to original submission is to not doubly sanitize the
Windows path when setting the working directory.
R=asiva@google.com
Review URL: https://codereview.chromium.org//1127343004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45703 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 18:23:20 +00:00
iposva@google.com
16a29667dd
- Revert r45669 to address Windows issues.
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org//1130003004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45672 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-09 00:59:00 +00:00
iposva@google.com
7f5cdff385
- Refactor builtin.dart before any further work in this file.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//1137853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45669 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 23:58:01 +00:00
johnmccutchan@google.com
fb58815c44
Remove 'dart:io' import in builtin.dart
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//983713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44274 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 00:17:33 +00:00
johnmccutchan@google.com
172baa03ff
Service isolate rework take 2
...
Review URL: https://codereview.chromium.org//889443002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43306 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 18:31:27 +00:00
johnmccutchan@google.com
db271b0477
Revert r43217, r43215, r43208, r43207, and r43202.
...
Reverting because of some isolate spawn issues (on Windows, and pub bots).
Review URL: https://codereview.chromium.org//867113003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43219 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 22:56:18 +00:00
johnmccutchan@google.com
66aa470fc6
* Create vm-service isolate at Dart_Initialize time.
...
* Remove Service create callback.
* Simplify creation of service isolate.
* Creation is done on thread pool.
* Use vm-service isolate for loading in standalone embedder.
* Remove import of dart:io from builtin library.
performance changes:
no service isolate:
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | - 0]
always start service isolate (as a thread pool task):
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:45 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:44 | 100% | +12363 | - 0]
service does I/O (calls to Dart_LoadScript block until service is running):
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | - 0]
R=asiva@google.com
Review URL: https://codereview.chromium.org//584023004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43202 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 19:45:48 +00:00
sgjesse@google.com
218e366f89
Add support for file locking
...
This adds support for file locking in dart:io.
BUG=http://dartbug.com/17045
R=kustermann@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//833623004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42733 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 13:06:37 +00:00
ajohnsen@google.com
8c633a390e
Cleanup resource loading of the VM.
...
There is not only one path for loading resources, and it's async.
BUG=
Review URL: https://codereview.chromium.org//529203004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39847 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 06:42:01 +00:00
hausner@google.com
4258c115b4
Handle load errors in deferred code
...
IO errors on the URL of a deferred library are forwarded to the Future
that handles the deferred load. Syntax errors and finalization errors
are lethal, killing the isolate.
Review URL: https://codereview.chromium.org//419103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38800 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 21:09:33 +00:00
hausner@google.com
4eac05607f
Lazy loading of deferred libraries
...
Defer reading of source code of deferred libraries until the
Dart code executes the loadLibrary() call.
R=iposva@google.com
Review URL: https://codereview.chromium.org//328923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37334 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 22:43:31 +00:00
ajohnsen@google.com
7aed60d005
Show actualy FD for files in Observatory.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//296403005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36656 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 09:18:43 +00:00
hausner@google.com
c6101ca4b5
First step towards asynchronous loading of sources. With this change, sources are read asynchronously in dart code (builtin.dart) and when the i/o future completes, a callback in the VM loads and compiles the script or library code.
...
In a next step, the i/o will be moved to the service isolate so that not all isolates have to import dart:io.
Fallout from this change:
1) Loading has become a tad slower. Will have to investigate why.
2) Errors that happen during loading (file not found, compilation error in an imported library) are no longer reported at the offending import clause. This can be fixed later if necessary by passing the import clause source location to the library tag handler.
Review URL: https://codereview.chromium.org//290713004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36575 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 17:43:14 +00:00
johnmccutchan@google.com
ef666553a1
Add runtime and native entry tags
...
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).
R=asiva@google.com
Review URL: https://codereview.chromium.org//227433004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
koda@google.com
9d3f2b4ce9
Handle NUL bytes in builtin print.
...
BUG=dart:16761
R=asiva@google.com
Review URL: https://codereview.chromium.org//186103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33247 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 21:21:06 +00:00
ajohnsen@google.com
b052d69661
Don't depend on libdart_io in run_vm_tests and gen_snapshot.
...
This fixes an issue where we would compile the eventhandler and
file-system-watcher for the host toolchain.
BUG=https://code.google.com/p/dart/issues/detail?id=17002
R=iposva@google.com
Review URL: https://codereview.chromium.org//169753003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33010 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-25 09:59:18 +00:00
ajohnsen@google.com
0f52be7f63
Make std* blocking file-descriptors.
...
This will most likely be a performance regression when piping, that
we'll have to look into in the future (copying data through
message-passing).
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//154273003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32715 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-17 10:06:35 +00:00
asiva@google.com
a576fec3c0
Allow the native resolver to setup whether it needs the Dart API scope to
...
be setup automatically or not when a native function is invoked.
This would allow the embedder to treat some native functions as leaf
functions whose invocation can be very light.
R=hausner@google.com , zra@google.com
Review URL: https://codereview.chromium.org//117723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31286 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 17:47:56 +00:00
ajohnsen@google.com
fe6b63d5e4
Add File.copy(Sync) to dart:io.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//105133004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31125 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 12:04:24 +00:00
ajohnsen@google.com
abdc2ade9d
Rewrite file-system-watcher to better handle the different system APIs.
...
BUG=http://code.google.com/p/dart/issues/detail?id=14941
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//98773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30848 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 10:35:00 +00:00
whesse@google.com
3c0c99a3b9
Add Directory.systemTemp getter to replace createSystemTemp().
...
BUG=dartbug.com/12496
R=rnystrom@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//25720002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28215 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 12:55:30 +00:00
whesse@google.com
b221c702a3
dart:io | Add Directory.CreateSystemTemp(template) and change Directory.CreateTemp(template).
...
BUG=dartbug.com/12496
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25279003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28097 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 15:38:01 +00:00
ajohnsen@google.com
9278e87af6
Use int for size when printing to stdout.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25401004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28082 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 09:17:24 +00:00
ajohnsen@google.com
db94aeca89
Always mark stdout as blocking when using 'print'.
...
BUG=http://code.google.com/p/dart/issues/detail?id=13712
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25465002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28081 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 09:05:54 +00:00
ajohnsen@google.com
a347038cd7
Merge services into a shared IOService in dart:io, and use a native port.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24395013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27883 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 15:03:24 +00:00
whesse@google.com
4fc5c84809
Recommit add FileSystemEntity.resolveSymbolicLinks
...
This was reverted in r27481 because of a failure on the debug Windows VM buildbot.
BUG=dartbug.com/1016
Review URL: https://codereview.chromium.org//23480093
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27612 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-18 12:29:47 +00:00
whesse@google.com
31c85401eb
Revert "dart:io | Change File.fullPath to FileSystemEntity.resolveSymbolicLinks."
...
This reverts commit r27475.
BUG=dartbug.com/1016
Review URL: https://codereview.chromium.org//23658048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27481 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 15:00:26 +00:00
whesse@google.com
f9ba5f494d
dart:io | Change File.fullPath to FileSystemEntity.resolveSymbolicLinks.
...
BUG=dartbug.com/1016
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23444037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27475 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 11:15:12 +00:00
ajohnsen@google.com
7c53dfaf3f
Make file system watcher compile on Mac OS 106, and add a runtime-call to test if the system supports the feature.
...
BUG=
R=kustermann@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//23483030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27064 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 15:42:02 +00:00
ajohnsen@google.com
38bae0af02
Add FileSystemWatcher class to dart:io.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//19263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27048 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 12:43:08 +00:00
asiva@google.com
b4d9e0d620
Auto create ApiLocalScope before calling native functions, this ensures that
...
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.
Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//22303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
sgjesse@google.com
78e9b8ef87
dart:io | Add rename to Link
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//17848003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24468 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 14:09:29 +00:00
sgjesse@google.com
7ce40aa3a0
dart:io | Add File.rename
...
R=ajohnsen@google.com
BUG=
Committed: https://code.google.com/p/dart/source/detail?r=24029
Review URL: https://codereview.chromium.org//17033003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24030 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 13:34:54 +00:00
sgjesse@google.com
7841206de5
Change File.directory to not do any IO
...
Removed the File.directory and File.directorySync methods and added a
File.directory getter. The File.directory getter does not do any IO,
but just calculates the directory of the file from the path.
R=whesse@google.com
BUG=http://dartbug.com/9926
Review URL: https://codereview.chromium.org//15832003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23349 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 12:38:27 +00:00
whesse@google.com
fb8471244f
dart:io | Add FileSystemEntity.stat() and FileStat class.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//15018011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22685 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-14 16:26:13 +00:00