Commit Graph

523 Commits

Author SHA1 Message Date
whesse@google.com bb7c2d9969 Fix dart:io Process class on the Windows plaform, which had some race conditions.
BUG=dart:4414

Review URL: https://chromiumcodereview.appspot.com//10825473

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11050 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 14:24:22 +00:00
whesse@google.com b074764cfb Fix for bug dart 3639: Process.run gets stuck on Mac
BUG=
TEST=Run fresh build no macosx10.7. Observe finishing to completion without being stuck on dartdoc step

Review URL: https://chromiumcodereview.appspot.com//10834423

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11034 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 11:45:48 +00:00
rnystrom@google.com 1e14772bb0 Don't traverse through junctions when recursively deleting on Windows.
Review URL: https://chromiumcodereview.appspot.com//10825413

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11005 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 23:25:13 +00:00
whesse@google.com 99e64f84c2 Fix dart:io Process callback on Windows platfrom calling convention from cdecl to stdcall.
BUG=dart:4414

Review URL: https://chromiumcodereview.appspot.com//10836337

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10946 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 12:32:19 +00:00
ajohnsen@google.com 8ca15ec105 Fix HttpHeaders.date and add HttpHeaders.ifModifiedSince.
BUG=

Review URL: https://chromiumcodereview.appspot.com//10855197

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10793 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 06:50:54 +00:00
ager@google.com d6fde19b9d Revert "Start adding TLS (SSL) sockets to dart:io."
Revert "Add stub for TlsSocket to dart2js library."

R=whesse@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10828320

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10700 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 05:50:35 +00:00
jackpal@google.com dfc984f75f Support generating the dart vm snapshot binary on Android
This change splits the generate_snapshot_file build target into two targets:

generate_snapshot_bin - executes gen_snapshot to create snapshot_bin_file
generate_snapshot_file - creates snapshot_cc_file

It's not strictly necessary to split the generation into two steps, but
it is convenient to do so, because only the first step needs to know about
Android. The second step can be shared between all builds.

For Android we copy the gen_snapshot executable and all its input files
to Android, run it there, and copy the output files back to the host.

Review URL: https://chromiumcodereview.appspot.com//10827250

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10676 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 20:04:54 +00:00
whesse@google.com 5c55f1dd28 Start adding TLS (SSL) sockets to dart:io.
Add Linux implementation for SSL client sockets.

BUG=dart:3950
TEST=standalone/io/tls_socket_test

Committed: https://code.google.com/p/dart/source/detail?r=10565
Reverted: r=10567

Review URL: https://chromiumcodereview.appspot.com//10704159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10650 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 14:34:02 +00:00
jackpal@google.com e060b66a3e Add _android files for building DartVM on Android
Split directory_posix -> directory_(android|linux|macos)
  This allows us to cleanly make Android-specific changes to
  directory_android.cc

Copy all _linux files to _android files and edit as needed to account
for the differences between Linux and Android:

 + getcwd(0, NULL) doesn't work on Android, have to emulate
 + Android doesn't have a '/tmp' directory, have to emulate
 + Android doesn't provide mkdtemp(), have to emulate.
 + Small differences in the available system include files.
 + Use pthread_cond_timedwait_monotonic instead of
   pthread_condattr_setclock

Review URL: https://chromiumcodereview.appspot.com//10826233

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10613 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:06:52 +00:00
whesse@google.com e46ed16ce1 Revert "Start adding TLS (SSL) sockets to dart:io."
This reverts commit 10565.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10832269

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10567 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 12:31:36 +00:00
whesse@google.com 7ad7023d79 Start adding TLS (SSL) sockets to dart:io.
Add Linux implementation for SSL client sockets.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10704159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10565 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 12:22:03 +00:00
nweiz@google.com 884404dca2 Add an OutputStream.closed getter.
BUG=3603

Review URL: https://chromiumcodereview.appspot.com//10832188

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10455 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 20:09:19 +00:00
whesse@google.com ed4b91dc18 Revert "Revert "Fix dartdoc block code comments in Dart API that are broken and use [: :] delimiters.""
This reverts the reversion of 10368.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10837163

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10373 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 09:09:13 +00:00
whesse@google.com 87ed218f2c Revert "Fix dartdoc block code comments in Dart API that are broken and use [: :] delimiters."
This reverts commit 10368.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10825242

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10370 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 08:48:29 +00:00
whesse@google.com f03f271148 Fix dartdoc block code comments in Dart API that are broken and use [: :] delimiters.
BUG=dart:2570

Review URL: https://chromiumcodereview.appspot.com//10854025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10368 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 08:16:39 +00:00
rnystrom@google.com 0bc9b19740 Rename BadNumberFormatException -> FormatException.
Review URL: https://chromiumcodereview.appspot.com//10850034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10354 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 20:56:59 +00:00
jackpal@google.com b90fc6b87f Revert "Make Directory::Current() work with unenhanced POSIX getcwd"
(Was committed by mistake.)

This reverts commit 75e15184afcd00e293a44ccba7dc1ead5387c382.

Merge remote-tracking branch 'refs/remotes/git-svn'

Revert "Make Directory::Current() work with unenhanced POSIX getcwd"

This reverts commit cab70428509870ae6ebf8de09d42991cc0318a07.

(Which was accidentally checked in before being reviewed.)

Make Directory::Current() work with unenhanced POSIX getcwd

POSIX says getcwd needs to be passed a pre-allocated
buffer, but many platforms provide an extended version
of getcwd that will allocate a buffer when called with
arguments (NULL, 0).

Display::Current() was depending upon this extended
behavior, which happens to work on Linux and Mac
platforms, but which doesn't work on other POSIX
platforms (such as Android.)

Fixed by using the preprocessor to choose between two
implementations of Display::Current, one of which depends
upon the extended semantics of getcwd, the other of which
only depends upon the standard semantics of getcwd.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10828180

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10316 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 22:39:36 +00:00
jackpal@google.com ccda58baf5 Make Directory::Current() work with unenhanced POSIX getcwd
POSIX says getcwd needs to be passed a pre-allocated
buffer, but many platforms provide an extended version
of getcwd that will allocate a buffer when called with
arguments (NULL, 0).

Display::Current() was depending upon this extended
behavior, which happens to work on Linux and Mac
platforms, but which doesn't work on other POSIX
platforms (such as Android.)

Fixed by using the preprocessor to choose between two
implementations of Display::Current, one of which depends
upon the extended semantics of getcwd, the other of which
only depends upon the standard semantics of getcwd.

BUG=

Review URL: https://chromiumcodereview.appspot.com//10824159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10309 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 21:51:20 +00:00
nweiz@google.com 6b9b429688 Add a ListOutputStream.onData callback.
BUG=4335

Review URL: https://chromiumcodereview.appspot.com//10832145

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10298 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 18:25:14 +00:00
asiva@google.com 9d123e5366 Move hashmap.h and hashmap.cc from the 'bin' directory to 'platform' directory so that it can be used from VM code too.
Review URL: https://chromiumcodereview.appspot.com//10853009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10261 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:11:30 +00:00
ahe@google.com 1e0c2471a5 Changed default Uri constructor to Uri.fromComponents(), new default constructor is Uri.fromString(). This is to avoid new Uri('http://www.google.com') resulting in Uri with scheme='http://www.google.com'.
Committing on behalf of: Alexander Aprelev <aprelev@gmail.com>

BUG=dart-3348
TEST=new Uri('http://www.google.com') is the same as new Uri.fromString('http://www.google.com') same as new Uri.fromComponents(scheme:'http', domain:'www.google.com')

Review URL: https://chromiumcodereview.appspot.com//10850015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10168 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:48:30 +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
cshapiro@google.com 772a399cab Emit symbol maps for compiled code for use by the Linux perf tool.
Review URL: https://chromiumcodereview.appspot.com//10831005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9922 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 00:21:25 +00:00
regis@google.com 1eed55c529 Add missing type finalization for function literals not assigned to a function
variable.
Various cleanup.
Review URL: https://chromiumcodereview.appspot.com//10797031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9782 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 16:08:43 +00:00
hausner@google.com 67191621a4 Debugger API to enable/disable debugging of libraries
Review URL: https://chromiumcodereview.appspot.com//10797033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9772 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 22:51:09 +00:00
ajohnsen@google.com 73477dd9cb Add the ability to get info of a Http connection, e.g. host and port.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10803033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9761 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 15:18:50 +00:00
hausner@google.com 373d313af3 Add multibyte string support to debugger
Issue 4110.

Had to extend the JSON protocol to support code points > 0xffff. The debugger client (editor) needs to support this new escape sequence'
format as well.
Review URL: https://chromiumcodereview.appspot.com//10801002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9751 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 23:27:59 +00:00
regis@google.com b86a40f48f Fix type checking of void type.
Fix library and tests accordingly.
Add new test.
Disable new test for dart2js.
Disable some now failing co19 tests (new issue 158 filed).
Hide internal VM String types from user (not complete).
Review URL: https://chromiumcodereview.appspot.com//10787021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9681 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 21:34:07 +00:00
regis@google.com dc96874999 Revert fix for type checking of void type, because some top level tests fail.
Review URL: https://chromiumcodereview.appspot.com//10784020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9673 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 19:05:38 +00:00
regis@google.com a8ceb243f6 Fix type checking of void type.
Fix library and tests accordingly.
Add new test.
Disable new test for dart2js.
Disable some now failing co19 tests (new issue 158 filed).
Hide internal VM String types from user (not complete).
Review URL: https://chromiumcodereview.appspot.com//10704216

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9672 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 18:05:55 +00:00
ager@google.com 0d14ec42be Guard against integer overflow in process constructor.
I have set an arbitrary limit of around one million arguments. I
see no reasonable use of the Process API where that would be a
problem.

