ajohnsen@google.com
0244fa2a77
Add debug-printing to file, and remove from test.
...
Adding the debug print made the test stop failing.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//206263005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34168 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 14:24:20 +00:00
iposva@google.com
f2a6f1b4b6
Another round of cleanups for http://www.dartbug.com/15922
...
- Address warnings about 64-bit to 32-bit conversions.
R=ajohnsen@google.com , asiva@google.com
Review URL: https://codereview.chromium.org//169893003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32831 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 23:35:55 +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
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
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
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
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
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
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
asiva@google.com
b4d9e0d620
Auto create ApiLocalScope before calling native functions, this ensures that
...
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.
Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//22303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
asiva@google.com
1e0c98714b
Make writes consistent across socket and file synchronous/asynchronus writes in terms of truncation semantics (reports an argument error if the list element contains a non byte value).
...
Remove Common_IsBuiltinList as it is not used anymore
Change synchronous file writes to use Dart_TypedDataAcquireData and
Dart_TypedDataReleaseData since the buffer object is always a Uint8List
instead of the more expensive Dart_ListGetAsBytes.
R=ajohnsen@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//18115002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24620 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-29 18:19:33 +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
whesse@google.com
91deb19914
dart:io | Enable multithreaded secure networking encryption.
...
BUG=
R=ajohnsen@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//16858011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24233 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 15:06:43 +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
iposva@google.com
1836035266
- Modify dart_api.h to be a proper C API.
...
- Verify that dart_api.h can be used from C
by changing the test_extension to be a pure C file.
R=asiva@google.com
Review URL: https://codereview.chromium.org//15689013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23476 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 16:36:27 +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
whesse@google.com
0ae62a79dc
dart:io | Implement truly asynchronous version of FileSystemEntity.type().
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//14907002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22364 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 12:02:10 +00:00
whesse@google.com
396011beae
dart:io | Add asynchronous versions of the methods of FileSystemEntity and Link.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//14642012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22354 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 08:39:16 +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
ajohnsen@google.com
b4eacbf8aa
Rename RandomAccessFile.readList and RandomAccessFile.writeList to RandomAccessFile.readInto and RandomAccessFile.writeFrom.
...
BUG=
Review URL: https://codereview.chromium.org//14018007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21466 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 15:44:41 +00:00
sgjesse@google.com
83bd0f1aa9
Add support for even more typed data on native ports
...
The only types missing now are: Float32x4, Float32x4List and
Uint32x4 (currently no Uint32x4List).
R=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//13998008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21455 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 14:19:46 +00:00
sgjesse@google.com
6507357ca0
Add support for more typed data types on native ports
...
Renamed the kUint8Array type for a Dart_CObject structure to
kByteArray to support all typed data types. The specific type is
stored in a separate type field. No matter what the specific type is,
the length of the byte array is always in bytes.
R=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//14142008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21423 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 09:01:56 +00:00
whesse@google.com
7e65824c01
dart:io | Add asynchronous Link.create implementation.
...
BUG=
Review URL: https://codereview.chromium.org//13800002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21077 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 15:12:47 +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
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
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
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
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
sgjesse@google.com
488b016a2f
Merge IO v2 branch to bleeding edge
...
R=ager@google.com , ajohnsen@google.com , whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//12316036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18820 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:58:11 +00:00
sgjesse@google.com
3130a75c97
Make all allocation of external arrays used for IO use the IOBuffer class
...
This will not make a difference right now, but when we start to do
something with io buffers they should originate from the same place.
R=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//11438045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15785 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 13:44:24 +00:00
ager@google.com
59ea7c3f6c
Fix a number of int type issues in dart:io File implementation to avoid implicit conversions that can change the value.
...
R=sgjesse@google.com
BUG=dartbug.com/5301
Review URL: https://codereview.chromium.org//11414293
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15635 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 14:39:05 +00:00
ager@google.com
67f052fa04
Add RandomAccessFile.read method and use it for file input stream.
...
I will deprecate the readList method completely as my next change.
R=sgjesse@google.com
BUG=
Review URL: https://codereview.chromium.org//11308226
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15571 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 09:29:40 +00:00
asiva@google.com
ebbb7c4134
- Represent strings internally in UTF-16 format, this makes it
...
compatible with webkit and will allow for easy externalization of
strings. One byte strings are retained for pure ASCII strings.
(The language specification was changed recently to reflect this as
follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
consistent and better describe the underlying functionality
Dart_NewString => Dart_NewStringFromCString
Dart_NewString8 => Dart_NewStringFromUTF8
Dart_NewString16 => Dart_NewStringFromUTF16
Dart_NewString32 => Dart_NewStringFromUTF32
Dart_NewExternalString8 => Dart_NewExternalUTF8String
Dart_NewExternalString16 => Dart_NewExternalUTF16String
Dart_NewExternalString32 => Dart_NewExternalUTF32String
Dart_StringGet8 => Dart_StringToUTF8
Dart_StringGet16 => Dart_StringToUTF16
Dart_StringToCString => Dart_StringToCString
Dart_IsString8 => Removed
Dart_IsString16 -> Removed
Dart_StringToBytes -> Removed
Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 17:56:46 +00:00
ager@google.com
57d91e3cdc
Use the encoding parameter for writeString on RandomAccessFile objects.
...
R=sgjesse@google.com
BUG=dartbug.com/6392
Review URL: https://codereview.chromium.org//11345025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14268 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 11:59:29 +00:00
nweiz@google.com
637f6fe616
Fix the definition of kIllegalPort in dart_api.h.
...
Declaring a variable directly in a header will cause C to be unable to link
multiple object files that both include that header, even if that variable is
const.
Review URL: https://chromiumcodereview.appspot.com//10834017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10135 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:47:33 +00:00
ager@google.com
52230ca22b
Support posting of external data into dart as external uint8 arrays through the Dart API.
...
The native ports use the snapshot reader to create the dart objects. Added support for reading external arrays from snapshots but no support for writing them. The only way an external array is written to a snapshot is through the api message writer.
This allows dart:io to avoid one copy of data read from files and sockets. This change only contains one use of the new API.
R=asiva@google.com ,iposva@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10698011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9281 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 07:22:32 +00:00
ager@google.com
379695ee2b
Implement File.lastModified.
...
R=sgjesse@google.com ,ajohnsen@google.com
BUG=dartbug/2988
TEST=standalone/io/file*
Review URL: https://chromiumcodereview.appspot.com//10443008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7945 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-24 13:10:02 +00:00
ager@google.com
169e2ae549
Finish file 'fuzzer' and fix issues.
...
- One integer extraction issue.
- Changed to using nativeport.call().transform to make sure that exceptions during the processing of the reply are propagated to the future.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10411053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7843 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 09:52:36 +00:00
ager@google.com
a47410bbed
Reland: Add more API fuzzing and fix the issues encountered.
...
Only change from original code review is the closing of files
opened in the test.
- Fixed integer checks in a couple of places.
- Added closed checks to async operations.
More changes like this coming but I'm splitting the work up to not
make the review too large.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10414021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7790 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 10:52:01 +00:00
ager@google.com
330aa1ab66
Revert "Add more API fuzzing and fix the issues encountered."
...
I know what is wrong but don't have the time to fix it right now.
I open a lot of files that are not closed and therefore the directory
cannot be deleted on Windows. Will fix ASAP.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10398053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7684 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 13:02:48 +00:00
ager@google.com
ceb6a9b621
Add more API fuzzing and fix the issues encountered.
...
- Fixed integer checks in a couple of places.
- Added closed checks to async operations.
More changes like this coming but I'm splitting the work up to not
make the review too large.
R=sgjesse@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10382194
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7683 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 12:52:10 +00:00
cshapiro@google.com
1472427af8
Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.""
...
This reverts commit 63480a81fccbde001494dd535cd06a8fa02ed261.
Review URL: https://chromiumcodereview.appspot.com//10379018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7352 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:16:09 +00:00