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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 const Array& arguments, | 132 const Array& arguments, |
133 const Array& arguments_descriptor); | 133 const Array& arguments_descriptor); |
134 }; | 134 }; |
135 | 135 |
136 | 136 |
137 // Utility functions to call from VM into Dart bootstrap libraries. | 137 // Utility functions to call from VM into Dart bootstrap libraries. |
138 // Each may return an exception object. | 138 // Each may return an exception object. |
139 class DartLibraryCalls : public AllStatic { | 139 class DartLibraryCalls : public AllStatic { |
140 public: | 140 public: |
141 // On success, returns a RawInstance. On failure, a RawError. | 141 // On success, returns a RawInstance. On failure, a RawError. |
142 static RawObject* ExceptionCreate( | 142 static RawObject* ExceptionCreate(const Library& library, |
143 const Library& library, | 143 const String& exception_name, |
144 const String& exception_name, | 144 const Array& arguments); |
145 const GrowableArray<const Object*>& arguments); | |
146 | 145 |
147 // On success, returns a RawInstance. On failure, a RawError. | 146 // On success, returns a RawInstance. On failure, a RawError. |
148 static RawObject* ToString(const Instance& receiver); | 147 static RawObject* ToString(const Instance& receiver); |
149 | 148 |
150 // On success, returns a RawInstance. On failure, a RawError. | 149 // On success, returns a RawInstance. On failure, a RawError. |
151 static RawObject* Equals(const Instance& left, const Instance& right); | 150 static RawObject* Equals(const Instance& left, const Instance& right); |
152 | 151 |
153 // Returns null on success, a RawError on failure. | 152 // Returns null on success, a RawError on failure. |
154 static RawObject* HandleMessage(Dart_Port dest_port_id, | 153 static RawObject* HandleMessage(Dart_Port dest_port_id, |
155 Dart_Port reply_port_id, | 154 Dart_Port reply_port_id, |
(...skipping 11 matching lines...) Expand all Loading... |
167 | 166 |
168 // Gets the _id field of a SendPort/ReceivePort. | 167 // Gets the _id field of a SendPort/ReceivePort. |
169 // | 168 // |
170 // Returns the value of _id on success, a RawError on failure. | 169 // Returns the value of _id on success, a RawError on failure. |
171 static RawObject* PortGetId(const Instance& port); | 170 static RawObject* PortGetId(const Instance& port); |
172 }; | 171 }; |
173 | 172 |
174 } // namespace dart | 173 } // namespace dart |
175 | 174 |
176 #endif // VM_DART_ENTRY_H_ | 175 #endif // VM_DART_ENTRY_H_ |
OLD | NEW |