Author: jonathan Date: Mon Jan 12 08:31:23 2009 New Revision: 35443 Modified: trunk/languages/perl6/src/builtins/guts.pir
Log: [rakudo] Fix role composition regression from rvar branch merge; methods in the class now resolve conflicts again. Modified: trunk/languages/perl6/src/builtins/guts.pir ============================================================================== --- trunk/languages/perl6/src/builtins/guts.pir (original) +++ trunk/languages/perl6/src/builtins/guts.pir Mon Jan 12 08:31:23 2009 @@ -387,6 +387,7 @@ metaclass = newclass ns $P0 = box type setprop metaclass, 'pkgtype', $P0 + '!set_resolves_list'(metaclass) .return (metaclass) is_also: metaclass = get_class ns @@ -662,6 +663,28 @@ .end +=item !set_resolves_list(class) + +Gets all the methods that the class has and adds them to the resolves list. + +=cut + +.sub '!set_resolves_list' + .param pmc class + .local pmc meths, it, res_list + meths = class.'methods'() + it = iter meths + res_list = new 'ResizableStringArray' + it_loop: + unless it goto it_loop_end + $S0 = shift it + push res_list, $S0 + goto it_loop + it_loop_end: + class.'resolve_method'(res_list) +.end + + =item !compose_role_attributes(class, role) Helper method to compose the attributes of a role into a class.