#endif
#define MONO_CHECK_ARG(arg, expr) G_STMT_START{ \
- if (!(expr)) \
+ if (G_UNLIKELY (!(expr))) \
{ \
MonoException *ex; \
char *msg = g_strdup_printf ("assertion `%s' failed", \
}; }G_STMT_END
#define MONO_CHECK_ARG_NULL(arg) G_STMT_START{ \
- if (arg == NULL) \
+ if (G_UNLIKELY (arg == NULL)) \
{ \
MonoException *ex; \
if (arg) {} /* check if the name exists */ \
#define mono_array_length_fast(array) ((array)->max_length)
#define mono_array_addr_with_size_fast(array,size,index) ( ((char*)(array)->vector) + (size) * (index) )
+#define mono_array_addr_fast(array,type,index) ((type*)(void*) mono_array_addr_with_size_fast (array, sizeof (type), index))
+#define mono_array_get_fast(array,type,index) ( *(type*)mono_array_addr_fast ((array), type, (index)) )
+#define mono_array_set_fast(array,type,index,value) \
+ do { \
+ type *__p = (type *) mono_array_addr_fast ((array), type, (index)); \
+ *__p = (value); \
+ } while (0)
+#define mono_array_setref_fast(array,index,value) \
+ do { \
+ void **__p = (void **) mono_array_addr_fast ((array), void*, (index)); \
+ mono_gc_wbarrier_set_arrayref ((array), __p, (MonoObject*)(value)); \
+ /* *__p = (value);*/ \
+ } while (0)
+#define mono_array_memcpy_refs_fast(dest,destidx,src,srcidx,count) \
+ do { \
+ void **__p = (void **) mono_array_addr_fast ((dest), void*, (destidx)); \
+ void **__s = mono_array_addr_fast ((src), void*, (srcidx)); \
+ mono_gc_wbarrier_arrayref_copy (__p, __s, (count)); \
+ } while (0)
+
+
typedef struct {
MonoObject obj;
MonoObject *identity;
gpointer android_tid;
gpointer thread_pinning_ref;
gint32 ignore_next_signal;
+ MonoMethod *async_invoke_method;
/*
* These fields are used to avoid having to increment corlib versions
* when a new field is added to this structure.
* Please synchronize any changes with InternalThread in Thread.cs, i.e. add the
* same field there.
*/
- gpointer unused0;
gpointer unused1;
gpointer unused2;
};
} MonoRuntimeCallbacks;
typedef gboolean (*MonoInternalStackWalk) (MonoStackFrameInfo *frame, MonoContext *ctx, gpointer data);
+typedef gboolean (*MonoInternalExceptionFrameWalk) (MonoMethod *method, gpointer ip, size_t native_offset, gboolean managed, gpointer user_data);
typedef struct {
void (*mono_walk_stack_with_ctx) (MonoInternalStackWalk func, MonoContext *ctx, MonoUnwindOptions options, void *user_data);
void (*mono_walk_stack_with_state) (MonoInternalStackWalk func, MonoThreadUnwindState *state, MonoUnwindOptions options, void *user_data);
void (*mono_raise_exception) (MonoException *ex);
void (*mono_raise_exception_with_ctx) (MonoException *ex, MonoContext *ctx);
+ gboolean (*mono_exception_walk_trace) (MonoException *ex, MonoInternalExceptionFrameWalk func, gpointer user_data);
gboolean (*mono_install_handler_block_guard) (MonoThreadUnwindState *unwind_state);
} MonoRuntimeExceptionHandlingCallbacks;
mono_message_init (MonoDomain *domain, MonoMethodMessage *this_obj,
MonoReflectionMethod *method, MonoArray *out_args) MONO_INTERNAL;
-MonoObject *
-mono_remoting_invoke (MonoObject *real_proxy, MonoMethodMessage *msg,
- MonoObject **exc, MonoArray **out_args) MONO_INTERNAL;
-
MonoObject *
mono_message_invoke (MonoObject *target, MonoMethodMessage *msg,
MonoObject **exc, MonoArray **out_args) MONO_INTERNAL;
void mono_reflection_create_unmanaged_type (MonoReflectionType *type) MONO_INTERNAL;
void mono_reflection_register_with_runtime (MonoReflectionType *type) MONO_INTERNAL;
-void mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArray **typed_args, MonoArray **named_args, CattrNamedArg **named_arg_info) MONO_INTERNAL;
+void mono_reflection_create_custom_attr_data_args (MonoImage *image, MonoMethod *method, const guchar *data, guint32 len, MonoArray **typed_args, MonoArray **named_args, CattrNamedArg **named_arg_info, MonoError *error) MONO_INTERNAL;
MonoMethodSignature * mono_reflection_lookup_signature (MonoImage *image, MonoMethod *method, guint32 token) MONO_INTERNAL;
MonoArray* mono_param_get_objects_internal (MonoDomain *domain, MonoMethod *method, MonoClass *refclass) MONO_INTERNAL;
gboolean
mono_array_calc_byte_len (MonoClass *class, uintptr_t len, uintptr_t *res) MONO_INTERNAL;
+#ifndef DISABLE_REMOTING
+MonoObject *
+mono_remoting_invoke (MonoObject *real_proxy, MonoMethodMessage *msg,
+ MonoObject **exc, MonoArray **out_args) MONO_INTERNAL;
+
gpointer
mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *real_proxy) MONO_INTERNAL;
void
mono_upgrade_remote_class (MonoDomain *domain, MonoObject *tproxy, MonoClass *klass) MONO_INTERNAL;
+#endif
gpointer
mono_create_ftnptr (MonoDomain *domain, gpointer addr) MONO_INTERNAL;
mono_field_static_get_value_for_thread (MonoInternalThread *thread, MonoVTable *vt, MonoClassField *field, void *value) MONO_INTERNAL;
/* exported, used by the debugger */
-void *
+MONO_API void *
mono_vtable_get_static_field_data (MonoVTable *vt);
char *
MonoString *
ves_icall_Mono_Runtime_GetNativeStackTrace (MonoException *exc) MONO_INTERNAL;
+char *
+mono_exception_get_managed_backtrace (MonoException *exc) MONO_INTERNAL;
+
#endif /* __MONO_OBJECT_INTERNALS_H__ */