==============
Added Dart_SetPostMessageCallback and Dart_SetClosePortCallback.
These allow the embedder to provide custom message/port behavior
for their application. The vm provides standard implementations
that work with the standard run loop.
Added Dart_HandleMessage, which processes one message on the
current isolate. Embedders can use this to write their own
message processing loops. Rewrote code to use this internally.
Added Isolate::StandardRunLoop() to share code between
Dart_RunLoop and lib/isolate.cc
Changed the interface to PortMap::PostMessage. PostMessage is
now agnostic to message delivery mechanism. Note that PortMap is
now out of the "ReceiveMessage" business entirely. Moved
MessageQueue and friends out to message_queue.cc/h.
Moved the monitor from the Isolate into the MessageQueue. No
need for outsiders to mess. Added MessageQueue::Wait. Moved
monitor locking from PortMap into MessageQueue itself, which was
easier for me to reason about. Wrote some tests.
Removed PortMessage::Handle. The code turned into Dart_HandleMessage.
Regularized the nomenclature around ports. Type is now always
Dart_Port instead of intptr_t. Variables end in _port instead of
_id. Use the term "dest" instead of "target" or "send".
Added a family of new tests to port_test.
Added EXPECT_NE to the test framework.
Review URL: http://codereview.chromium.org//8297004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@516 260f80e4-7a28-3924-810f-c04153c831b5
In the past, characters in C strings were assumed to encode themselves
and when converting Dart strings to C strings characters were narrowed
to 8-bit values.
With this change, C strings are assumed to be UTF-8 encoded.
Converting a C string to a Dart string applies UTF-8 decoding and
converting a Dart string to a C string applies UTF-8 encoding.
Also part of this change are new methods to construct uninitialized
string objects and to copy string data.
BUG=5343358
Review URL: https://chromereviews.googleplex.com/3557012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@169 260f80e4-7a28-3924-810f-c04153c831b5