/* catch */
clause->flags = MONO_EXCEPTION_CLAUSE_NONE;
clause->try_len = mono_mb_get_pos (mb) - clause->try_offset;
- clause->data.catch_class = mono_class_from_name (mono_defaults.corlib,
+ clause->data.catch_class = mono_class_load_from_name (mono_defaults.corlib,
"System", "OverflowException");
- g_assert (clause->data.catch_class);
clause->handler_offset = mono_mb_get_label (mb);
- oom_exc_class = mono_class_from_name (mono_defaults.corlib,
+ oom_exc_class = mono_class_load_from_name (mono_defaults.corlib,
"System", "OutOfMemoryException");
- g_assert (oom_exc_class);
ctor = mono_class_get_method_from_name (oom_exc_class, ".ctor", 0);
g_assert (ctor);
info->d.alloc.gc_name = "sgen";
info->d.alloc.alloc_type = atype;
- res = mono_mb_create (mb, csig, 8, info);
- mono_mb_free (mb);
#ifndef DISABLE_JIT
- mono_method_get_header (res)->init_locals = FALSE;
+ mb->init_locals = FALSE;
#endif
+ res = mono_mb_create (mb, csig, 8, info);
+ mono_mb_free (mb);
+
return res;
}