#199: fix handling of vtable methods
-------------------------+--------------------------------------------------
 Reporter:  whiteknight  |       Owner:  whiteknight
     Type:  todo         |      Status:  new        
 Priority:  normal       |   Milestone:  0.9.1      
Component:  imcc         |     Version:             
 Severity:  medium       |    Keywords:             
     Lang:               |       Patch:             
 Platform:  all          |  
-------------------------+--------------------------------------------------

Comment(by whiteknight):

 Okay, here's the scoop:

 1) I found how to fix this issue. The relevant code is in
 compilers/imcc/pcc.c:390. We need to add the condition "||
 (unit->is_vtable_method)" to that if statement, and this resolves the
 problem.
 2) However, the problem above breaks t/pmc/parrotobject.t, tests involving
 "invoke". The "invoke" override is broken internally and does not allow
 for a "self" parameter. When IMCC tries to unshift a "self" off the list
 of arguments, it comes up one argument short.

 We have a few tests for overriding "invoke", but none of them test the
 desired behavior (having access to "self" and therefore being able to do
 anything interesting besides printing out simple messages). However, when
 I fix behavior elsewhere these examples rightfully break.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/199#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to