Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Unified Diff: runtime/lib/isolate_patch.dart

Issue 11642048: Revert "Optimize the message queue for many active ports with few messages." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/dart_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate_patch.dart
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index c359783109598bdd471999919f4a53d5929e01ab..d2938255f019cf30802d60799759ee0fd5d7613c 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -35,7 +35,6 @@ class _ReceivePortImpl implements ReceivePort {
}
return new _ReceivePortImpl._internal(id);
}
-
_ReceivePortImpl._internal(int id) : _id = id {
if (_portMap == null) {
_portMap = new Map();
@@ -43,15 +42,10 @@ class _ReceivePortImpl implements ReceivePort {
_portMap[id] = this;
}
- // Called from the VM to retrieve the ReceivePort for a message.
- static _ReceivePortImpl _lookupReceivePort(int id) {
- assert(_portMap != null);
- return _portMap[id];
- }
-
// Called from the VM to dispatch to the handler.
- static void _handleMessage(_ReceivePortImpl port, int replyId, var message) {
- assert(port != null);
+ static void _handleMessage(int id, int replyId, var message) {
+ assert(_portMap != null);
+ ReceivePort port = _portMap[id];
SendPort replyTo = (replyId == 0) ? null : new _SendPortImpl(replyId);
(port._onMessage)(message, replyTo);
}
« no previous file with comments | « no previous file | runtime/vm/dart_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698