develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35243 - branches/rvar2/languages/perl6/src/builtins

From:
pmichaud
Date:
January 8, 2009 21:39
Subject:
[svn:parrot] r35243 - branches/rvar2/languages/perl6/src/builtins
Message ID:
20090109053928.4DAF4CB9F9@x12.develooper.com
Author: pmichaud
Date: Thu Jan  8 21:39:27 2009
New Revision: 35243

Modified:
   branches/rvar2/languages/perl6/src/builtins/guts.pir

Log:
[rakudo]:  Converting Role methods to PERL6MULTISUB requires extra work.


Modified: branches/rvar2/languages/perl6/src/builtins/guts.pir
==============================================================================
--- branches/rvar2/languages/perl6/src/builtins/guts.pir	(original)
+++ branches/rvar2/languages/perl6/src/builtins/guts.pir	Thu Jan  8 21:39:27 2009
@@ -321,9 +321,13 @@
     # also add it back to the class.
     .local pmc class
     class = get_class namespace
-    if null class goto no_class
+    if null class goto class_done
     class.'remove_method'(name)
-  no_class:
+    $I0 = isa class, 'Class'
+    if $I0 goto class_done
+    ##  class isn't really a Class, it's (likely) a Role
+    class.'add_method'(name, p6multi)
+  class_done:
 
     # Make new namespace entry.
     namespace[name] = p6multi



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About