* class.c: reduce size of ridiculously large cache.
-2010-02-26 Martin Baulig <martin@ximian.com>
-
- * class-internals.h (MonoVTable): Added `init_aborted'.
-
- * object.c
- (mono_runtime_class_init_full): Set `vtable->init_aborted' in
- addition to `vtable->init_failed' if we hit a `ThreadAbortException'
- while running the class .cctor and reset `init_failed' next time
- we're called.
-
2010-02-26 Martin Baulig <martin@ximian.com>
* mono-debug.h
guint remote : 1; /* class is remotely activated */
guint initialized : 1; /* cctor has been run */
guint init_failed : 1; /* cctor execution failed */
- guint init_aborted : 1; /* cctor execution aborted */
guint32 imt_collisions_bitmap;
MonoRuntimeGenericContext *runtime_generic_context;
/* do not add any fields after vtable, the structure is dynamically extended */
mono_type_initialization_unlock ();
return NULL;
}
- if (vtable->init_aborted) {
- /*
- * The current thread was aborting while running the .cctor the last time,
- * so let's try again.
- *
- * The Mono Debugger calls Thread.Abort() on the current thread to abort a
- * method call (after an expression evaluation timeout, for instance).
- */
- vtable->init_aborted = 0;
- vtable->init_failed = 0;
- }
if (vtable->init_failed) {
mono_type_initialization_unlock ();
exc_to_throw = mono_get_exception_type_initialization (full_name, exc);
g_free (full_name);
- if (exc) {
- MonoClass *exc_klass = exc->object.vtable->klass;
-
- if (exc_klass->image == mono_defaults.corlib &&
- !strcmp (exc_klass->name_space, "System.Threading") &&
- !strcmp (exc_klass->name, "ThreadAbortException")) {
- /*
- * Set `init_aborted' in addition to `init_failed' if the
- * current thread was aborted while running the .cctor.
- */
- vtable->init_aborted = 1;
- }
- }
-
/*
* Store the exception object so it could be thrown on subsequent
* accesses.