Commit Graph

776 Commits

Author SHA1 Message Date
whesse@google.com acd03abf83 dart:io: Use PathBuffer class for Directory.list on Windows platform.
BUG=https://code.google.com/p/dart/issues/detail?id=7505

Review URL: https://codereview.chromium.org//12252006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18448 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 15:00:55 +00:00
asiva@google.com 067b8ba92c Add snapshot size to the VM benchmarks suite.
Review URL: https://codereview.chromium.org//12226068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18367 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 02:39:00 +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
whesse@google.com 1a4082724c Revert changes to directory listing on Windows, to diagnose pub problems.
TBR=nweiz@google.com

BUG=

Review URL: https://codereview.chromium.org//12210086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18260 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 16:47:33 +00:00
whesse@google.com fa78161fbf Remove use of strnlen on Mac OS, because pre-Lion versions don't have it.
BUG=

Review URL: https://codereview.chromium.org//12212090

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18251 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 12:55:32 +00:00
whesse@google.com 45e351e689 Add string.h header file to directory listing implementations.
BUG=

Review URL: https://codereview.chromium.org//12221086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18248 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 12:21:56 +00:00
whesse@google.com 58e8b94008 Use a PathBuffer class in dart:io directory lister.
This simplifies the code, and avoids buffer overflow errors
by encapsulating snprintf.

BUG=

Review URL: https://codereview.chromium.org//12220034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18247 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 11:58:12 +00:00
tball@google.com 898ec7731f Added Socket::Close() function.
Review URL: https://codereview.chromium.org//12209047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18199 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 00:44:55 +00:00
sgjesse@google.com 92d5bffe00 Remove Windows line breaks accidentially committed in r18172
TBR=ager@google.com

Review URL: https://codereview.chromium.org//12217038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18174 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 15:24:12 +00:00
sgjesse@google.com 79e6b3849f Fix socket error reporting on Windows
An error which happened during writing could be reported as error code 0 (which indicate success). This has been fixed so that the original error is reported.

R=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//12218035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18171 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 14:39:29 +00:00
sra@google.com b82378e3e4 Revert "Fresh try at "Use browsers JSON.parse for parsing JSON.""
Review URL: https://codereview.chromium.org//12220009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18117 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 07:11:12 +00:00
sra@google.com 2a3de27007 Fresh try at "Use browsers JSON.parse for parsing JSON."
Review URL: https://codereview.chromium.org//12221009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18116 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 07:00:47 +00:00
sra@google.com 42ccc2aa4a Revert "Revert "Revert "Use browsers JSON.parse for parsing JSON."""
Review URL: https://codereview.chromium.org//12192003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18024 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 04:01:28 +00:00
sra@google.com 75a7b7e0f6 Revert "Revert "Use browsers JSON.parse for parsing JSON.""
with missing gyp file.

Review URL: https://codereview.chromium.org//12179004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18023 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:36:10 +00:00
sra@google.com e525fdb517 Revert "Use browsers JSON.parse for parsing JSON."
Review URL: https://codereview.chromium.org//12190002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18022 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:25:53 +00:00
sra@google.com cafd5ddcae Use browsers JSON.parse for parsing JSON.
This shrinks swarm by 27k (3.6%)
We can't make the error messages be the same since the native error contains only a message.

