| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 static Dart_Handle NewHandle(Isolate* isolate, RawObject* raw); | 74 static Dart_Handle NewHandle(Isolate* isolate, RawObject* raw); |
| 75 | 75 |
| 76 // Unwraps the raw object from the handle. | 76 // Unwraps the raw object from the handle. |
| 77 static RawObject* UnwrapHandle(Dart_Handle object); | 77 static RawObject* UnwrapHandle(Dart_Handle object); |
| 78 | 78 |
| 79 // Unwraps a raw Type from the handle. The handle will be null if | 79 // Unwraps a raw Type from the handle. The handle will be null if |
| 80 // the object was not of the requested Type. | 80 // the object was not of the requested Type. |
| 81 #define DECLARE_UNWRAP(Type) \ | 81 #define DECLARE_UNWRAP(Type) \ |
| 82 static const Type& Unwrap##Type##Handle(Isolate* isolate, \ | 82 static const Type& Unwrap##Type##Handle(Isolate* isolate, \ |
| 83 Dart_Handle object); | 83 Dart_Handle object); |
| 84 CLASS_LIST_NO_OBJECT(DECLARE_UNWRAP) | 84 CLASS_LIST_FOR_HANDLES(DECLARE_UNWRAP) |
| 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 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 } | 171 } |
| 172 private: | 172 private: |
| 173 Isolate* saved_isolate_; | 173 Isolate* saved_isolate_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(IsolateSaver); | 175 DISALLOW_COPY_AND_ASSIGN(IsolateSaver); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 } // namespace dart. | 178 } // namespace dart. |
| 179 | 179 |
| 180 #endif // VM_DART_API_IMPL_H_ | 180 #endif // VM_DART_API_IMPL_H_ |
| OLD | NEW |