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

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

From:
pmichaud
Date:
January 11, 2009 10:07
Subject:
[svn:parrot] r35421 - trunk/languages/perl6/src/classes
Message ID:
20090111180653.89F61CB9F9@x12.develooper.com
Author: pmichaud
Date: Sun Jan 11 10:06:52 2009
New Revision: 35421

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

Log:
[rakudo]:  $v ~~ NaN tests for NaN-ness (RT #61942).


Modified: trunk/languages/perl6/src/classes/Num.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Num.pir	(original)
+++ trunk/languages/perl6/src/classes/Num.pir	Sun Jan 11 10:06:52 2009
@@ -51,7 +51,13 @@
 
 .sub 'ACCEPTS' :method
     .param num topic
+    $S0 = self
+    if $S0 == 'nan' goto test_nan
     .tailcall 'infix:=='(topic, self)
+  test_nan:
+    $S0 = topic
+    $I0 = iseq $S0, 'nan'
+    .tailcall 'prefix:?'($I0)
 .end
 
 



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