Review URL: https://codereview.chromium.org//12114021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18021 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:17:41 +00:00
asiva@google.com c2cafbbe33 - Change the layout of external typed array objects to avoid the extra indirection when accessing elements in the array.
- Change the Dart API which create these external arrays to account for this change
Review URL: https://codereview.chromium.org//12093071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17937 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 18:53:21 +00:00
ager@google.com e006d7f4df Fix Socket_WriteList to use the offset for external byte arrays.
R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//12087088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17852 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 16:16:54 +00:00
asiva@google.com e27d2761ea Remove the script snapshot option from gen_snapshot as the dart executable can be used for generating script snapshots.
Review URL: https://codereview.chromium.org//12084011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17737 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-28 23:36:00 +00:00
asiva@google.com d313a1243f 1. Change option --use_script_snapshot to --use-script-snapshot (easier to type).
2. Use dart binary with the --generate-script-snapshot option to generate dart2js snapshot
Review URL: https://codereview.chromium.org//12084010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17686 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-26 05:47:56 +00:00
asiva@google.com cae7d80c82 Add --generate-script-snapshot option to dart so that this binary can be used for generating script snapshots.
Review URL: https://codereview.chromium.org//11953115

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17680 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-26 00:43:09 +00:00
hausner@google.com 0b9e169dad Verify integrity of JSOM messages sent to debugger client
Make sure JSOM messages are grammatically correct and string values are properly encoded.
Review URL: https://codereview.chromium.org//12035086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17617 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 23:35:34 +00:00
iposva@google.com 7e0cb951e8 Fix issue 8094:
- Do not assert that dart-scheme URIs point to libraries exclusively.
Review URL: https://codereview.chromium.org//12036089

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17604 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 21:56:10 +00:00
floitsch@google.com ed938af868 Rename new Uri.fromString to Uri.parse.
Review URL: https://codereview.chromium.org//12052038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17562 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 13:26:18 +00:00
floitsch@google.com fb7b9e3c5c Rename Date to DateTime.
BUG=http://dartbug.com/1424

Review URL: https://codereview.chromium.org//11770004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17549 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 12:16:37 +00:00
hausner@google.com 93d190dcbb More length restrictions in debugger protocol
Restrict the length of the textual representation of variable values that are sent over the debugger wire protocol. The full value can still be retrieved explicitly by the debugger client.
 
Review URL: https://codereview.chromium.org//12040053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17517 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 00:53:42 +00:00
hausner@google.com 74b36381d8 Limit textual representation of arrays in debugger
The debugger wire protocol choked when large arrays were present, because it tried to send the entire array as textual value. This change limits the size of the textual representation to about 256 characters. If elements are dropped, they are printed as …

 
Review URL: https://codereview.chromium.org//12033039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17486 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 18:41:00 +00:00
floitsch@google.com 1febeb689a Move some core classes to collection library.
Review URL: https://codereview.chromium.org//11867024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17352 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-21 13:34:02 +00:00
hausner@google.com c3a133777d Add function for one-time stop at function entry
Adds function Dart_OneTimeBreakAtEntry()

Used by debugger clients to stop at the beginning of the program without setting a user-visible breakpoint.
Review URL: https://codereview.chromium.org//11926026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17332 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-19 00:03:30 +00:00
regis@google.com 912194a756 Fix vm code base so that it can be built for --arch=simarm (no snapshot yet).
Review URL: https://codereview.chromium.org//11956004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17246 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:34:20 +00:00
hausner@google.com 7e70aaddf7 Support for embedded Dart scripts
Add a line and column offset to scripts so that errors and exceptions
in embedded Dart scripts are reported at the proper location.
New API call Dart_LoadEmbeddedScript() that allows to specify
line and column offsets.

Stumbled on and fixed a bug. Script::kind field was not externalized to snapshot.
Review URL: https://codereview.chromium.org//11824067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16934 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 21:47:09 +00:00
whesse@google.com 62a9af5ae9 Speed up secure sockets by increasing encrypted buffer size.
BUG=

Review URL: https://codereview.chromium.org//11819062

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16921 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 14:24:57 +00:00
ager@google.com 91514e50e0 Remove accidental addition of new stream API in dart:io.
R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//11823050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16903 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 08:43:56 +00:00
whesse@google.com 7f499abb04 Fix race condition in Directory.create.
BUG=https://code.google.com/p/dart/issues/detail?id=7679

Review URL: https://codereview.chromium.org//11794048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16842 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:59:14 +00:00
sgjesse@google.com 800b4b6c37 Add function for finding what a InputStream or OutputStream is attached to
For the dart:io types InputStream and OutputStream the top level
function stdioType will return whether the stream is attached to a
terminal, pipe, file or something else.

BUG=dart:2789

R=ager@google.com

Review URL: https://codereview.chromium.org//11773041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16839 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 09:17:07 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
whesse@google.com 7f60b90a48 Add synchronous directory listing to dart:io Directory.
BUG=dart:4730

