| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 CHECK_ISOLATE(tmpI); \ | 50 CHECK_ISOLATE(tmpI); \ |
| 51 if (tmpT->api_top_scope() == NULL) { \ | 51 if (tmpT->api_top_scope() == NULL) { \ |
| 52 FATAL1("%s expects to find a current scope. Did you forget to call " \ | 52 FATAL1("%s expects to find a current scope. Did you forget to call " \ |
| 53 "Dart_EnterScope?", CURRENT_FUNC); \ | 53 "Dart_EnterScope?", CURRENT_FUNC); \ |
| 54 } \ | 54 } \ |
| 55 } while (0); \ | 55 } while (0); \ |
| 56 | 56 |
| 57 #define DARTSCOPE(thread) \ | 57 #define DARTSCOPE(thread) \ |
| 58 Thread* T = (thread); \ | 58 Thread* T = (thread); \ |
| 59 CHECK_API_SCOPE(T); \ | 59 CHECK_API_SCOPE(T); \ |
| 60 TransitionNativeToVM trainsition(T); \ | 60 TransitionNativeToVM transition(T); \ |
| 61 HANDLESCOPE(T); | 61 HANDLESCOPE(T); |
| 62 | 62 |
| 63 | 63 |
| 64 #define RETURN_TYPE_ERROR(zone, dart_handle, type) \ | 64 #define RETURN_TYPE_ERROR(zone, dart_handle, type) \ |
| 65 do { \ | 65 do { \ |
| 66 const Object& tmp = \ | 66 const Object& tmp = \ |
| 67 Object::Handle(zone, Api::UnwrapHandle((dart_handle))); \ | 67 Object::Handle(zone, Api::UnwrapHandle((dart_handle))); \ |
| 68 if (tmp.IsNull()) { \ | 68 if (tmp.IsNull()) { \ |
| 69 return Api::NewError("%s expects argument '%s' to be non-null.", \ | 69 return Api::NewError("%s expects argument '%s' to be non-null.", \ |
| 70 CURRENT_FUNC, #dart_handle); \ | 70 CURRENT_FUNC, #dart_handle); \ |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 return Api::NewError("%s: Cannot load after Dart_Precompile", \ | 297 return Api::NewError("%s: Cannot load after Dart_Precompile", \ |
| 298 CURRENT_FUNC); \ | 298 CURRENT_FUNC); \ |
| 299 } \ | 299 } \ |
| 300 | 300 |
| 301 #define ASSERT_CALLBACK_STATE(thread) \ | 301 #define ASSERT_CALLBACK_STATE(thread) \ |
| 302 ASSERT(thread->no_callback_scope_depth() == 0) | 302 ASSERT(thread->no_callback_scope_depth() == 0) |
| 303 | 303 |
| 304 } // namespace dart. | 304 } // namespace dart. |
| 305 | 305 |
| 306 #endif // VM_DART_API_IMPL_H_ | 306 #endif // VM_DART_API_IMPL_H_ |
| OLD | NEW |