Commit Graph

15 Commits

Author SHA1 Message Date
Zachary Anderson 71d356d5fe [fuchsia][dart:io] Allow the embedder to specify handles for stdio
The content handlers on Fuchsia can potentially give each Isolate
different handles to use for stdout and stderr. This change provides
a hook for an embedder to call to supply the handles to Dart, and
removes hardcoding of stdio handles to 0, 1, 2.

Change-Id: Ic03b77adc9a911e9c754562fa6a91f9929e10dfc
Reviewed-on: https://dart-review.googlesource.com/36122
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-01-22 21:09:39 +00:00
Zachary Anderson 74071c0738 [dart:io] Fix getchar() error detection
fixes #31530

Change-Id: Ic88408b39cbba8aaac6c59356381161a2db3c2b0
Reviewed-on: https://dart-review.googlesource.com/26321
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-12-05 17:26:21 +00:00
Zachary Anderson 747868f2b1 [dart:io] Remove DART_IO_DISABLED
This was only used by Dartium.

Review-Url: https://codereview.chromium.org/3009523002 .
2017-08-24 11:17: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
Zach Anderson b3093ecee6 [dart:io] Move Platform.ansiSupported to {Stdin,Stdout}.supportsAnsiEscapes
On Windows, some Windows 10 builds support only ANSI output, but not
input, so these need to be separated.

I'm also improving the detection on Mac and Linux to avoid hardcoding
the result. Instead, supportsAnsiEscapes will be true if isatty() and
the TERM environment variable contains the string 'xterm'.

related #28614

R=lrn@google.com

Review-Url: https://codereview.chromium.org/2753233002 .
2017-03-17 12:35:36 -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
Zach Anderson 9506cb9975 Error checking for Stdio calls
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2585443002 .
2016-12-15 11:12:42 -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 7308e58c3f Really remove io support when dart:io is unsupported.
Previously we would compile in implementaitions of native calls for
IO functions that would never be used. This CL provides implementations
that throw a Dart exception if they're called by mistake. It also uses
a DART_IO_DISABLED preprocessor define to clean up the build files and
check that we're not including code we shouldn't.

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

Review URL: https://codereview.chromium.org/1839463002 .
2016-03-29 11:22:03 -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
sgjesse@google.com 810055ece1 Fix Android build
Changes in r42953 did not include update to the Android implementation.

R=ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//825533005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42978 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-19 09:24:48 +00:00
ajohnsen@google.com 0c157cd31e Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY.
BUG=http://code.google.com/p/dart/issues/detail?id=16927
R=johnmccutchan@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//165723007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33745 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 13:51:11 +00:00
ajohnsen@google.com 1481635fca Don't report hasTerminal, if term-size is (0,0).
BUG=http://code.google.com/p/dart/issues/detail?id=17070
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//177863010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33202 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 10:17:04 +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
ajohnsen@google.com 5e564f370d Add getter for hasTerminal, terminalColumns and terminalLines on stdin.
BUG=https://code.google.com/p/dart/issues/detail?id=15557
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//102123010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31255 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 10:59:58 +00:00