~ubuntu-branches/ubuntu/precise/rakudo/precise

« back to all changes in this revision

Viewing changes to src/cheats/relops.pir

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghedini
  • Date: 2011-05-17 11:31:09 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517113109-rmfir654u1axbpt4
Tags: 0.1~2011.04-1
* New upstream release (Closes: #601862, #585762, #577502)
* New maintainer
* Switch to 3.0 (quilt) format
* Update dependencies (Closes: #584498)
* Update debian/copyright to lastest DEP5 revision
* Do not generate/install perl6 manpage (now done by the build system)
* Enable tests
* Bump Standards-Version to 3.9.2 (no changes needed)
* Do not install extra LICENSE files and duplicated docs
* Remove debian/clean (no more needed)
* Add Vcs-* fields in debian/control
* Rewrite (short) description
* Update upstream copyright years
* Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## $Id$
 
2
 
 
3
=head1 NAME
 
4
 
 
5
src/cheats/cmp.pir - Perl6 comparison builtins
 
6
 
 
7
=head1 Functions
 
8
 
 
9
=over 4
 
10
 
 
11
=cut
 
12
 
 
13
.namespace []
 
14
 
 
15
.sub '&infix:<===>' :multi(_,_)
 
16
    .param pmc a
 
17
    .param pmc b
 
18
    $I0 = '!have_exact_same_type'(a, b)
 
19
    unless $I0 goto false
 
20
    $P0 = a.'WHICH'()
 
21
    $P1 = b.'WHICH'()
 
22
    .tailcall '&infix:<===>'($P0, $P1)
 
23
  false:
 
24
    $P0 = get_hll_global [ 'Bool' ], 'False'
 
25
    .return ($P0)
 
26
.end
 
27
 
 
28
 
 
29
.sub '&infix:<!===>' :multi(_,_)
 
30
    .param pmc a
 
31
    .param pmc b
 
32
    $P0 = '&infix:<===>'(a, b)
 
33
    $P1 = not $P0
 
34
    .return ($P1)
 
35
    # .tailcall '&prefix:!'($P0)
 
36
.end
 
37
 
 
38
 
 
39
.sub '&infix:<=:=>' :multi(_,_)
 
40
    .param pmc a
 
41
    .param pmc b
 
42
    $I0 = issame a, b
 
43
    unless $I0 goto false
 
44
    $P0 = get_hll_global [ 'Bool' ], 'True'
 
45
    goto done
 
46
  false:
 
47
    $P0 = get_hll_global [ 'Bool' ], 'False'
 
48
  done:
 
49
    .return ($P0)
 
50
.end
 
51
 
 
52
 
 
53
.sub '&infix:<!=:=>' :multi(_,_)
 
54
    .param pmc a
 
55
    .param pmc b
 
56
    $P0 = '&infix:<=:=>'(a, b)
 
57
    .tailcall '&prefix:!'($P0)
 
58
.end
 
59
 
 
60
 
 
61
=back
 
62
 
 
63
=cut
 
64
 
 
65
# Local Variables:
 
66
#   mode: pir
 
67
#   fill-column: 100
 
68
# End:
 
69
# vim: expandtab shiftwidth=4 ft=pir: