Commit Graph

3172 Commits

Author SHA1 Message Date
sgjesse@google.com 59bf2982c2 Make sure to use an ObjectArray when writing to a socket
This improves performance of the native code accessing the data in the
supplied buffer when it is no already an ObjectArray.

The code is duplicated as refactoring into a separate function was not
feasible.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3428 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-19 08:49:30 +00:00
iposva@google.com 1f01a48906 - Fix the return type of File.openSync.
- Ensure to always hand a ObjectArray to the native code.
- Start making private methods private.
Review URL: https://chromiumcodereview.appspot.com//9264001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3424 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-19 02:48:47 +00:00
hausner@google.com 3ebdf081ca Set breakpoint at url, line number
Add debugger functionality to set breakpoint at given url and line number.
Review URL: https://chromiumcodereview.appspot.com//9240014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3420 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 23:15:56 +00:00
turnidge@google.com e62f34ce77 Give isolates names to be used during debugging.
Implement --trace_isolates.

-------------

Sample output of --trace_isolates for the CrossIsolateMessageTest:

[+] Starting isolate:
    isolate:    CrossIsolateMessageTest.dart/main-7112
[+] Starting isolate:
    isolate:    CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
[+] Starting isolate:
    isolate:    CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/main-7112
    reply_port: 7117
    dest:       CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
    dest_port:  7115
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
    reply_port: 7118
    dest:       CrossIsolateMessageTest.dart/main-7112
    dest_port:  7117
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/main-7112
    reply_port: 7119
    dest:       CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
    dest_port:  7114
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
    reply_port: 7120
    dest:       CrossIsolateMessageTest.dart/main-7112
    dest_port:  7119
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/main-7112
    reply_port: 0
    dest:       CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
    dest_port:  7120
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
    reply_port: 0
    dest:       CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
    dest_port:  7118
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
    reply_port: 0
    dest:       CrossIsolateMessageTest.dart/main-7112
    dest_port:  7116
[>] Posting message:
    source:     CrossIsolateMessageTest.dart/main-7112
    reply_port: 0
    dest:       CrossIsolateMessageTest.dart/main-7112
    dest_port:  7113
[-] Stopping isolate:
    isolate:    CrossIsolateMessageTest.dart/CrossIsolate2.main-7115
[-] Stopping isolate:
    isolate:    CrossIsolateMessageTest.dart/CrossIsolate1.main-7114
[-] Stopping isolate:
    isolate:    CrossIsolateMessageTest.dart/main-7112
Review URL: https://chromiumcodereview.appspot.com//9242035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3416 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 21:46:27 +00:00
sgjesse@google.com 9a9db39d0e Add MutexLocker and MonitorLocker to runtime/bin
These complements the MutexLocker and MonitorLocker in runtime/vm which have the same logic, but are also VM stack resources.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3387 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 09:48:30 +00:00
sgjesse@google.com 409a5cc49a Use platform implementation of Monitor in thread pool
This removes the direct use of pthread API for the thread pool monitor now that that code is shared. It also gets the Windows implementation for free.

Next step will be to get rid of using the pthread API for handling the threads as well, but that requires additional operations on the Thread class in platform/thread.h.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3362 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 15:36:35 +00:00
sgjesse@google.com bf67f24098 Move assert.h/assert.cc from runtime/vm to runtime/platform
The purpose of this change is twofold:

1. Source in the bin directory can now use the same assertions as
   source in the vm directory. The ASSERT macro used by the code
   in runtime/bin was just defined to use assert from the standard
   C library.
2. Moving other implementation parts from runtime/vm to
   runtime/platform (e.g. classes Monitor and Mutex) for sharing
   between runtime/bin and runtime/vm will be easier as these
   implementations rely on these assertion macros.

Created two gypi files for the platform directory. One for the
headers and one for the source. The source one is only included
when building the VM library and will be present in libdart.a
when the dart executable is linked.

All the code for asserts is still in the dart namespace.

Also re-arranged the order of includes to be alphabetically in
the files touched.

R=ager@google.com, iposva@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9189003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3335 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 12:28:10 +00:00
asiva@google.com d6ccf8d32a Fix failure
../runtime/vm/object.cc:7149: error: unimplemented code
  Abort
in standalone tests when run with 64bit dart.

The ioctl function when used with FIONREAD was being passed a 64 bit
argument which is incorrect.

Documentation on ioctl:
FIONREAD
The FIONREAD ioctl returns the number of data bytes (in all data
messages queued) in the location pointed to by the arg parameter. The
ioctl returns a 32-bit quantity for both 32-bit and 64-bit
application., Therefore, code that passes the address of a long
variable needs to be changed to pass an int variable for 64–bit
applications.
Review URL: http://codereview.chromium.org//9194002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3250 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-12 19:32:06 +00:00
sgjesse@google.com 0122a33a76 Handle EINTR on all IO operations
There have been spurious FileIOExceptions seen on some Mac OS machines.

R=ager@google.com,whesse@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9139011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3185 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-11 15:12:27 +00:00
ager@google.com 607eea1402 Cleanup gypi mess.
My change that introduced a platform directory shared between vm and bin runtime components did not correctly update gypi files.

BUG=
TEST=

Review URL: http://codereview.chromium.org//9124030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3155 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 16:50:14 +00:00
ricow@google.com 45b5e07fa9 Fix a few nits in comments in input_stream.dart
Review URL: http://codereview.chromium.org//9155007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3137 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 12:42:02 +00:00
sgjesse@google.com a6071e0880 Thread pool changes
Make one global thread pool instead of a thread pool for each
eventhandler (i.e. isolate).

Also:

* Added handler function for thread pool tasks.
* Added thread pool shutdown.
* Added a simple test.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9112013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3079 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-09 07:38:30 +00:00
whesse@google.com 480722154a Fix assertion failure in Process object, where non-integer pid could be passed to kill.
BUG=
TEST=

Review URL: http://codereview.chromium.org//9120004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3038 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 13:54:31 +00:00
sgjesse@google.com 9b9a51361e Remove reference to removed bin/global.h from .gypi file
TBR=ahe@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9123005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3036 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 13:11:13 +00:00
sgjesse@google.com 8b3b89bf23 Remove bin/global.h now that the buildbot is green again
TBR=ahe@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9125003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3035 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 12:59:39 +00:00
sgjesse@google.com 7e66a1488a Add back bin/globals.h to help buildbot
TBR=ahe@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9110030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3034 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 12:51:43 +00:00
sgjesse@google.com c686e7bd0d Dummy update to gypi file to force rebuild on buildbot
TBR=ahe@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9124003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3032 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 12:40:31 +00:00
ager@google.com c4c92c4f7b Introduce runtime/platform directory for code shared between vm
and bin.

Cleaned up globals.h. Common parts now in platform/globals.h.
vm specific parts are in vm/globals.h and bin/globals.h is gone.

R=sgjesse@google.com,iposva@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//9114008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3030 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 11:28:21 +00:00
ajohnsen@google.com c2b45bf04e Add optional workingDirectory argument to Process.start.
Review URL: http://codereview.chromium.org//9108008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2987 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 09:54:54 +00:00
ager@google.com 8e2382fa7a Fix wrong return type on fullPath in File API.
R=ajohnsen@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//9111009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2981 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 08:43:21 +00:00
sgjesse@google.com 73c2a13913 Start of thread pool implementation
This the initial commit for adding a thread pool to the Dart
server. For now it is hidden behind a flag (--enable_thread_pool)
and when enabled just starts up and processes 100 void tasks.

Mac OS implementation is not tested and Windows implementation is
still pending.

As we are currently not sharing anything between bin/ and vm/ I
have just used pthread calls directly in the Linux and Mac OS
implementation code. However with Monitor and Thread classes from
vm/ the thread pool could be written platform independently. This
can always be changed later.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8983017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2946 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 15:16:06 +00:00
ager@google.com d5696e2026 Change the behavior of open on files to not truncate by default
when opening for writing.

We have an explicit truncate method in the API and truncating
the file is a bit hostile to users who want to modify or append
to an existing file. :-)

R=whesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//9034005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2941 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 12:23:01 +00:00
sgjesse@google.com 6b197bb454 Make sure to close when _BaseDataInputStream reaches the end
This will close the opened file used by a FileInputStream when the
input stream is read to the end.

Should get rid of the current Windows buildbot redness.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9072004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2907 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-03 12:26:48 +00:00
sgjesse@google.com 18aba0fd29 Handle reading byte past the end of file
When reading a byte past the end of file an error is now triggered.

R=ager@google.com

BUG=dart:1017

TEST=

Review URL: http://codereview.chromium.org//9072003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2906 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-03 11:16:56 +00:00
sgjesse@google.com 959977140b Refactor the file input stream
Inherit FileInputStream from _BaseDataInputStream.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9067004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2904 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-03 10:17:17 +00:00
sgjesse@google.com 0010d34ced Fix checked mode failure
TBR=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9065006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2895 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-02 13:10:48 +00:00
sgjesse@google.com 8055ffeb77 Add close to input stream and cleanup socket and streams
* All input streams now have a close method for just cutting
  the stream
* Removed interfaces FileInputStream and FileOutputStream
* Added exceptions to socket to avoid mixing stream and non-stream
  use of the same socket
* Added special handling of the socket connect handler callback

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9029001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2893 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-02 13:00:59 +00:00
ager@google.com 27508f3eb1 Change the process API to be completely asynchronous.
Some of the implementation is still not asynchronous but the API is
now prepared for it.

This is a breaking change for the dart test scripts. Once the
change has its final form I will add new stable builds of the
VM to the changelist for running tests.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//9024008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2753 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-22 13:43:43 +00:00
iposva@google.com 5b509684e3 - Fix outdated use of factory clause.
- Update error messages.
Review URL: http://codereview.chromium.org//8949043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2707 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-21 17:26:02 +00:00
sgjesse@google.com 7014704266 Fix list output stream
The write and writeFrom where missing their boolean return value.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9021008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2687 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-21 08:33:02 +00:00
sgjesse@google.com 3ebb36c77f Implement list based output stream and add pipe to list based input streams
R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8989019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2641 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 16:03:29 +00:00
sgjesse@google.com bcd4584f59 Add input streams based on supplying data from lists
Two new streams are added ListInputStream and
DynamicListInputStream. ListInputStream takes all the data in the
stream in the constructor whereas DynamicListInputStream can get data
added dynamically using the write method and have end of stream
indicated using the method markEndOfStream.

In a separate change I expect to have the current FileInputStream be
based on the _BaseDataInputStream as it currently used the same logic
with the sync file API.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8953030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2621 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 10:07:02 +00:00
ager@google.com 47a7c9bcdb Undo change that converted exit code 255 to -1.
It seems that most systems do not perform that conversion and it
could therefore be confusing.

Simplify the crash handling in the test scripts accordingly.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8989011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2620 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 10:06:35 +00:00
ager@google.com 1a9631d322 Fix type typo. :-)
R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8956022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2618 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 09:38:20 +00:00
ager@google.com 46ba817562 Add asynchronous versions of the methods on Directory.
For now, use an isolate to make the operations async from the
point of view of the main Dart thread.

Clean up the directory tests a bit by removing code that didn't do anything and by removing file testing that is already covered by the file tests.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8965036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2617 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 09:28:28 +00:00
asiva@google.com bde808f44b Changes to create an application snapshot which can be layered on top
after an isolate is created and initialized.

Added an option --use_script_snapshot which creates a snapshot of the specified script in an isolate, shuts that down and restarts on a new isolate and loads the script from the snapshot buffer and executes it.
Review URL: http://codereview.chromium.org//8970004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2609 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 02:04:24 +00:00
ager@google.com 1aaa58f803 Make the repeating argument to timers optional.
R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8992007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2577 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-19 12:34:12 +00:00
sgjesse@google.com 0a3bf1c3eb Add pipe to input stream
Using the pipe method the data from an input stream can be piped
directly to an output stream.

R=whesse@google.com, ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8933029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2564 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-19 09:14:19 +00:00
turnidge@google.com 0b833d4977 Add support for interrupting an isolate in the vm. Interrupts are
implemented by extending the existing support for stack overflow
checking in the vm.  When an interrupt is scheduled for an isolate, we
overwrite the isolate's stack limit with a value guaranteed to cause a
stack overflow.

We support multiple kinds of interrupts, encoded in the low bits of
the stack limit.

Add Dart_InterruptIsolate and Dart_InterruptIsolateCallback to the
dart embedding api to allow the embedder to request and handle
interrupts.

Add EXPECT_SUBSTRING(needle, haystack) testing macro.
Review URL: http://codereview.chromium.org//8851008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2529 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 18:41:20 +00:00
iposva@google.com 1329070b37 Fix bug 846:
- Only execute timers which were pending prior to the wakeup to
  avoid busy looping.
- Prevent double notification for timers.
Review URL: http://codereview.chromium.org//8973005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2500 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 01:25:47 +00:00
sgjesse@google.com 5b74b0065a Update comments for streams
R=whesse@google.com, ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8916003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2426 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-14 13:41:35 +00:00
sgjesse@google.com 9f92d783ef Change temp dir generation on Windows to use UUIDs instead of random numbers
This avoids having to generate random numbers for all platforms as
only Windows was using them. Also when the andom number generator is
deterministic the Windows implementation using random numbers could
end up running out of temporary files.

R=whesse@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8879058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2417 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-14 07:25:09 +00:00
sgjesse@google.com f2bda92a66 Add support for getting OS error information for creating temporary directories
R=whesse@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8934004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2385 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-13 14:22:50 +00:00
cshapiro@google.com aae8784962 Add an interface for retrieving the value of unsigned 64-bit integers.
With this change, IntegerValue is renamed to IntegerToInt64 for symmetry
with the new IntegerToUint64 interface.  Also uses of UInt64 have been
replaced with Uint64 for naming consistency.

Review URL: http://codereview.chromium.org//8585049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2317 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 17:25:44 +00:00
sgjesse@google.com 8871567117 Don't treat stdin from a terminal differently from piped input
Both piped input (when using the "<" to pipe in a file) and terminal
input from stdin can set POLLIN with 0 bytes available without POLLHUP
when end of file is reached.

R=ager@google.com

BUG=dart:782
TEST=none

Review URL: http://codereview.chromium.org//8879053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2311 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 14:11:47 +00:00
sgjesse@google.com 8f1b82458f Improve the event handling for string input stream
1. The string input stream now calls the data or line handler if there
   is still data available after returning from the data or line
   handler. These callbacks are scheduled on the event loop.

2. The reading of data is now throtteld so that calls to read or
   readLine will not eagerly try to read from the wrapped input
   stream. After each call to read the data handler is installed if
   no more buffered data is available. Also when the data handler
   is called the data handler on the wrapped input stream is
   un-installed if no more data is required for the current data or
   line handler.

One side effect of this change is that just reading from an input
stream obtained from a file is no longer possible. One will have to
set up a data handler callback of some kind before any calls to read
will return data. We can of cause change this to allow synchronous
usage of an input stream obtained from a file (maybe with an optional
argument to openInputStream).

Fixed a related throtteling issue with the chunked input stream.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8885032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2310 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 14:08:47 +00:00
ager@google.com 64ca753193 Split File into File and RandomAccessFile.
Update all users of the API.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8883017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2272 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 19:37:17 +00:00
ager@google.com 422ab9a7cf Make the write end of the interrupt pipe in the eventhandler blocking on mac and linux.
The messages written are small control messages that we do want to succeed now.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8890009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2246 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 13:44:06 +00:00
sgjesse@google.com a2b669273a Only schedule one data callback at the time for chunked input stream
R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8839012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2228 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 08:38:11 +00:00
hausner@google.com 9159389495 First bits of external debugger API
The debugger API is in a separate set of files. Embedders do not have
to include the debug api if they don't need to.
Review URL: http://codereview.chromium.org//8826007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2198 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-07 22:13:49 +00:00