ajohnsen@google.com
b960f8f22f
Speed up gen_snapshot by writing all bytes at once.
...
Before we would write one byte at a time, making it extreamly slow on especially Windows.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25648005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28151 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 11:36:08 +00:00
ajohnsen@google.com
a86f11f4ab
IssueRead for DirectoryWatcherHandle as soon as the watcher starts.
...
This makes sure we don't miss any initial events.
BUG=https://code.google.com/p/dart/issues/detail?id=13228
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25687003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28148 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 11:10:13 +00:00
ajohnsen@google.com
0420c6b8b7
Reuse thread when writing stdout/stderr on Windows.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13541
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25631005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28146 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 11:03:34 +00:00
whesse@google.com
e5982dc4c9
Fix breakage from r28097
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25553002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28100 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 16:07:28 +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
33c74ee3d7
Remove usage of legacy inet_ntop from dart:io.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13577
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25411003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28090 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 11:27:46 +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
whesse@google.com
5b95688b5f
dart:io | Remove unused asynchronous file request enums.
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//25173004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28056 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 15:23:38 +00:00
ajohnsen@google.com
031dcbe37b
Don't emit errors from the socket when we are closing it down.
...
The socket may be deleted at this point, so getting the error can be 'use-after-free'. Also, the actual error doesn't help, as the user can't do anything about a bad close (note that all data is 'flushed' before close is called).
BUG=https://code.google.com/p/dart/issues/detail?id=12982
R=whesse@google.com
Review URL: https://codereview.chromium.org//25276003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28053 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 14:56:42 +00:00
asiva@google.com
292d8c9c21
Fix 13594.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//24785002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28017 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 16:55:20 +00:00
whesse@google.com
12cadfd1be
Add .address to [Raw]ServerSocket and HttpServer.
...
Also use .address in Pub's barback server.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25010004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28010 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 13:36:03 +00:00
regis@google.com
61ddf78204
Fix VM exit code in some cases.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//24508004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27926 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-26 01:10:48 +00:00
ajohnsen@google.com
57394aff01
Don't compile io_service if io is not supported.
...
BUG=
R=whesse@google.com
Review URL: https://codereview.chromium.org//24612002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27890 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 16:31:13 +00:00
ajohnsen@google.com
3e0a59b920
Clean up IOService implementation to be shared between patched and non-patched code.
...
BUG=
Review URL: https://codereview.chromium.org//24596003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27888 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 15:53: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
sgjesse@google.com
415d53b557
Add property base to the Uri class
...
Uri.base returns the natural base URI for the current platform.
R=ahe@google.com , floitsch@google.com , iposva@google.com , rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//23686021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27877 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 13:52:15 +00:00
whesse@google.com
9981feb28b
dart:io | Enable connection cache for secure networking clients.
...
BUG=dartbug.com/7230
Review URL: https://codereview.chromium.org//24539002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27875 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 11:20:05 +00:00
ajohnsen@google.com
3ea7013d0e
Throw exception if path can't be watched.
...
BUG=http://code.google.com/p/dart/issues/detail?id=13552
R=zra@google.com
Review URL: https://codereview.chromium.org//23830014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27847 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 20:12:49 +00:00
ajohnsen@google.com
d162c06b60
Make stdin blocking when using Stdin::readByte and readLine.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24315008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27819 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 13:21:33 +00:00
ajohnsen@google.com
d11df78618
Make stdout and stderr async.
...
This required some minor changes to the Windows eventhandler, as we now spawn a new thread for writes (just like we do for reads).
BUG=https://code.google.com/p/dart/issues/detail?id=7218
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23609060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27811 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 11:47:53 +00:00
whesse@google.com
8b24dd1bcf
Fix socket_android.cc to agree with socket_linux.cc and compile.
...
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//24165006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27803 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 09:34:10 +00:00
sgjesse@google.com
d1037c4493
Fix bugs in SocketAddress
...
The formatting of IPv6 strings was wrong on Linux and Mac OS - used
the IPv4 structure.
The fixed socket addresses for any and loopback for IPv6 was mixed up.
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//24269017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27703 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 12:46:50 +00:00
sgjesse@google.com
b8912cff07
Replace the memcpy macro with a lint check.
...
This fixes the build under libc++. It also allows us to check the
Windows and Android code. While at it, replace all uncaught instances
of memcpy with memmove.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23578046
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27700 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 12:25:08 +00:00
sgjesse@google.com
650dc5f135
Remove duplicated code on Windows
...
This also gives a litle more info when FormatMessageW fails.
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//23463044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27639 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 06:33:28 +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
iposva@google.com
35a8e25648
Fix http://dartbug.com/13297
...
- Error out early if the current working directory cannot be determined.
R=asiva@google.com
Review URL: https://codereview.chromium.org//23875023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27486 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 16:40:36 +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
jacobr@google.com
d9f7cc5099
Add "function" as an argument to Dart_ActivationFrameInfo
...
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//23609032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27440 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:45:42 +00:00
whesse@google.com
27600274c8
Fix error handling when current working directory is deleted.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23702037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27433 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 14:30:23 +00:00
mlippautz@google.com
94502c10ea
Checks CObject lengths in native API.
...
Also converts the API to use intptr_t instead of a mixture of int64_t and int. Internally all variable length objects have lengths and maximum values represented as intptr_t (actually Smi ranges). In order to check for these maximum lengths we need to have a common type for 32 and 64 bit platforms.
Helping constructs like IOBuffer can still use 64bit lengths, but have to check that there values are actually in the domain of intptr_t as soon as internal objects are created.
Addresses issue 4314.
BUG=
R=asiva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//23532048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27395 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:56:12 +00:00
ajohnsen@google.com
c6ef82b5c9
Polish the EventHandler cleanup in r26517.
...
BUG=
R=iposva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//22918023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27386 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 15:31:44 +00:00
ajohnsen@google.com
1cd800214f
Always wait for child processes when forked, even if the process failed.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23494048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27384 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 14:29:23 +00:00
ajohnsen@google.com
6949a7bd08
Simplify process exit-code handling on Posix, take 2.
...
As in https://codereview.chromium.org/24024007 , except the monitor->Wait
is now called in a loop with a guard, to ensure we actually do get notified.
Also, now correctly exiting the thread if we have no more child
processes, using the initialize/terminate mutex as guard.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23717038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27380 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 13:05:13 +00:00
ajohnsen@google.com
8fdf9b8ee6
Use correct output encoding in Process.runSync.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13149
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23528006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27283 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:33:53 +00:00
ajohnsen@google.com
bce63cccc9
Revert "Simplify process exit-code handling on Posix."
...
This reverts commit f1b1ba410e964b0f787513f245faf8b457c9331a.
BUG=
Review URL: https://codereview.chromium.org//23536032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27251 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 15:02:31 +00:00
ajohnsen@google.com
5e4135c731
Simplify process exit-code handling on Posix.
...
We now only use waitpid and not signals. When we exit, we perform a
small fork-and-exit to interrupt waitpid, so it can exit the thread.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24024007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27247 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 13:08:34 +00:00
whesse@google.com
7e7b95c04e
Fix android build of runtime.
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//23978006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27197 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 15:04:59 +00:00
ajohnsen@google.com
47239cb3a2
Move delete/deleteSync up to FileSystemEntity, with a shared documentation.
...
This also means that FileSystemEntity.delete(recursive: true) now will
delete any object on disk, much like 'rm -r', without the need of
wrapping it in a Directory object.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23889008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27196 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 14:54:38 +00:00
ajohnsen@google.com
b8d9214b2c
Be sure to enter monitor before notifying, in file_system_watcher_macos.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13065
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23967004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27178 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 08:14:48 +00:00
sgjesse@google.com
f235a79d0d
Remove ASSERT which was reported as a race by ThreadSanitizer
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//23903007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27131 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 13:52:59 +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
6c5229abda
Move _FileSystemWatcher to IO patch since it extends NativeFieldWrapperClass1.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23615005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27051 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 13:13:36 +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
hausner@google.com
f82de66060
Evaluation of expression in context of library top-level
...
Third and final part of expression evaluation in the context
of an (object|class|library).
R=iposva@google.com
Review URL: https://codereview.chromium.org//23514020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26898 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 23:24:23 +00:00
floitsch@google.com
74da0c7286
Remove usage of dart:json.
...
R=jmesserly@google.com , lrn@google.com , nweiz@google.com , rnystrom@google.com
Review URL: https://codereview.chromium.org//23596007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26789 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 14:05:11 +00:00
floitsch@google.com
1887b5ca49
Some more removals of dart:utf.
...
R=jmesserly@google.com , lrn@google.com , nweiz@google.com
Review URL: https://codereview.chromium.org//22909059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26712 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 13:18:34 +00:00
sgjesse@google.com
264611807f
Get rid of some downcasts
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//23540002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26697 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 09:13:21 +00:00
hausner@google.com
a105ba48fc
JSON string decoding for VM debugger
...
The VM must properly decode JSON strings it receives.
R=regis@google.com
Review URL: https://codereview.chromium.org//23439002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26668 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 20:59:16 +00:00