| 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_API_IMPL_H_ | 5 #ifndef VM_DART_API_IMPL_H_ |
| 6 #define VM_DART_API_IMPL_H_ | 6 #define VM_DART_API_IMPL_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 #undef DECLARE_UNWRAP | 85 #undef DECLARE_UNWRAP |
| 86 | 86 |
| 87 // Validates and converts the passed in handle as a local handle. | 87 // Validates and converts the passed in handle as a local handle. |
| 88 static LocalHandle* UnwrapAsLocalHandle(const ApiState& state, | 88 static LocalHandle* UnwrapAsLocalHandle(const ApiState& state, |
| 89 Dart_Handle object); | 89 Dart_Handle object); |
| 90 | 90 |
| 91 // Validates and converts the passed in handle as a persistent handle. | 91 // Validates and converts the passed in handle as a persistent handle. |
| 92 static PersistentHandle* UnwrapAsPersistentHandle(const ApiState& state, | 92 static PersistentHandle* UnwrapAsPersistentHandle(const ApiState& state, |
| 93 Dart_Handle object); | 93 Dart_Handle object); |
| 94 | 94 |
| 95 // Cast the internal Isolate* type to the external Dart_Isolate type. | 95 // Casts the internal Isolate* type to the external Dart_Isolate type. |
| 96 static Dart_Isolate CastIsolate(Isolate* isolate); | 96 static Dart_Isolate CastIsolate(Isolate* isolate); |
| 97 | 97 |
| 98 // Cast a message byte array to the external Dart_Message type. | 98 // Casts a message byte array to the external Dart_Message type. |
| 99 static Dart_Message CastMessage(uint8_t* message); | 99 static Dart_Message CastMessage(uint8_t* message); |
| 100 | 100 |
| 101 // Gets the handle used to designate successful return. | 101 // Gets the handle used to designate successful return. |
| 102 static Dart_Handle Success(); | 102 static Dart_Handle Success(); |
| 103 | 103 |
| 104 // Generates a handle used to designate an error return. | 104 // Generates a handle used to designate an error return. |
| 105 static Dart_Handle Error(const char* format, ...); | 105 static Dart_Handle Error(const char* format, ...); |
| 106 | 106 |
| 107 // Generates an error handle from an unhandled exception. | 107 // Generates an error handle from an unhandled exception. |
| 108 static Dart_Handle ErrorFromException(const Object& obj); | 108 static Dart_Handle ErrorFromException(const Object& obj); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 119 // Allocates space in the local zone. | 119 // Allocates space in the local zone. |
| 120 static uword Allocate(intptr_t size); | 120 static uword Allocate(intptr_t size); |
| 121 | 121 |
| 122 // Reallocates space in the local zone. | 122 // Reallocates space in the local zone. |
| 123 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); | 123 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace dart. | 126 } // namespace dart. |
| 127 | 127 |
| 128 #endif // VM_DART_API_IMPL_H_ | 128 #endif // VM_DART_API_IMPL_H_ |
| OLD | NEW |