OLD | NEW |
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 // On success, returns a RawInstance. On failure, a RawError. | 161 // On success, returns a RawInstance. On failure, a RawError. |
162 static RawObject* Equals(const Instance& left, const Instance& right); | 162 static RawObject* Equals(const Instance& left, const Instance& right); |
163 | 163 |
164 // Returns the receive port if it is in the port map and null otherwise. | 164 // Returns the receive port if it is in the port map and null otherwise. |
165 // On failure, a RawError. | 165 // On failure, a RawError. |
166 static RawObject* LookupReceivePort(Dart_Port port_id); | 166 static RawObject* LookupReceivePort(Dart_Port port_id); |
167 | 167 |
168 // Returns null on success, a RawError on failure. | 168 // Returns null on success, a RawError on failure. |
169 static RawObject* HandleMessage(const Object& receive_port, | 169 static RawObject* HandleMessage(const Object& receive_port, |
170 Dart_Port reply_port_id, | |
171 const Instance& dart_message); | 170 const Instance& dart_message); |
172 | 171 |
173 // On success returns new SendPort, on failure returns a RawError. | 172 // On success returns new SendPort, on failure returns a RawError. |
174 static RawObject* NewSendPort(intptr_t port_id); | 173 static RawObject* NewSendPort(intptr_t port_id); |
175 | 174 |
176 // map[key] = value; | 175 // map[key] = value; |
177 // | 176 // |
178 // Returns null on success, a RawError on failure. | 177 // Returns null on success, a RawError on failure. |
179 static RawObject* MapSetAt(const Instance& map, | 178 static RawObject* MapSetAt(const Instance& map, |
180 const Instance& key, | 179 const Instance& key, |
181 const Instance& value); | 180 const Instance& value); |
182 | 181 |
183 // Gets the _id field of a SendPort/ReceivePort. | 182 // Gets the _id field of a SendPort/ReceivePort. |
184 // | 183 // |
185 // Returns the value of _id on success, a RawError on failure. | 184 // Returns the value of _id on success, a RawError on failure. |
186 static RawObject* PortGetId(const Instance& port); | 185 static RawObject* PortGetId(const Instance& port); |
187 }; | 186 }; |
188 | 187 |
189 } // namespace dart | 188 } // namespace dart |
190 | 189 |
191 #endif // VM_DART_ENTRY_H_ | 190 #endif // VM_DART_ENTRY_H_ |
OLD | NEW |