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

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

From:
jonathan
Date:
January 12, 2009 09:49
Subject:
[svn:parrot] r35445 - trunk/languages/perl6/src/classes
Message ID:
20090112174857.EB913CB9F9@x12.develooper.com
Author: jonathan
Date: Mon Jan 12 09:48:57 2009
New Revision: 35445

Modified:
   trunk/languages/perl6/src/classes/Bool.pir
   trunk/languages/perl6/src/classes/Order.pir

Log:
[rakudo] Mark Bool and Order as enums, so they are seen as types during the parse.

Modified: trunk/languages/perl6/src/classes/Bool.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Bool.pir	(original)
+++ trunk/languages/perl6/src/classes/Bool.pir	Mon Jan 12 09:48:57 2009
@@ -31,6 +31,11 @@
     $P0 = boolproto.'new'()
     $P0 = 1
     set_hll_global ['Bool'], 'True', $P0
+
+    # Mark as enum elements.
+    $P0 = class $P0
+    $P1 = box 1
+    setprop $P0, 'enum', $P1
 .end
 
 

Modified: trunk/languages/perl6/src/classes/Order.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Order.pir	(original)
+++ trunk/languages/perl6/src/classes/Order.pir	Mon Jan 12 09:48:57 2009
@@ -33,6 +33,10 @@
     $P0 = -1
     set_hll_global ['Order'], 'Increase', $P0
 
+    # Mark as enum elements.
+    $P0 = class $P0
+    $P1 = box 1
+    setprop $P0, 'enum', $P1
 .end
 
 



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