R=whesse@google.com,turnidge@google.com
BUG=dartbug.com/1751
TEST=None, can't happen right now but might in the future.

Review URL: https://chromiumcodereview.appspot.com//10690160

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9583 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 08:35:10 +00:00
whesse@google.com 4e4104a3e1 [IO] Improve documentation for dart:io Socket.onWrite.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10703096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9428 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-06 08:41:37 +00:00
sgjesse@google.com 9f2a6f06a0 Fix HTTP client eviction timer bug
The HTTP client eviction timer should only be cancled and nulled out
when there are no client connections at all.

R=whesse@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10693091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9404 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 12:27:35 +00:00
whesse@google.com d05e40212a IO: Fix error in Process exit handling.
BUG=3639
TEST=

Review URL: https://chromiumcodereview.appspot.com//10697066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9336 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 10:16:25 +00:00
ager@google.com 485bf8d10b Deal with special cmd.exe environment variables that have keys that start with an equals sign.
I have attempted to deal with them correctly instead of ignoring
them so that they can be passed on unchanged to subprocesses.

R=johnniwinther@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10689065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9284 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 10:58:24 +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 f791a12b38 Terminate event handler thread on isolate shutdown.
R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10693039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9251 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 14:40:17 +00:00
hausner@google.com d9ba32f258 Support for lists in debugger wire protocol
Review URL: https://chromiumcodereview.appspot.com//10698039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9235 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 00:52:51 +00:00
turnidge@google.com 3f940819a7 Add a callback to inform embedders when an isolate is being shut down.
Review URL: https://chromiumcodereview.appspot.com//10450016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9211 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 18:15:17 +00:00
hausner@google.com fbeaabda52 Debugger support to display global variables
- Add library id to ActivationFrame
- Add debugger function to get all global variables visible in
  a library (including imported variables).
- Add LibraryPrefixIterator
- Fix Dart_GetLibraryImports
Review URL: https://chromiumcodereview.appspot.com//10657048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9121 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:32:34 +00:00
whesse@google.com 0b2a9d5270 Make Path implement (extend) Hashable, and make Path.append to an empty path work right.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10668041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9110 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 14:24:48 +00:00
iposva@google.com a5cce32a8d - Fix sorting.
Review URL: https://chromiumcodereview.appspot.com//10661046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9092 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 23:20:31 +00:00
iposva@google.com da8c641cc4 - Sort sources in gyp files.
Review URL: https://chromiumcodereview.appspot.com//10663029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9091 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 23:05:42 +00:00
ager@google.com b876387df2 Remove reference to non-existing classes from encodings class comment.
R=whesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10662015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9060 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 12:10:02 +00:00
whesse@google.com 1bc6b99ce6 Add methods to dart:io Path.
Add .append, which adds a segment to the end of a Path, and
.pathWithoutExtension, which removes the extension (part after .),
from the filename at the end of a path, and returns the new path.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10638002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9028 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 11:02:49 +00:00
whesse@google.com 015c40188c Add .fromPath constructors to File and Directory.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10639004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9024 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 10:36:20 +00:00
ajohnsen@google.com c0870d4e78 Document the HttpClient uses KeepAlive, keeping sockets open for up to 60 seconds after a connection is complete.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10640017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9017 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 09:13:18 +00:00
asiva@google.com 9126cb7b77 Add pprof symbol generation option to run_vm_tests so that we can use pprof in the vm benchmark framework as well.
Review URL: https://chromiumcodereview.appspot.com//10643003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9011 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 23:33:31 +00:00
efortuna@google.com f89032cd13 Add dart:web to VM.
Review URL: https://chromiumcodereview.appspot.com//10574037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8993 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 17:11:02 +00:00
iposva@google.com 0fd25118b9 - Move the Timer interface to the dart:isolate library so that it
is accessible from both client and standalone program.
- Enable a way for the embedder to provide the implementation of
  the Timer interface.
- Update tests.
Review URL: https://chromiumcodereview.appspot.com//10532123

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8987 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 16:17:21 +00:00