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

[svn:parrot] r35189 - branches/rvar2/languages/perl6/src/classes

From:
pmichaud
Date:
January 7, 2009 21:13
Subject:
[svn:parrot] r35189 - branches/rvar2/languages/perl6/src/classes
Message ID:
20090108051336.3EF4CCB9F9@x12.develooper.com
Author: pmichaud
Date: Wed Jan  7 21:13:35 2009
New Revision: 35189

Modified:
   branches/rvar2/languages/perl6/src/classes/Pair.pir

Log:
[rakudo]:  Restore => to build Pairs like it did before.
This might not be correct semantics; clarification request
sent to p6l.


Modified: branches/rvar2/languages/perl6/src/classes/Pair.pir
==============================================================================
--- branches/rvar2/languages/perl6/src/classes/Pair.pir	(original)
+++ branches/rvar2/languages/perl6/src/classes/Pair.pir	Wed Jan  7 21:13:35 2009
@@ -153,8 +153,12 @@
     .param pmc value
     key = key.'item'()
     value = value.'item'()
-    $P0 = get_hll_global 'Pair'
-    .tailcall $P0.'new'('key'=>key, 'value'=>value)
+    $P0 = new ['Perl6Pair']
+    $P1 = new ['ObjectRef']
+    'infix:='($P1, key)
+    setattribute $P0, '$!key', $P1
+    setattribute $P0, '$!value', value
+    .return ($P0)
 .end
 
 



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