Brian Quinlan
de45656da1
Fix a bug where calling _WindowsCodePageEncoder.convert would call an abort on non-Windows platforms.
...
TEST=issue_4636_test.dart
Bug: 46436,47402
Change-Id: I11579428f1d3c791ed64b7d5e6f75f41aef8c6c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215981
Commit-Queue: Brian Quinlan <bquinlan@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
2021-10-08 00:22:12 +00:00
Brian Quinlan
bb407edfa0
Revert "Fix a bug where calling _WindowsCodePageEncoder.convert would call an abort on non-Windows platforms."
...
This reverts commit bfbf75a1f6 .
Reason for revert: Broken some tests e.g. dartkp-strong-linux-release-x64:standalone/io/issue_46436_test
Original change's description:
> Fix a bug where calling _WindowsCodePageEncoder.convert would call an abort on non-Windows platforms.
>
> TEST=issue_4636_test.dart
>
> Bug: 46436
> Change-Id: Ib48673d3339617ca2944b3a1f7af4a3b298bb5ba
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215801
> Commit-Queue: Brian Quinlan <bquinlan@google.com >
> Reviewed-by: Alexander Aprelev <aam@google.com >
TBR=aam@google.com ,bquinlan@google.com
Change-Id: I720d9e38e48013438bd9c4821f05e95fa484cfd4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 46436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215962
Reviewed-by: Brian Quinlan <bquinlan@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
Commit-Queue: Brian Quinlan <bquinlan@google.com >
2021-10-07 16:17:04 +00:00
Brian Quinlan
bfbf75a1f6
Fix a bug where calling _WindowsCodePageEncoder.convert would call an abort on non-Windows platforms.
...
TEST=issue_4636_test.dart
Bug: 46436
Change-Id: Ib48673d3339617ca2944b3a1f7af4a3b298bb5ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215801
Commit-Queue: Brian Quinlan <bquinlan@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
2021-10-06 22:35:52 +00:00
Zach Anderson
f407419d0a
[vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_
...
This relands https://dart-review.googlesource.com/c/sdk/+/205633
but without renaming TARGET_OS_IPHONE to DART_TARGET_OS_IPHONE.
It also changes uses of TARGET_OS_IOS to
DART_TARGET_OS_MACOS_IOS to be consistent with the rest of the
VM.
TargetConditionals.h for XCode 13 defines several
TARGET_OS_* preprocessor symbols that confuse the
Dart build. There is probably a more targeted fix
for this, but renaming the symbols that Dart uses
will also prevent this problem if more symbols
are added to the platform headers in the future.
See: https://github.com/dart-lang/sdk/issues/46499
TEST=It builds.
Change-Id: Ie775c19dd23cfdf5f65e5ebc6ee4ec3a561676fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205860
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Alexander Aprelev <aam@google.com >
2021-07-02 19:06:45 +00:00
Slava Egorov
42164cc140
Revert "[vm] Prefix HOST_OS_* and TARGET_OS_* with DART_"
...
This reverts commit aa9201b76b .
Reason for revert: blocks G3 roll (b/192627187)
Original change's description:
> [vm] Prefix HOST_OS_* and TARGET_OS_* with DART_
>
> TargetConditionals.h for XCode 13 defines several
> TARGET_OS_* preprocessor symbols that confuse the
> Dart build. There is probably a more targeted fix
> for this, but renaming the symbols that Dart uses
> will also prevent this problem if more symbols
> are added to the platform headers in the future.
>
> See: https://github.com/dart-lang/sdk/issues/46499
>
> TEST=It builds.
> Change-Id: I3b33a03b4a9a14b76d55fe12f8cdefec4b3c3664
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205633
> Commit-Queue: Zach Anderson <zra@google.com >
> Reviewed-by: Siva Annamalai <asiva@google.com >
TBR=rmacnak@google.com ,zra@google.com ,asiva@google.com
Change-Id: Ib06ca418c7e9d3b4df62c72c033cd39f462f7667
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205790
Reviewed-by: Slava Egorov <vegorov@google.com >
Commit-Queue: Slava Egorov <vegorov@google.com >
2021-07-02 14:02:02 +00:00
Zach Anderson
aa9201b76b
[vm] Prefix HOST_OS_* and TARGET_OS_* with DART_
...
TargetConditionals.h for XCode 13 defines several
TARGET_OS_* preprocessor symbols that confuse the
Dart build. There is probably a more targeted fix
for this, but renaming the symbols that Dart uses
will also prevent this problem if more symbols
are added to the platform headers in the future.
See: https://github.com/dart-lang/sdk/issues/46499
TEST=It builds.
Change-Id: I3b33a03b4a9a14b76d55fe12f8cdefec4b3c3664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205633
Commit-Queue: Zach Anderson <zra@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2021-07-02 06:02:48 +00:00
Ben Konyi
1be13871bb
[ VM ] Addressed additional comments from CL 56461.
...
Change-Id: I396a4e1038ccc7ae4f504d817ee6790aeb8d2003
Reviewed-on: https://dart-review.googlesource.com/56620
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ben Konyi <bkonyi@google.com >
2018-05-24 20:01:51 +00:00
Ben Konyi
c541cda216
[ VM ] Fixed issue where error code was being clobbered by call to Dart_TypedDataReleaseData on Windows, resulting in OSError returning a 0 error instead of the true error code.
...
Bug: 2
Change-Id: I33e9319f57de73d9435936ddf853968834fb5a16
Reviewed-on: https://dart-review.googlesource.com/56461
Commit-Queue: Ben Konyi <bkonyi@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2018-05-24 02:07:39 +00:00
Ryan Macnak
558a931409
[vm] Move some string utils from runtime/vm to runtime/platform.
...
Change-Id: I552086445a7e07792f9da85afa5edf23b6c450d5
Reviewed-on: https://dart-review.googlesource.com/44402
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-03-01 02:07:46 +00:00
Alexander Aprelev
2d4c606e63
Revert "Reintroduce incremental compiler wrapper that supports accept protocol."
...
This reverts commit d78a41e0ee .
Revert "Fix length for WideToUTF8 conversion in UriToPath"
This reverts commit 011e1cc1c5 .
Change-Id: I36140426a474962f77605e1aed6ddfd158bd064a
Reviewed-on: https://dart-review.googlesource.com/39480
Reviewed-by: Alexander Aprelev <aam@google.com >
2018-02-07 04:02:36 +00:00
Alexander Aprelev
d78a41e0ee
Reintroduce incremental compiler wrapper that supports accept protocol.
...
This reverts 4e677e9606
Change-Id: I32410b3a4ee9cc8a6f3318917ed519e13eea14f6
Reviewed-on: https://dart-review.googlesource.com/37862
Commit-Queue: Alexander Aprelev <aam@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2018-02-06 18:38:58 +00: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
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
b990bc3794
Fix native extension lookup
...
This CL allows native extension lookup to defer to the platform's
library lookup (e.g. dlopen) when the library cannot be found next to
the importing Dart library. It also allows dart-ext: to accept an
absolute path to the native library.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2285223003 .
2016-08-30 09:31:47 -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
Ryan Macnak
22683803ed
Initialize standalone embedder's copy of the monotonic clock on Windows.
...
BUG=http://dartbug.com/25055
BUG=http://dartbug.com/25278
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1537063002 .
2015-12-18 13:20:57 -08:00
Ryan Macnak
9387fead15
Use a monotonic clock in the implementation of Timer.
...
Ask the embedder for the current time, since it is the embedder who later compares the deadline with current time when deciding when to send a wake up message.
BUG=http://dartbug.com/25055
BUG=http://dartbug.com/25216
R=iposva@google.com , zra@google.com
Review URL: https://codereview.chromium.org/1519563003 .
2015-12-11 12:39:56 -08:00
John McCutchan
aaf37ad035
Landing patch set 7 from https://codereview.chromium.org/1450113003/
...
Review URL: https://codereview.chromium.org/1466523002 .
2015-11-19 14:18:52 -08:00
John McCutchan
28e416b1f4
Revert "Avoid strerror_r portability issues"
...
This reverts commit ca81c1732b .
2015-11-17 16:34:25 -08:00
John McCutchan
ca81c1732b
Avoid strerror_r portability issues
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1450113003 .
2015-11-17 15:23:47 -08:00
Soren Gjesse
0415d9271d
Improve the encoding/decoding to/from system encoding on Windows
...
On Windows the dart:io SYSTEM_ENCODING is now also working with strings
which have null characters in them. Previously the string would be
terminated at the null character.
BUG=https://github.com/dart-lang/sdk/issues/23295
R=kustermann@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//1194883002 .
2015-06-24 10:36:05 +02:00
johnmccutchan@google.com
919dc2d6eb
* Introduce ThreadInterrupter which calls a TLS set callback when thread is interrupted.
...
* Threads can only register and unregister themselves with ThreadInterrupter.
* Profiler is no longer involved in interrupting threads. It's just a callback and the buffer.
* Profiler operates lock free using an atomic operation to reserve sample in sample buffer.
* Linux, Mac, and Windows done.
R=asiva@google.com
Review URL: https://codereview.chromium.org//109803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31170 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 18:52:15 +00:00
cbracken@google.com
a6ace331f3
Replaced strerror() calls with threadsafe strerror_r().
...
Mac/Android use the XSI-compliant definition of strerror_r() which stores the message in the passed-in buffer.
Linux uses the GNU-specific definition of strerror_r() which takes a buffer and returns the message in a char* (which may or may not be the passed-in buffer).
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//22634003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25943 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:24:05 +00:00
smok@google.com
ebbc2020a2
Put everything in runtime/bin into '::dart::bin' namespace.
...
Review URL: https://codereview.chromium.org//14341015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22032 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 14:22:30 +00:00
sgjesse@google.com
e10bc2d3e0
Reapply "Add a sleep function to dart:io"
...
This reapplies r20952, r20953, r20954 together with hiding sleep from
dart:io in a number of tests.
R=ager@google.com
Review URL: https://codereview.chromium.org//13704003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20964 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 13:04:26 +00:00
sgjesse@google.com
22a06ceeea
Revert r20952, r20953, r20954
...
Too many failures due to conflicting top level sleep methods.
TBR=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//13565005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20955 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 10:06:56 +00:00
sgjesse@google.com
b81606254e
Add a sleep function to dart:io
...
The sleep function is a top-level function.
R=ager@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=9254
Review URL: https://codereview.chromium.org//13641005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20952 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 09:35:37 +00:00
iposva@google.com
9046a44a37
Prepare for removal of source_filter.gypi:
...
- Guard OS-dependent source files with #if TARGET_OS_* in a similar
fashion to the architecture dependent sources.
Review URL: https://codereview.chromium.org//12282051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18786 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 21:17:38 +00:00
tball@google.com
fe80553fdd
Moved GetCurrentTime functions from bin/eventhandler to bin/utils.
...
Review URL: https://codereview.chromium.org//12280004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18597 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-15 20:51:49 +00:00
ager@google.com
8d523fead9
Use unicode versions of process APIs on Windows. Additionally,
...
retrieve the arguments to dart as unicode strings.
R=sgjesse@google.com
BUG=
Review URL: https://codereview.chromium.org//11565008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16093 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 09:24:05 +00:00
ager@google.com
8a14c1c319
Use FormatMessageW for Windows error messages to handle internationalized messages correctly.
...
R=sgjesse@google.com
BUG=dartbug.com/6986
Review URL: https://codereview.chromium.org//11558012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16041 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 14:39:21 +00:00
ager@google.com
28b43144e5
Update dart:io to convert strings between UTF8 and current code page
...
when interacting with the system.
What we get from and need to hand to the VM is utf8. What we
get from and need to hand to the system is in the current
code page.
R=sgjesse@google.com
BUG=
Review URL: https://codereview.chromium.org//11275281
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14851 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 15:03:23 +00:00
jackpal@google.com
e060b66a3e
Add _android files for building DartVM on Android
...
Split directory_posix -> directory_(android|linux|macos)
This allows us to cleanly make Android-specific changes to
directory_android.cc
Copy all _linux files to _android files and edit as needed to account
for the differences between Linux and Android:
+ getcwd(0, NULL) doesn't work on Android, have to emulate
+ Android doesn't have a '/tmp' directory, have to emulate
+ Android doesn't provide mkdtemp(), have to emulate.
+ Small differences in the available system include files.
+ Use pthread_cond_timedwait_monotonic instead of
pthread_condattr_setclock
Review URL: https://chromiumcodereview.appspot.com//10826233
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10613 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:06:52 +00:00