hausner@google.com
89346f3e3a
Remove legacy syntax support for library import
...
Remove legacy syntax for #import, #library and #source
Update test programs
Recalc fingerprints of inlined functions that were apparently
affected by the change of library name from "dart:io" to dart.io.
Review URL: https://codereview.chromium.org//12880023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20466 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 18:11:08 +00:00
whesse@google.com
d2ea504b60
dart:io | Add "followLinks" optional parameter to Directory.list, let it return Link objects when false.
...
BUG=dartbug.com/7720
Review URL: https://codereview.chromium.org//12638039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20370 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 09:56:14 +00:00
asiva@google.com
a192f216f0
Fix build break in dart2js. The snapshot length was not accounting for the magic number.
...
Review URL: https://codereview.chromium.org//12419009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20342 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-21 19:49:50 +00:00
asiva@google.com
5858afd74a
Write the magic number 0xf5f5dcdc into a script snapshot file and use this to distinguish whether a script snapshot or a regular script file is being passed on the command line (removed the --use-script-snapshot option).
...
Review URL: https://codereview.chromium.org//12438033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20339 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-21 18:47:49 +00:00
whesse@google.com
2bc9a79282
Add FileSystemEntity.identical, to test if two file system objects are the same.
...
BUG=
Review URL: https://codereview.chromium.org//12850010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20307 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-21 09:44:56 +00:00
asiva@google.com
61f6a96cd3
Remove redundant Dart_LoadEmbeddedScript as it doesn't seem to be used in the VM and hopefully dartium can start using Dart_Script always.
...
Review URL: https://codereview.chromium.org//12919020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20277 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 15:41:29 +00:00
sgjesse@google.com
ea4bc3c941
Change the IO buffer size on Windows to 32k
...
This makes a program like this
import "dart:io";
main() {
stdin.pipe(stdout);
}
with stdin redirected from a file run 20 - 50 times faster depending
in the file size piped through.
R=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//12935002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20210 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 15:26:47 +00:00
whesse@google.com
428b58d01c
dart:io | Add Link.targetSync on all platforms.
...
BUG=
Review URL: https://codereview.chromium.org//12812010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20195 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 11:19:03 +00:00
whesse@google.com
b0a2eca7c4
dart:io | Make broken links report NOT_FOUND from FileSystemEntity.typeSync on Windows.
...
BUG=dartbug.com/8935
Review URL: https://codereview.chromium.org//12437017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20075 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 12:57:15 +00:00
floitsch@google.com
f85fa4feff
Make argument to StringSink.writeln optional.
...
BUG= http://dartbug.com/9102
Review URL: https://codereview.chromium.org//12870003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20074 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 12:45:40 +00:00
ager@google.com
ba072613ef
Avoid massive stack frames by allocating 64k buffers in the heap.
...
R=sgjesse@google.com ,ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//12812006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20068 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 10:19:56 +00:00
asiva@google.com
e723d17796
Fix source generation for strings that have \$ in them.
...
Review URL: https://codereview.chromium.org//12605009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20025 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 14:12:36 +00:00
ajohnsen@google.com
fb53f40e65
Add setOption method on Socket/RawSocket.
...
This will allow the user to enable TCP_NODELAY on the native sockets.
BUG=
Review URL: https://codereview.chromium.org//12614014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20014 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 12:46:54 +00:00
asiva@google.com
6b8987e55b
Add a command line option to generate source code for a script
...
(apparently this would be useful for pretty printing the output of
dart2dart)
Review URL: https://codereview.chromium.org//12517005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19996 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 09:47:46 +00:00
whesse@google.com
2987d5397d
dart:io | Add Link class, as sibling to File and Directory.
...
BUG=
Committed: https://code.google.com/p/dart/source/detail?r=19772
Reverted: https://code.google.com/p/dart/source/detail?r=19777
Review URL: https://codereview.chromium.org//12691002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19995 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 09:37:44 +00:00
floitsch@google.com
482b2f34e8
Move Options to dart:io.
...
Review URL: https://codereview.chromium.org//12794002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19927 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 13:12:00 +00:00
floitsch@google.com
c8f2a81f07
Rename Timer.repeating to Timer.periodic.
...
Review URL: https://codereview.chromium.org//12793003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19925 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 13:02:13 +00:00
ager@google.com
26c4b3a58d
Fix file descriptor leak in event handler implementation. When shutting down an isolate, we did not destruct the eventhandler so we leaked the file descriptors for it.
...
Also fix leak of monitor wait data objects on Windows.
R=sgjesse@google.com
BUG=dartbug.com/9021
Review URL: https://codereview.chromium.org//12646007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19921 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 11:11:38 +00:00
asiva@google.com
69d0484d2a
- Use dart:typedata types in the Dart API calls.
...
- Change the dart/io code to not use dart:scalarlist
Review URL: https://codereview.chromium.org//12730013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19848 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 10:57:48 +00:00
sgjesse@google.com
a429f3aa83
Fix checked mode error on socket IOSink
...
The set encoding method on a Sockets IOSink implementation failed in
checked mode. Added a test calling all IOSink methods on a socket.
BUG=https://code.google.com/p/dart/issues/detail?id=9020
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//12408004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19803 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 16:15:56 +00:00
ajohnsen@google.com
a30171117c
Handle /dev/null on linux, as an closed device.
...
This will make all devices unsupported by epoll act as an empty source.
BUG=
Review URL: https://codereview.chromium.org//12476021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19796 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 15:16:08 +00:00
kustermann@google.com
2eb595367c
Fix of file descriptor inheritance problem in process_{linux,android,mac}
...
BUG=http://dartbug.com/9030
Review URL: https://codereview.chromium.org//12576007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19790 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 13:35:38 +00:00
whesse@google.com
43c13f4ed4
dart:io | Revert addition of Link class, because it conflicts with a Link class in dart2js.
...
BUG=
Review URL: https://codereview.chromium.org//12555005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19777 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 11:59:57 +00:00
whesse@google.com
31c6f8d3e5
dart:io | Add Link class, as sibling to File and Directory.
...
BUG=
Review URL: https://codereview.chromium.org//12691002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19772 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 10:34:52 +00:00
floitsch@google.com
dd48256fe5
Remove deprecated StringBuffer.add, addAll and addCharCode.
...
Review URL: https://codereview.chromium.org//12473003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19690 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 13:07:18 +00:00
lrn@google.com
bead146749
Renamed StreamSink to EventSink. Renamed signalError to addError.
...
Review URL: https://codereview.chromium.org//12610006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19683 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 11:31:19 +00:00
whesse@google.com
35dbc70542
dart:io | Implement FileSystemEntity.typeSync on Windows, to identify symbolic links and junctions.
...
BUG=dartbug.com/8935
Review URL: https://codereview.chromium.org//12617002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19681 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 10:36:08 +00:00
sgjesse@google.com
b6096848b1
Make IOSink implement StringSink
...
Besides adding the StringSink methods I also added writeBytes and
deprecated both add and addString.
To handle the encoding of strings the IOSike has an encoding
property. This property is mutable in situation when it makes sense to
change encoding of what is written. The exception here is for HTTP
where the encoding is determined from the header and the encoding
cannot be changed.
R=ajohnsen@google.com , ager@google.com , nweiz@google.com
BUG=
Review URL: https://codereview.chromium.org//12504006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19676 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 10:06:28 +00:00
whesse@google.com
fd887381cd
dart:io | Fix stray code committed to Windows platform
...
TBR=sgjesse@google.com
BUG=
Review URL: https://codereview.chromium.org//12464013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19611 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 11:32:05 +00:00
whesse@google.com
ec7e4e5100
dart:io | Add FileSystemEntity.typeSync to test for symbolic links.
...
BUG=dartbug.com/8935
Review URL: https://codereview.chromium.org//12533008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19608 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 11:18:38 +00:00
tball@google.com
9e3a61f149
Added support for "bin-ified" resources, used to link the vmstats
...
web app files into the VM binary. create_resources.py takes a list
of resources and writes each as a byte array, then builds a resource
table. resources.h defines a simple lookup for these arrays, which
vmstats uses.
Review URL: https://codereview.chromium.org//12377099
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19569 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-06 17:48:53 +00:00
ajohnsen@google.com
d47757dd87
And another... :(
...
BUG=
Review URL: https://codereview.chromium.org//12481016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19553 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-06 11:53:27 +00:00
ajohnsen@google.com
28daa7ba59
Introduce ZLibInflater and ZLibDeflater to dart:io.
...
BUG=
Review URL: https://codereview.chromium.org//12451004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19551 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-06 11:38:41 +00:00
whesse@google.com
8929d6c037
dart:io | Fix a crash when read was called on a closed socket on Windows.
...
BUG=dartbug.com/8798
Review URL: https://codereview.chromium.org//12395017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19396 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 16:16:18 +00:00
tball@google.com
d052192580
Set vmstats socket as blocking.
...
Review URL: https://codereview.chromium.org//12390041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19345 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 23:38:45 +00:00
tball@google.com
ca8b23183b
Added Socket::SetBlocking() and Socket::SetNonBlocking().
...
Review URL: https://codereview.chromium.org//12380032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19334 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 18:33:17 +00:00
ajohnsen@google.com
ba01a8ecfc
Fix socket so we stop the consumer before we close the socket - this makes sure we socket-close future don't result in a socket write.
...
BUG=https://code.google.com/p/dart/issues/detail?id=8874
Review URL: https://codereview.chromium.org//12393010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19316 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 14:20:38 +00:00
sgjesse@google.com
7d6ddd4ae9
Remove wrong type annotation
...
nativeCreateConnect returns either a bool (only true) or an OSError.
TBR=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//12383043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19276 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 07:53:11 +00:00
ajohnsen@google.com
b6f9a3e395
Correctly close done future with an error, before a normal complete can happen.
...
BUG=
Review URL: https://codereview.chromium.org//12387014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19229 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 14:16:05 +00:00
floitsch@google.com
51212d24ed
Remove deprecated ms arguments for Timer and Future.
...
Review URL: https://codereview.chromium.org//12342014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19220 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 13:24:12 +00:00
whesse@google.com
a3bf390d80
dart:io | Change a remaining use of File.name to File.path, in samples.
...
BUG=
Review URL: https://codereview.chromium.org//12319148
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19150 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 16:15:18 +00:00
sgjesse@google.com
a1ffe8a451
Make File.readSync return only the bytes read
...
R=ager@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=8831
TEST=tests/standalone/io/file_test.dart
Review URL: https://codereview.chromium.org//12315129
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19145 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 15:33:08 +00:00
whesse@google.com
6ef35edef1
dart:io | Rename File.name to File.path.
...
BUG=dartbug.com/8790
Review URL: https://codereview.chromium.org//12314153
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19144 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 15:26:11 +00:00
ajohnsen@google.com
f5ade02146
Make sure the socket unsubscribes on error, so we don't get race conditions between an error and an immidiately following close event.
...
This makes sure we always see the expected errors.
BUG=
Review URL: https://codereview.chromium.org//12314148
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19117 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 09:27:01 +00:00
lrn@google.com
6b4f4b1bab
Change new List(n) to return fixed length list.
...
Deprecate List.fixedLength, add List.filled.
Make Iterable.toList and List.from take "growable" argument,
defaulting to false.
Review URL: https://codereview.chromium.org//12328104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
ajohnsen@google.com
7912f3f1bd
Rewrite the Future-pipeline from the Socket to the HttpClientRequest/HttpResponse.
...
Before we had two future, HttpClientRequest/HttpResponse.done and
Socket.addStream's return valud(stored as _writeDoneFuture in
http_impl). Many issues in our code was based on the futures not
being the same, that the user will get a done event, while the socket is
still writing data on the socket.
Immidiate calls to HttpServer/HttpClient.close, after e.g. pipe, would
then destroy the socket while still having data in dart buffers.
The new approach makes sure that there is a direct future link between
the socket and the user.
BUG=
Review URL: https://codereview.chromium.org//12328114
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19111 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:27:12 +00:00
asiva@google.com
154d51dbb7
Quick fix for racy shutdown issues in VmStats.
...
(We need a VmStats::InitOnce to set things up).
Review URL: https://codereview.chromium.org//12316148
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19106 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 02:25:32 +00:00
tball@google.com
9cf8937ec8
Don't execute VmStats::Stop() unless port is specified.
...
Review URL: https://codereview.chromium.org//12310158
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19105 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 01:09:36 +00:00
tball@google.com
8dc6a3764a
Removed remaining reference to FDUtils.
...
Review URL: https://codereview.chromium.org//12328124
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19100 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 00:25:08 +00:00
tball@google.com
6a43e276e8
Used Socket::Read instead of FdUtils::ReadFromBlocking, since FdUtils
...
isn't implemented on Windows.
Review URL: https://codereview.chromium.org//12328122
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19098 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 23:40:26 +00:00