Commit Graph

18 Commits

Author SHA1 Message Date
Dan Field eb73f132c1 [vm] Add macro for fallthrough annotations
Internal builds in Google are catching this as an error.

I'm guarding it because I assume we might support building using other
compilers.

Change-Id: I665099cace9c6a40d737c471dd1b0fdb326fea39
Reviewed-on: https://dart-review.googlesource.com/c/91162
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-15 01:12:01 +00:00
George Kulakowski a1bd1dd6ee Use standard I/O posix functions for Fuchsia, not 64 bit variants
These are not standard, and Fuchsia's libc would like to remove
them. They are all currently defines of the non-64 ones anyway, so
there will be no behavior change.

Change-Id: I7babf04f75aef132d77edd651a86c2ae15ea7aa3
Reviewed-on: https://dart-review.googlesource.com/62710
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-27 23:23:02 +00:00
Adam Barth 6dd945599e [fuchsia] Move FDIO headers
These headers are now at this location.

Change-Id: I61bbe005093e241d9d7ca4435e3d7bbd6f9d27b8
Reviewed-on: https://dart-review.googlesource.com/58701
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Adam Barth <abarth@google.com>
2018-06-06 16:47:05 +00:00
George Kulakowski 7800d2a995 Rename Magenta to Zircon, along with related abbreviations
Change-Id: Ic4215ceb00f5a60d21ec1398fd398a9f78a9eb94
Reviewed-on: https://dart-review.googlesource.com/6100
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-15 14:54:18 +00:00
Zachary Anderson 732bb45c45 [dart:io] Remove double-close from recursive directory delete
closedir() closes the file descriptor wrapped by the DIR, so we
shouldn't close it again.

R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/3005883002 .
2017-08-30 12:49:05 -07:00
Zachary Anderson d0295c873c [dart:io] Namespaces for file IO
Fuchsia requires the ability to sandbox Isolates w.r.t. file IO.
When a new Isolate starts, Fuchsia will pass the Isolate an object
called a namespace. We can translate the namespace object into a
file descriptor suitable for passing to the *at() family of
POSIX file system calls. The file system calls will then
have visibility only into the specified namespace.

We also plumb Namespaces through on all the other platforms as well to
make the change easier to test and so that in the future we can
implement e.g. per-isolate cwds.

This change adds a new internal class to dart:io called _Namespace,
which is implemented in a patch file. See:

sdk/lib/io/namespace_impl.dart
runtime/bin/namespace_patch.dart

The embedder can set up a non-default namespace by calling
_Namespace._setupNamespace during Isolate setup.

Instances of _Namespace have a native field that holds a pointer
to a native Namespace object. See:

runtime/bin/namespace.h

Calls from e.g. file_impl.dart are now also passed a
_Namespace object. The implementations in e.g. file.cc and
file_linux.cc then extract the namespace, and use it to compute a
file descriptor and path suitable for passing to e.g. openat().

related US-313

R=asiva@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/3007703002 .
2017-08-30 09:34:36 -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
Ryan Macnak 877284947b Rename TARGET_OS_* to HOST_OS_*.
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.

Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2750843003 .
2017-03-15 13:11:05 -07:00
Zachary Anderson 306b0ec249 Fuchsia: Build an OS image that includes Dart's test suite.
Guarded by a GN argument, this CL builds a Fuchsia OS image
that includes Dart tree, including the test suite, packages,
test harness, and sufficient build output to run through the
test suite.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2547013003 .
2017-01-19 10:11:27 -08:00
Zachary Anderson a1579c6a45 Fuchsia: Implement recursive delete
Currently, readdir() doesn't fill out d_type correctly, so we just do
an extra stat() to get the file type.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2621093002 .
2017-01-10 15:08:39 -08:00
Zachary Anderson 1f99052303 Fuchsia: Adds File::Copy()
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2591523002 .
2016-12-20 09:44:08 -08:00
Zachary Anderson a919399031 Fix directory existence query error
fixes #28147

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2580133002 .
2016-12-16 20:58:52 -08:00
Zachary Anderson 846a73e262 Fuchsia: Directory listing
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2579483002 .
2016-12-14 15:06:27 -08:00
Ryan Macnak 8d57e3d540 Enable SecureSocket on Fuchsia using BoringSSL and compiled-in certificates from dart-sdk/root_certificates.
Implement OS::CurrentTimeMicros in terms of gettimeofday.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2519133005 .
2016-11-23 10:48:18 -08: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
Zachary Anderson b4a69e922d [fuchsia] Some directory operations
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2281223002 .
2016-08-26 14:30:50 -07:00
Zachary Anderson 1b303e64fe [fuchsia] Fix build. Build packages/ output. Add Directory::Exists().
The build was broken by the addition of OS::MaxRSS, which I've added
unimplemented. I need the packages/ output to get the Dart language
tests going. I've added Directory::Exists() so that we can give
the right error message on a missing package: import instead of
crashing.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2259613002 .
2016-08-18 09:21:14 -07:00
Zachary Anderson 53374c3b99 Fuchsia: Build standalone VM. Make it run "Hello, World!".
This CL adds targets to the GN build that build the standalone Dart VM
without the observatory, and with dart:io enabled but with most of the
functionality stubbed out as UNIMPLEMENTED(). It also adds a simple
eventhandler for Fuchsia for implementing Timers.

R=asiva@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2168193002 .
2016-07-22 14:00:31 -07:00