Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move prefix:<~> into setting.
  • Loading branch information
pmichaud committed Aug 28, 2009
1 parent d0b88cf commit 586076e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build/gen_whatever_pir.pl
Expand Up @@ -9,7 +9,7 @@
infix:% infix:div infix:mod
infix:== infix:!= infix:< infix:> infix:<= infix:>= infix:<=>
infix:.. infix:^.. infix:..^ infix:^..^
prefix:+ prefix:~ prefix:? prefix:! prefix:^
prefix:+ prefix:? prefix:! prefix:^
);

for (@ops) {
Expand Down
8 changes: 0 additions & 8 deletions src/builtins/op.pir
Expand Up @@ -122,14 +122,6 @@ src/builtins/op.pir - Perl 6 builtin operators
.end


.sub 'prefix:~' :multi(_)
.param string a
$P0 = new ['Str']
$P0 = a
.return ($P0)
.end


.sub 'prefix:?' :multi(_)
.param pmc a
if a goto a_true
Expand Down
7 changes: 0 additions & 7 deletions src/classes/Multi.pir
Expand Up @@ -36,13 +36,6 @@ Multi - Perl 6 multi-dispatch routine
.end


.namespace []

.sub 'prefix:~' :multi('MultiSub')
.param pmc multi
.tailcall multi.'name'()
.end

=back

=cut
Expand Down
13 changes: 13 additions & 0 deletions src/setting/Operators.pm
Expand Up @@ -222,4 +222,17 @@ multi sub prefix:<->(Int $a) {
}
}
multi sub prefix:<~>(Object $a) {
Q:PIR {
$P0 = find_lex '$a'
$S0 = $P0
%r = new ['Str']
assign %r, $S0
}
}
multi sub prefix:<~>(Multi $a) { $a.name }

# vim: ft=perl6
5 changes: 5 additions & 0 deletions src/setting/Whatever.pm
Expand Up @@ -67,4 +67,9 @@ multi sub prefix:<->(Whatever $a)
multi sub prefix:<->(WhateverCode $a)
{ WhateverCodeX('prefix:-', $a) }

multi sub prefix:<~>(Whatever $a)
{ WhateverCodeX('prefix:~', $a) }
multi sub prefix:<~>(WhateverCode $a)
{ WhateverCodeX('prefix:~', $a) }

# vim: ft=perl6

0 comments on commit 586076e

Please sign in to comment.