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

Side by Side Diff: runtime/vm/dart_entry.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/isolate_patch.dart ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_DART_ENTRY_H_ 5 #ifndef VM_DART_ENTRY_H_
6 #define VM_DART_ENTRY_H_ 6 #define VM_DART_ENTRY_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 static RawObject* ExceptionCreate(const Library& library, 146 static RawObject* ExceptionCreate(const Library& library,
147 const String& exception_name, 147 const String& exception_name,
148 const Array& arguments); 148 const Array& arguments);
149 149
150 // On success, returns a RawInstance. On failure, a RawError. 150 // On success, returns a RawInstance. On failure, a RawError.
151 static RawObject* ToString(const Instance& receiver); 151 static RawObject* ToString(const Instance& receiver);
152 152
153 // On success, returns a RawInstance. On failure, a RawError. 153 // On success, returns a RawInstance. On failure, a RawError.
154 static RawObject* Equals(const Instance& left, const Instance& right); 154 static RawObject* Equals(const Instance& left, const Instance& right);
155 155
156 // Returns the receive port if it is in the port map and null otherwise.
157 // On failure, a RawError.
158 static RawObject* LookupReceivePort(Dart_Port port_id);
159
160 // Returns null on success, a RawError on failure. 156 // Returns null on success, a RawError on failure.
161 static RawObject* HandleMessage(const Object& receive_port, 157 static RawObject* HandleMessage(Dart_Port dest_port_id,
162 Dart_Port reply_port_id, 158 Dart_Port reply_port_id,
163 const Instance& dart_message); 159 const Instance& dart_message);
164 160
165 // On success returns new SendPort, on failure returns a RawError. 161 // On success returns new SendPort, on failure returns a RawError.
166 static RawObject* NewSendPort(intptr_t port_id); 162 static RawObject* NewSendPort(intptr_t port_id);
167 163
168 // map[key] = value; 164 // map[key] = value;
169 // 165 //
170 // Returns null on success, a RawError on failure. 166 // Returns null on success, a RawError on failure.
171 static RawObject* MapSetAt(const Instance& map, 167 static RawObject* MapSetAt(const Instance& map,
172 const Instance& key, 168 const Instance& key,
173 const Instance& value); 169 const Instance& value);
174 170
175 // Gets the _id field of a SendPort/ReceivePort. 171 // Gets the _id field of a SendPort/ReceivePort.
176 // 172 //
177 // Returns the value of _id on success, a RawError on failure. 173 // Returns the value of _id on success, a RawError on failure.
178 static RawObject* PortGetId(const Instance& port); 174 static RawObject* PortGetId(const Instance& port);
179 }; 175 };
180 176
181 } // namespace dart 177 } // namespace dart
182 178
183 #endif // VM_DART_ENTRY_H_ 179 #endif // VM_DART_ENTRY_H_
OLDNEW
« no previous file with comments | « runtime/lib/isolate_patch.dart ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698