Browse files

Fix passage of method position in flags

The "pos" field of the method struct is meant to be passed into the
method encoded in bits 16-23 of "flags", but was only copied in for
calls that went to superobject lookup. Now put it in place for every
method found.
  • Loading branch information...
1 parent d94a55d commit 7626e13b57311f97fd8ed2bbafc2500edfca1e73 @mwh committed Aug 22, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 gracelib.c
View
3 gracelib.c
@@ -2535,7 +2535,6 @@ Method *findmethod(Object *selfp, Object *realselfp, const char *name,
if (m->flags & MFLAG_REALSELFALSO)
realself = uo->super;
callflags |= depth << 24;
- callflags |= (m->pos & 255) << 16;
break;
}
}
@@ -2545,6 +2544,8 @@ Method *findmethod(Object *selfp, Object *realselfp, const char *name,
}
}
}
+ if (m)
+ callflags |= (m->pos & 255) << 16;
*cflags = callflags;
*selfp = self;
*realselfp = realself;

0 comments on commit 7626e13

Please sign in to comment.