Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Toss Int ~~ Num hack; from now on, use Int ~~ Numeric. Good to excise…
… this one before R* so people don't write code assuming it. :-)
  • Loading branch information
jnthn committed Jul 20, 2010
1 parent f49e91b commit 3139735
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/builtins/Num.pir
Expand Up @@ -17,11 +17,6 @@ Num - Perl 6 numbers
p6meta = get_hll_global ['Mu'], '$!P6META'
numproto = p6meta.'new_class'('Num', 'parent'=>'parrot;Float Cool')

# Override the proto's ACCEPT method so we also accept Ints.
.const 'Sub' $P0 = "Num::ACCEPTS"
$P1 = typeof numproto
$P1.'add_method'('ACCEPTS', $P0)

# Map Parrot Float to Rakudo Num
$P0 = getinterp
$P1 = get_class ['Float']
Expand All @@ -30,22 +25,6 @@ Num - Perl 6 numbers
.end


.sub 'Num::ACCEPTS' :anon :method
.param pmc topic

## first, try our superclass .ACCEPTS
$P0 = get_hll_global 'Any'
$P1 = find_method $P0, 'ACCEPTS'
$I0 = self.$P1(topic)
unless $I0 goto try_int
.return ($I0)

try_int:
$P0 = get_hll_global 'Int'
$I0 = $P0.'ACCEPTS'(topic)
.return ($I0)
.end

=item succ and pred

Increment and Decrement Methods
Expand Down

0 comments on commit 3139735

Please sign in to comment.