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

[svn:parrot] r35339 - in trunk/languages/perl6/src: classes parser

From:
pmichaud
Date:
January 10, 2009 07:18
Subject:
[svn:parrot] r35339 - in trunk/languages/perl6/src: classes parser
Message ID:
20090110151809.E69F5CB9F9@x12.develooper.com
Author: pmichaud
Date: Sat Jan 10 07:18:08 2009
New Revision: 35339

Modified:
   trunk/languages/perl6/src/classes/Array.pir
   trunk/languages/perl6/src/classes/List.pir
   trunk/languages/perl6/src/classes/Mapping.pir
   trunk/languages/perl6/src/classes/Object.pir
   trunk/languages/perl6/src/parser/actions.pm

Log:
[rakudo]:  Migrate to use Perl6Scalar instead of ObjectRef for true scalars.


Modified: trunk/languages/perl6/src/classes/Array.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Array.pir	(original)
+++ trunk/languages/perl6/src/classes/Array.pir	Sat Jan 10 07:18:08 2009
@@ -211,6 +211,7 @@
 
 =cut
 
+.namespace ['Perl6Array']
 .sub 'Array' :method
     .return (self)
 .end

Modified: trunk/languages/perl6/src/classes/List.pir
==============================================================================
--- trunk/languages/perl6/src/classes/List.pir	(original)
+++ trunk/languages/perl6/src/classes/List.pir	Sat Jan 10 07:18:08 2009
@@ -153,13 +153,13 @@
 
 =item Scalar
 
-A list in Scalar context becomes an Array ObjectRef.
+A list in Scalar context becomes a Scalar containing an Array.
 
 =cut
 
 .sub 'Scalar' :method
     $P0 = self.'Array'()
-    $P0 = new 'ObjectRef', $P0
+    $P0 = new 'Perl6Scalar', $P0
     .return ($P0)
 .end
 

Modified: trunk/languages/perl6/src/classes/Mapping.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Mapping.pir	(original)
+++ trunk/languages/perl6/src/classes/Mapping.pir	Sat Jan 10 07:18:08 2009
@@ -279,7 +279,7 @@
 .namespace ['Mapping']
 .sub 'Scalar' :method
     $P0 = self.'Hash'()
-    $P0 = new 'ObjectRef', $P0
+    $P0 = new 'Perl6Scalar', $P0
     .return ($P0)
 .end
 

Modified: trunk/languages/perl6/src/classes/Object.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Object.pir	(original)
+++ trunk/languages/perl6/src/classes/Object.pir	Sat Jan 10 07:18:08 2009
@@ -235,11 +235,11 @@
 
 .namespace ['Perl6Object']
 .sub 'Scalar' :method
-    $I0 = isa self, 'ObjectRef'
+    $I0 = isa self, 'Perl6Scalar'
     unless $I0 goto not_ref
     .return (self)
   not_ref:
-    $P0 = new 'ObjectRef', self
+    $P0 = new 'Perl6Scalar', self
     .return ($P0)
 .end
 

Modified: trunk/languages/perl6/src/parser/actions.pm
==============================================================================
--- trunk/languages/perl6/src/parser/actions.pm	(original)
+++ trunk/languages/perl6/src/parser/actions.pm	Sat Jan 10 07:18:08 2009
@@ -2524,9 +2524,9 @@
 
 
 sub container_itype($sigil) {
-    if    $sigil eq '@' { return 'Perl6Array' }
-    elsif $sigil eq '%' { return 'Perl6Hash'  }
-    else                { return 'ObjectRef'  }
+    if    $sigil eq '@' { return 'Perl6Array'  }
+    elsif $sigil eq '%' { return 'Perl6Hash'   }
+    else                { return 'Perl6Scalar' }
 }
 
 



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