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

[svn:parrot] r35330 - trunk/languages/perl6/src/classes

From:
pmichaud
Date:
January 9, 2009 22:00
Subject:
[svn:parrot] r35330 - trunk/languages/perl6/src/classes
Message ID:
20090110060035.18386CB9F9@x12.develooper.com
Author: pmichaud
Date: Fri Jan  9 22:00:34 2009
New Revision: 35330

Modified:
   trunk/languages/perl6/src/classes/Object.pir

Log:
[rakudo]:  Update .PARROT method.


Modified: trunk/languages/perl6/src/classes/Object.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Object.pir	(original)
+++ trunk/languages/perl6/src/classes/Object.pir	Fri Jan  9 22:00:34 2009
@@ -416,11 +416,19 @@
     .local string result
     obj = self
     result = ''
+  deref_loop:
     $I0 = isa obj, 'ObjectRef'
-    unless $I0 goto have_obj
-    result = 'ObjectRef->'
+    unless $I0 goto deref_done
+    $I0 = isa obj, 'Perl6Scalar'
+    if $I0 goto deref_scalar
+    result .= 'ObjectRef->'
+    goto deref_next
+  deref_scalar:
+    result .= 'Perl6Scalar->'
+  deref_next:
     obj = deref obj
-  have_obj:
+    goto deref_loop
+  deref_done:
     $P0 = typeof obj
     $S0 = $P0
     result .= $S0



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