[macruby-changes] [754] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Sun Nov 23 20:50:30 PST 2008
Revision: 754
http://trac.macosforge.org/projects/ruby/changeset/754
Author: lsansonetti at apple.com
Date: 2008-11-23 20:50:29 -0800 (Sun, 23 Nov 2008)
Log Message:
-----------
fixing a regression when super'ing objc methods (thanks Satoshi-san for noticing it)
Modified Paths:
--------------
MacRuby/trunk/insns.def
MacRuby/trunk/objc.m
MacRuby/trunk/vm_insnhelper.c
Modified: MacRuby/trunk/insns.def
===================================================================
--- MacRuby/trunk/insns.def 2008-11-24 02:43:58 UTC (rev 753)
+++ MacRuby/trunk/insns.def 2008-11-24 04:50:29 UTC (rev 754)
@@ -1085,16 +1085,12 @@
VALUE recv, klass;
NODE *mn;
ID id;
- IMP imp;
SEL sel;
const VALUE flag = VM_CALL_SUPER_BIT | VM_CALL_FCALL_BIT;
recv = GET_SELF();
- mn = NULL; imp = NULL; sel = 0;
- vm_search_superclass(GET_CFP(), GET_ISEQ(), recv, TOPN(num), &id, &klass, &mn, &imp, &sel);
-#if !WITH_OBJC
- mn = rb_method_node(klass, id);
-#endif
+ vm_search_superclass(GET_CFP(), GET_ISEQ(), recv, TOPN(num), &id, &klass);
+ mn = rb_objc_method_node(klass, id, NULL, &sel);
#if WITH_OBJC
struct rb_method_cache mcache;
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2008-11-24 02:43:58 UTC (rev 753)
+++ MacRuby/trunk/objc.m 2008-11-24 04:50:29 UTC (rev 754)
@@ -1251,7 +1251,10 @@
id exception = nil;
//UNLOCK_GIL();
@try {
- if (klass == RCLASS_SUPER(*(Class *)ocrcv)) {
+ if (klass == *(VALUE *)ocrcv) {
+ ffi_ret = objc_msgSend(ocrcv, sel);
+ }
+ else {
struct objc_super s;
s.receiver = ocrcv;
#if defined(__LP64__)
@@ -1261,9 +1264,6 @@
#endif
ffi_ret = objc_msgSendSuper(&s, sel);
}
- else {
- ffi_ret = objc_msgSend(ocrcv, sel);
- }
}
@catch (id e) {
exception = e;
Modified: MacRuby/trunk/vm_insnhelper.c
===================================================================
--- MacRuby/trunk/vm_insnhelper.c 2008-11-24 02:43:58 UTC (rev 753)
+++ MacRuby/trunk/vm_insnhelper.c 2008-11-24 04:50:29 UTC (rev 754)
@@ -1436,6 +1436,7 @@
bool klass_located;
ary = rb_mod_ancestors_nocopy(CLASS_OF(recv));
+
count = RARRAY_LEN(ary);
k = klass;
for (i = 0, klass_located = false; i < count; i++) {
@@ -1496,7 +1497,7 @@
static void
vm_search_superclass(rb_control_frame_t *reg_cfp, rb_iseq_t *ip,
VALUE recv, VALUE sigval,
- ID *idp, VALUE *klassp, NODE **mnp, IMP *impp, SEL *selp)
+ ID *idp, VALUE *klassp)
{
ID id;
VALUE klass;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081123/4af8e139/attachment.html>
More information about the macruby-changes
mailing list