* exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
case.
* tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
trampolines taking a method argument.
svn path=/trunk/mono/; revision=82446
2007-07-22 Zoltan Varga <vargaz@gmail.com>
+ * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
+ case.
+
+ * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
+ trampolines taking a method argument.
+
* mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
* mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
new_ctx->esp = (*lmf)->esp;
/* Pop arguments off the stack */
- {
+ /* FIXME: Handle the delegate case too ((*lmf)->method == NULL) */
+ if ((*lmf)->method) {
MonoMethod *method = (*lmf)->method;
MonoJitArgumentInfo *arg_info = g_newa (MonoJitArgumentInfo, mono_method_signature (method)->param_count + 1);
pushed_args ++;
/* save method info */
- x86_push_membase (buf, X86_ESP, pushed_args * sizeof (gpointer));
+ if ((tramp_type == MONO_TRAMPOLINE_GENERIC) || (tramp_type == MONO_TRAMPOLINE_JUMP))
+ x86_push_membase (buf, X86_ESP, pushed_args * sizeof (gpointer));
+ else
+ x86_push_imm (buf, 0);
pushed_args++;