| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 | 152 |
| 153 // Utility functions to call from VM into Dart bootstrap libraries. | 153 // Utility functions to call from VM into Dart bootstrap libraries. |
| 154 // Each may return an exception object. | 154 // Each may return an exception object. |
| 155 class DartLibraryCalls : public AllStatic { | 155 class DartLibraryCalls : public AllStatic { |
| 156 public: | 156 public: |
| 157 // On success, returns a RawInstance. On failure, a RawError. | 157 // On success, returns a RawInstance. On failure, a RawError. |
| 158 static RawObject* ExceptionCreate(const Library& library, | 158 static RawObject* ExceptionCreate(const Library& library, |
| 159 const String& exception_name, | 159 const String& exception_name, |
| 160 const String& constructor_name, |
| 160 const Array& arguments); | 161 const Array& arguments); |
| 161 | 162 |
| 162 // On success, returns a RawInstance. On failure, a RawError. | 163 // On success, returns a RawInstance. On failure, a RawError. |
| 163 static RawObject* ToString(const Instance& receiver); | 164 static RawObject* ToString(const Instance& receiver); |
| 164 | 165 |
| 165 // On success, returns a RawInstance. On failure, a RawError. | 166 // On success, returns a RawInstance. On failure, a RawError. |
| 166 static RawObject* Equals(const Instance& left, const Instance& right); | 167 static RawObject* Equals(const Instance& left, const Instance& right); |
| 167 | 168 |
| 168 // Returns the receive port if it is in the port map and null otherwise. | 169 // Returns the receive port if it is in the port map and null otherwise. |
| 169 // On failure, a RawError. | 170 // On failure, a RawError. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 186 | 187 |
| 187 // Gets the _id field of a SendPort/ReceivePort. | 188 // Gets the _id field of a SendPort/ReceivePort. |
| 188 // | 189 // |
| 189 // Returns the value of _id on success, a RawError on failure. | 190 // Returns the value of _id on success, a RawError on failure. |
| 190 static RawObject* PortGetId(const Instance& port); | 191 static RawObject* PortGetId(const Instance& port); |
| 191 }; | 192 }; |
| 192 | 193 |
| 193 } // namespace dart | 194 } // namespace dart |
| 194 | 195 |
| 195 #endif // VM_DART_ENTRY_H_ | 196 #endif // VM_DART_ENTRY_H_ |
| OLD | NEW |