Ryan Macnak
4f8b16df3b
Use a single file for app snapshots.
...
For blobs, put all four pieces into a single file with a header describing their offsets.
For dynamic libraries, move the vm isolate and isolate pieces into the dynamic library as additional read-only sections.
Automatically detect if the script argument is an app snapshot and initialize the VM appropriately, similar to automatic detection of script snapshots.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2405393002 .
2016-10-13 14:33:56 -07:00
Florian Loitsch
873c6e4688
Don't close stdio/stderr when shutting down.
...
Fixes #26872 .
BUG= http://dartbug.com/26872
R=sgjesse@google.com
Review URL: https://codereview.chromium.org/2204953002 .
2016-08-03 15:30:30 +02:00
Zachary Anderson
678cb048ed
Adds blocking file locks.
...
Fixes #26665
R=sgjesse@google.com
Review URL: https://codereview.chromium.org/2050413002 .
2016-06-13 07:58:09 -07:00
Ryan Macnak
f262fad639
Option to output precompiled instructions as a blob for use with mmap instead of assembly for use in a shared library.
...
BUG=http://dartbug.com/26199
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1915853004 .
2016-04-25 16:19:34 -07:00
Zachary Anderson
218545ba10
Fixes leak of native File objects.
...
Also employs the same reference counting technique as secure sockets to
avoid the IO Service touching dangling pointers.
R=iposva@google.com
Review URL: https://codereview.chromium.org/1892623002 .
2016-04-20 10:08:37 -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
Zachary Anderson
c75a817ee0
Fixes some memory leaks in //runtime/bin
...
Also some style cleanups.
Decided to fix these leaks by using Dart_ScopeAllocate
instead of malloc and new. Leaks are noted in the CL.
I haven't finished looking over all the code in
//runtime/bin yet, but this CL was getting big.
Review URL: https://codereview.chromium.org/1781883002 .
2016-03-14 11:08:52 -07:00
Soren Gjesse
4205b2997e
Change stdout/stderr to binary mode on Windows
...
Every other file opened in Windows is in binary mode, and there is no
way of opening a file in text mode.
This is a breaking change if one is relying on the CR insertion
when writing to stdout/stderr on Windows.
BUG=https://github.com/dart-lang/sdk/issues/19334
R=kustermann@google.com
Review URL: https://codereview.chromium.org//1228053002 .
2015-07-10 13:57:15 +02: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
Søren Gjesse
eaeecf2ed1
Add file modes for opening a file write only
...
Added two new file modes WRITE_ONLY and WRITE_ONLY_APPEND. The current
file modes WRITE and WRITE_APPEND are kept as the read/write mode with
no change. Kept the same overall handling of create/truncate/append
semantics for the new file modes.
R=ager@google.com , ahe@google.com
BUG=
Review URL: https://codereview.chromium.org//1193653002 .
2015-06-18 15:19:26 +02:00
sgjesse@google.com
67badc8d74
Fix incorrect handling of closing stderr on Windows
...
BUG=http://dartbug.com/22088
R=kustermann@google.com
Review URL: https://codereview.chromium.org//854633005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43060 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-22 09:25:17 +00:00
sgjesse@google.com
218e366f89
Add support for file locking
...
This adds support for file locking in dart:io.
BUG=http://dartbug.com/17045
R=kustermann@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//833623004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42733 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 13:06:37 +00:00
asiva@google.com
2761153e08
Fix following compiler warnings:
...
os_win.cc(266) : warning C4018: '>=' : signed/unsigned mismatch
stub_code_ia32.cc(89) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
stub_code_ia32.cc(213) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
stub_code_ia32.cc(317) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
crypto_win.cc(5) : warning C4005: '_CRT_RAND_S' : macro redefinition
file_win.cc(512) : warning C4101: 'st' : unreferenced local variable
BUG=http://dartbug.com/21150
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//619723004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40826 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 23:29:26 +00:00
ajohnsen@google.com
7aed60d005
Show actualy FD for files in Observatory.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//296403005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36656 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 09:18:43 +00:00
ajohnsen@google.com
84bc2d6409
Remove accidental code.
...
BUG=
Review URL: https://codereview.chromium.org//257063005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35521 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 11:49:20 +00:00
ajohnsen@google.com
3265fb5d09
Make FileStat have millisecond precisions, for linux, mac and android.
...
BUG=https://code.google.com/p/dart/issues/detail?id=18442
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//252123005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35520 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 11:38:50 +00:00
rnystrom@google.com
53c6b88abb
Don't leak file names in Windows File::Stat().
...
BUG=https://code.google.com/p/dart/issues/detail?id=13848
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//172153007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32854 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 17:06:13 +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
iposva@google.com
781f737c6a
First round of http://dartbug.com/15922 :
...
- Address warnings about 64-bit to 32-bit conversions.
- Remove heap profiler.
R=asiva@google.com
Review URL: https://codereview.chromium.org//139043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31867 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 05:05:35 +00:00
ajohnsen@google.com
fe6b63d5e4
Add File.copy(Sync) to dart:io.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//105133004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31125 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 12:04:24 +00:00
ajohnsen@google.com
b76897eb00
Fix File truncate on Windows.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//76283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30406 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 12:32:29 +00:00
ajohnsen@google.com
7fef1ff77a
Add support for working with large files on unix systems, in dart:io.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//63363010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30399 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 11:38:20 +00:00
whesse@google.com
c9e4b7f7cd
dart:io | Fix File.rename on Windows to overwrite an existing target.
...
BUG=dartbug.com/14164
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//28553006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28933 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 14:57:35 +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
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
sgjesse@google.com
78e9b8ef87
dart:io | Add rename to Link
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//17848003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24468 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 14:09:29 +00:00
sgjesse@google.com
7ce40aa3a0
dart:io | Add File.rename
...
R=ajohnsen@google.com
BUG=
Committed: https://code.google.com/p/dart/source/detail?r=24029
Review URL: https://codereview.chromium.org//17033003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24030 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 13:34:54 +00:00
whesse@google.com
9c6d3b86e4
dart:io | Make FileStat.stat throw an exception when the file does not exist, or cannot be accessed.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//16140008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23543 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-03 15:01:02 +00:00
sgjesse@google.com
7841206de5
Change File.directory to not do any IO
...
Removed the File.directory and File.directorySync methods and added a
File.directory getter. The File.directory getter does not do any IO,
but just calculates the directory of the file from the path.
R=whesse@google.com
BUG=http://dartbug.com/9926
Review URL: https://codereview.chromium.org//15832003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23349 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 12:38:27 +00:00
whesse@google.com
fb8471244f
dart:io | Add FileSystemEntity.stat() and FileStat class.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//15018011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22685 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-14 16:26:13 +00:00
asiva@google.com
5cecc4b95c
Fix windows build break.
...
Review URL: https://codereview.chromium.org//15010004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22516 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 17:06:09 +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
whesse@google.com
9618a8d086
dart:io | Remove some unneeded global error save/restore pairs on Windows.
...
BUG=
Review URL: https://codereview.chromium.org//13828005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21205 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-10 14:41:17 +00:00
ajohnsen@google.com
e75df511a6
Change how File/Directory/Link .delete works.
...
Now:
- File.delete works iff path is File or Link.
- Directory.delete works iff path is Directory or Link.
- Link.delete works iff path Link.
This now matches .exists.
BUG=
Review URL: https://codereview.chromium.org//13654002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21045 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 07:44:18 +00:00
ajohnsen@google.com
578331c57e
Fix directory-listing, directory-deletion and file deletion, when links are involved.
...
BUG=https://code.google.com/p/dart/issues/detail?id=4928,https://code.google.com/p/dart/issues/detail?id=9278,https://code.google.com/p/dart/issues/detail?id=9504
Review URL: https://codereview.chromium.org//13578003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20929 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-04 17:30:17 +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
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
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
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
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
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
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
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
whesse@google.com
a0461f958d
Remove erroneous assert from Windows implementation of dart:io File.fullPath.
...
BUG=
Review URL: https://codereview.chromium.org//12208109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18307 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 13:44:00 +00:00
ager@google.com
ae0c2dc6e8
Update Windows file implementation to use the unicode APIs.
...
R=sgjesse@google.com
BUG=
Review URL: https://codereview.chromium.org//11554021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16045 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 15:38:51 +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