Skip to content

Commit

Permalink
Allow storing managed pointers into 'native int' in the JIT, fsharp g…
Browse files Browse the repository at this point in the history
…enerates code without a conv.i. Fixes #688008.
  • Loading branch information
vargaz committed Apr 19, 2011
1 parent 5964d70 commit 175d826
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1935,7 +1935,11 @@ target_type_is_incompatible (MonoCompile *cfg, MonoType *target, MonoInst *arg)
case MONO_TYPE_I:
case MONO_TYPE_U:
case MONO_TYPE_FNPTR:
if (arg->type != STACK_I4 && arg->type != STACK_PTR)
/*
* Some opcodes like ldloca returns 'transient pointers' which can be stored in
* in native int. (#688008).
*/
if (arg->type != STACK_I4 && arg->type != STACK_PTR && arg->type != STACK_MP)
return 1;
return 0;
case MONO_TYPE_CLASS:
Expand Down

0 comments on commit 175d826

Please sign in to comment.