Go to the source code of this file.
◆ API_TIMELINE_BEGIN_END
#define API_TIMELINE_BEGIN_END |
( |
|
thread | ) |
|
◆ API_TIMELINE_DURATION
#define API_TIMELINE_DURATION |
( |
|
thread | ) |
|
◆ ASSERT_CALLBACK_STATE
#define ASSERT_CALLBACK_STATE |
( |
|
thread | ) |
ASSERT(thread->no_callback_scope_depth() == 0) |
◆ CHECK_API_SCOPE
#define CHECK_API_SCOPE |
( |
|
thread | ) |
|
Value: do { \
Thread* tmpT = (thread); \
Isolate* tmpI = tmpT == nullptr ? nullptr : tmpT->isolate(); \
CHECK_ISOLATE(tmpI); \
if (tmpT->api_top_scope() == nullptr) { \
FATAL( \
"%s expects to find a current scope. Did you forget to call " \
"Dart_EnterScope?", \
} \
} while (0);
Definition at line 64 of file dart_api_impl.h.
65 { \
66 Thread* tmpT = (thread); \
67 Isolate* tmpI = tmpT == nullptr ? nullptr : tmpT->isolate(); \
68 CHECK_ISOLATE(tmpI); \
69 if (tmpT->api_top_scope() == nullptr) { \
70 FATAL( \
71 "%s expects to find a current scope. Did you forget to call " \
72 "Dart_EnterScope?", \
74 } \
75 } while (0);
◆ CHECK_CALLBACK_STATE
#define CHECK_CALLBACK_STATE |
( |
|
thread | ) |
|
Value: if (thread->no_callback_scope_depth() != 0) { \
return reinterpret_cast<Dart_Handle>(Api::NoCallbacksError()); \
} \
if (thread->is_unwind_in_progress()) { \
return reinterpret_cast<Dart_Handle>(Api::UnwindInProgressError()); \
}
struct _Dart_Handle * Dart_Handle
Definition at line 344 of file dart_api_impl.h.
345 { \
346 return reinterpret_cast<Dart_Handle>(Api::NoCallbacksError()); \
347 } \
348 if (thread->is_unwind_in_progress()) { \
349 return reinterpret_cast<Dart_Handle>(Api::UnwindInProgressError()); \
350 }
◆ CHECK_ISOLATE
#define CHECK_ISOLATE |
( |
|
isolate | ) |
|
Value: do { \
if ((isolate) == nullptr) { \
FATAL( \
"%s expects there to be a current isolate. Did you " \
"forget to call Dart_CreateIsolateGroup or Dart_EnterIsolate?", \
} \
} while (0)
Definition at line 42 of file dart_api_impl.h.
43 { \
44 if ((isolate) == nullptr) { \
45 FATAL( \
46 "%s expects there to be a current isolate. Did you " \
47 "forget to call Dart_CreateIsolateGroup or Dart_EnterIsolate?", \
49 } \
50 } while (0)
◆ CHECK_ISOLATE_GROUP
#define CHECK_ISOLATE_GROUP |
( |
|
isolate_group | ) |
|
Value: do { \
if ((isolate_group) == nullptr) { \
FATAL( \
"%s expects there to be a current isolate group. Did you " \
"forget to call Dart_CreateIsolateGroup or Dart_EnterIsolate?", \
} \
} while (0)
Definition at line 31 of file dart_api_impl.h.
32 { \
33 if ((isolate_group) == nullptr) { \
34 FATAL( \
35 "%s expects there to be a current isolate group. Did you " \
36 "forget to call Dart_CreateIsolateGroup or Dart_EnterIsolate?", \
38 } \
39 } while (0)
◆ CHECK_LENGTH
#define CHECK_LENGTH |
( |
|
length, |
|
|
|
max_elements |
|
) |
| |
Value: do { \
intptr_t
max = (max_elements); \
if (len < 0 || len >
max) { \
return Api::NewError( \
"%s expects argument '%s' to be in the range [0..%" Pd "].", \
} \
} while (0)
static float max(float r, float g, float b)
Definition at line 106 of file dart_api_impl.h.
107 { \
109 intptr_t
max = (max_elements); \
110 if (len < 0 || len >
max) { \
111 return Api::NewError( \
112 "%s expects argument '%s' to be in the range [0..%" Pd "].", \
114 } \
115 } while (0)
◆ CHECK_NO_ISOLATE
#define CHECK_NO_ISOLATE |
( |
|
isolate | ) |
|
Value: do { \
if ((isolate) != nullptr) { \
FATAL( \
"%s expects there to be no current isolate. Did you " \
"forget to call Dart_ExitIsolate?", \
} \
} while (0)
Definition at line 53 of file dart_api_impl.h.
54 { \
55 if ((isolate) != nullptr) { \
56 FATAL( \
57 "%s expects there to be no current isolate. Did you " \
58 "forget to call Dart_ExitIsolate?", \
60 } \
61 } while (0)
◆ CHECK_NULL
#define CHECK_NULL |
( |
|
parameter | ) |
|
Value: if (parameter == nullptr) { \
RETURN_NULL_ERROR(parameter); \
}
Definition at line 101 of file dart_api_impl.h.
102 { \
103 RETURN_NULL_ERROR(parameter); \
104 }
◆ CURRENT_FUNC
#define CURRENT_FUNC CanonicalFunction(__FUNCTION__) |
◆ DARTSCOPE
#define DARTSCOPE |
( |
|
thread | ) |
|
Value:
TransitionNativeToVM transition(
T); \
Definition at line 77 of file dart_api_impl.h.
◆ DECLARE_UNWRAP
◆ END_NO_CALLBACK_SCOPE
#define END_NO_CALLBACK_SCOPE |
( |
|
thread | ) |
|
Value: do { \
thread->DecrementNoCallbackScopeDepth(); \
if (thread->no_callback_scope_depth() == 0) { \
thread->heap()->CheckExternalGC(thread); \
} \
} while (false)
Definition at line 336 of file dart_api_impl.h.
337 { \
338 thread->DecrementNoCallbackScopeDepth(); \
339 if (thread->no_callback_scope_depth() == 0) { \
340 thread->heap()->CheckExternalGC(thread); \
341 } \
342 } while (false)
◆ RETURN_NULL_ERROR
#define RETURN_NULL_ERROR |
( |
|
parameter | ) |
|
Value: return Api::NewError("%s expects argument '%s' to be non-null.", \
Definition at line 97 of file dart_api_impl.h.
◆ RETURN_TYPE_ERROR
#define RETURN_TYPE_ERROR |
( |
|
zone, |
|
|
|
dart_handle, |
|
|
|
type |
|
) |
| |
Value: do { \
const Object& tmp = \
Object::Handle(zone, Api::UnwrapHandle((dart_handle))); \
if (tmp.IsNull()) { \
return Api::NewArgumentError("%s expects argument '%s' to be non-null.", \
} else if (tmp.IsError()) { \
return dart_handle; \
} \
return Api::NewArgumentError("%s expects argument '%s' to be of type %s.", \
} while (0)
Definition at line 83 of file dart_api_impl.h.
84 { \
85 const Object& tmp = \
86 Object::Handle(zone, Api::UnwrapHandle((dart_handle))); \
87 if (tmp.IsNull()) { \
88 return Api::NewArgumentError("%s expects argument '%s' to be non-null.", \
90 } else if (tmp.IsError()) { \
91 return dart_handle; \
92 } \
93 return Api::NewArgumentError("%s expects argument '%s' to be of type %s.", \
95 } while (0)
◆ START_NO_CALLBACK_SCOPE
#define START_NO_CALLBACK_SCOPE |
( |
|
thread | ) |
thread->IncrementNoCallbackScopeDepth() |