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/native_arguments.h" | 9 #include "vm/native_arguments.h" |
10 #include "vm/object.h" | 10 #include "vm/object.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 Dart_Handle object); | 135 Dart_Handle object); |
136 CLASS_LIST_FOR_HANDLES(DECLARE_UNWRAP) | 136 CLASS_LIST_FOR_HANDLES(DECLARE_UNWRAP) |
137 #undef DECLARE_UNWRAP | 137 #undef DECLARE_UNWRAP |
138 | 138 |
139 // Unwraps the raw object from the handle using a reused handle. | 139 // Unwraps the raw object from the handle using a reused handle. |
140 static const String& UnwrapStringHandle( | 140 static const String& UnwrapStringHandle( |
141 const ReusableObjectHandleScope& reused, Dart_Handle object); | 141 const ReusableObjectHandleScope& reused, Dart_Handle object); |
142 static const Instance& UnwrapInstanceHandle( | 142 static const Instance& UnwrapInstanceHandle( |
143 const ReusableObjectHandleScope& reused, Dart_Handle object); | 143 const ReusableObjectHandleScope& reused, Dart_Handle object); |
144 | 144 |
145 // Returns an Error handle if isolate is in an inconsistent state. | 145 // Returns an Error handle if isolate is in an inconsistent state |
| 146 // or there was an error while finalizing classes. |
146 // Returns a Success handle when no error condition exists. | 147 // Returns a Success handle when no error condition exists. |
147 static Dart_Handle CheckIsolateState(Isolate *isolate); | 148 static Dart_Handle CheckAndFinalizePendingClasses(Isolate *isolate); |
148 | 149 |
149 // Casts the internal Isolate* type to the external Dart_Isolate type. | 150 // Casts the internal Isolate* type to the external Dart_Isolate type. |
150 static Dart_Isolate CastIsolate(Isolate* isolate); | 151 static Dart_Isolate CastIsolate(Isolate* isolate); |
151 | 152 |
152 // Gets the handle used to designate successful return. | 153 // Gets the handle used to designate successful return. |
153 static Dart_Handle Success() { return Api::True(); } | 154 static Dart_Handle Success() { return Api::True(); } |
154 | 155 |
155 // Sets up the acquired error object after initializing an Isolate. This | 156 // Sets up the acquired error object after initializing an Isolate. This |
156 // object is pre-created because we will not be able to allocate this | 157 // object is pre-created because we will not be able to allocate this |
157 // object when the error actually occurs. When the error occurs there will | 158 // object when the error actually occurs. When the error occurs there will |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 if (isolate->no_callback_scope_depth() != 0) { \ | 308 if (isolate->no_callback_scope_depth() != 0) { \ |
308 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ | 309 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ |
309 } \ | 310 } \ |
310 | 311 |
311 #define ASSERT_CALLBACK_STATE(isolate) \ | 312 #define ASSERT_CALLBACK_STATE(isolate) \ |
312 ASSERT(isolate->no_callback_scope_depth() == 0) | 313 ASSERT(isolate->no_callback_scope_depth() == 0) |
313 | 314 |
314 } // namespace dart. | 315 } // namespace dart. |
315 | 316 |
316 #endif // VM_DART_API_IMPL_H_ | 317 #endif // VM_DART_API_IMPL_H_ |
OLD | NEW |