Review URL: https://codereview.chromium.org//11748017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16636 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 13:51:15 +00:00
ager@google.com cfeb884afd Properly initialize eventhandler mask for all handles on Windows.
The change to make writes to stdout/stderr async exposed this
issue.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11741015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16601 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-03 13:16:19 +00:00
meh@google.com 432978367e Clean up CodeObservers
Move CodeObserver registration to the OS abstraction.
Move Pprof logic to the OS abstraction.
Remove pprof from VM tests because now pprof logic is in the VM itself.
Add DISALLOW and AllStatic to Code Observers where appropriate.

Previous review: https://codereview.chromium.org/11572032/

BUG=7321

Review URL: https://codereview.chromium.org//11660011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16462 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 00:23:25 +00:00
meh@google.com ef737f105d Revert "Clean up CodeObservers"
This reverts commit 43e5ada2fba69c7d5c009b5bf70a234f12941617.

BUG=

Review URL: https://codereview.chromium.org//11644074

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16446 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:45:36 +00:00
meh@google.com 6fbf9f1c2e Clean up CodeObservers
Move CodeObserver registration to the OS abstraction
Move Pprof logic to the OS abstraction
Add DISALLOW and AllStatic to Code Observers where appropriate

BUG=7321

Committed: https://code.google.com/p/dart/source/detail?r=16273

Review URL: https://codereview.chromium.org//11572032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16445 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:37:59 +00:00
devoncarew@google.com 7695213dcf Fix an issue with newlines and exception text in the debugger wire protocol.
Review URL: https://codereview.chromium.org//11645046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16444 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:27:23 +00:00
ager@google.com 6d0f985432 Add exitCode setter to set the exit code returned by the Dart VM
standalone binary on normal termination.

This is needed to be able to set the exit code without cutting
off pending asynchronous operations.

R=sgjesse@google.com,rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//11665004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16435 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 10:36:52 +00:00
whesse@google.com ee2a8fe7d6 Add automatic initialization of SecureSocket library.
BUG=dart:7541

Review URL: https://codereview.chromium.org//11583026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16384 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 18:17:07 +00:00
ager@google.com 87a43bef60 Implement debugger connection on Windows.
This is a slightly cleaned up version of the code that Devon
created.

All of eventhandler and socket in bin is designed for async
communication only. Therefore, it does not make much sense
to use it for something as simple as this. I have put the
sync send and receive operations into DebuggerConnectionImpl
instead of attempting to use the async Socket::Read and
Socket::Write.

R=devoncarew@google.com,sgjesse@google.com,hausner@google.com
BUG=

Review URL: https://codereview.chromium.org//11642019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16336 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 18:42:19 +00:00
ager@google.com 60c599f5d1 Be explicit about use of W version on Windows.
The trunk builder is unhappy. I don't understand why since we are
defining UNICODE and _UNICODE in our header files. However, let's
just be explicit.

R=sgjesse@google.com,ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//11639017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16322 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 14:37:14 +00:00
kustermann@google.com 29585740d6 Set close-on-exec flag on pipe() and kqueue() file descriptors on MacOS
Review URL: https://codereview.chromium.org//11571056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16316 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 12:43:38 +00:00
ager@google.com 406617e179 Fix Windows XP process handling.
ProcThreadAttributeLists are not supported on Windows XP so we need
to dynamically load the functions and check that they exist. This
of course means that file descriptors are inherited on XP, but we
knew that already.

R=sgjesse@google.com
BUG=dartbug.com/7492

Review URL: https://codereview.chromium.org//11637014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16309 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 10:10:01 +00:00
kustermann@google.com c20c523de8 Set close-on-exec flag on pipe() and epoll() file descriptors
Review URL: https://codereview.chromium.org//11644017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16308 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 09:36:47 +00:00
sgjesse@google.com 606bfd5e96 Reapply "Fixes to eventhandler and HTTP""
This reapplies r16252 with a number of fixes.

R=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11606020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16306 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 08:11:51 +00:00