cvsuser     03/11/27 11:43:25

  Modified:    languages/perl6 ChangeLog perl6
               languages/perl6/P6C Addcontext.pm IMCC.pm Parser.pm Tree.pm
               languages/perl6/P6C/IMCC Binop.pm hype.pm
               languages/perl6/t/compiler basic.t globals.t hyper.t qsort.t
  Log:
  Patch #24559, Allison Randal:
        - update vector operators from ^+ to >>+<<
        - update XOR operator from ~~ to ^^
  
  Revision  Changes    Path
  1.38      +7 -0      parrot/languages/perl6/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/ChangeLog,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -w -r1.37 -r1.38
  --- ChangeLog 19 Aug 2003 15:44:06 -0000      1.37
  +++ ChangeLog 27 Nov 2003 19:43:17 -0000      1.38
  @@ -1,3 +1,10 @@
  +2003-11-27
  +     * Patch #24559 (Allison Randal)
  +             - update vector operators
  +     * Test Failures (failed before patch):
  +             - t/rx/basic.t    1   256     7    1  14.29%  4
  +             - t/rx/call.t     1   256     2    1  50.00%  2
  +             
   2002-07-??    (Parrot 0.0.7)
   
        * Initial CVS revision, modified from "V.00I_0I" on
  
  
  
  1.38      +1 -1      parrot/languages/perl6/perl6
  
  Index: perl6
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/perl6,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -w -r1.37 -r1.38
  --- perl6     31 Oct 2003 11:08:18 -0000      1.37
  +++ perl6     27 Nov 2003 19:43:17 -0000      1.38
  @@ -77,7 +77,7 @@
       -h|--help        Print this message and exit
       --help-(imcc|parrot|test|parser|global|output)
                        Print detailed help for one subpart
  -    -v|--verbose     Print mesages about compile stages (repeat for
  +    -v|--verbose     Print messages about compile stages (repeat for
                            more verbosity)
       -V|--version     Print versions and exit
       -w|--warnings    Print warnings (repeat for more warnings)
  
  
  
  1.21      +2 -1      parrot/languages/perl6/P6C/Addcontext.pm
  
  Index: Addcontext.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/Addcontext.pm,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -r1.20 -r1.21
  --- Addcontext.pm     13 Oct 2003 17:00:40 -0000      1.20
  +++ Addcontext.pm     27 Nov 2003 19:43:20 -0000      1.21
  @@ -52,7 +52,7 @@
         # propagate values in their surrounding context (even though
         # they may evaluate in boolean context?).  So we can't quite
         # do this:
  -#     bool => [ qw(&& ~~ ||) ],
  +#     bool => [ qw(&& ^^ ||) ],
        );
   
       while (my ($t, $ops) = each %opmap) {
  @@ -91,6 +91,7 @@
       my ($x, $ctx) = @_;
       my $op = $x->op;
   
  +    # Checking for stray assignment operators: "+=" or ">>+=<<".
       if ((ref($op) && $op->isa('P6C::hype') && $op->op =~ /^([^=]+)=$/)
        || $op =~ /^([^=]+)=$/) {
        # Turn this into a normal, non-inplace operator and try again.
  
  
  
  1.30      +17 -15    parrot/languages/perl6/P6C/IMCC.pm
  
  Index: IMCC.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC.pm,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -w -r1.29 -r1.30
  --- IMCC.pm   3 Nov 2003 15:05:17 -0000       1.29
  +++ IMCC.pm   27 Nov 2003 19:43:20 -0000      1.30
  @@ -1347,7 +1347,7 @@
       my $ltmp = $x->l->val;
       my $rtmp = $x->r->val;
       my $dest = newtmp 'PerlUndef';
  -    my $op = $x->op;
  +    my $op = imcc_op($x->op);
       code("\t$dest = $ltmp $op $rtmp\n");
       return $dest;
   }
  @@ -1401,7 +1401,7 @@
    '=' => \&do_assign,
    '||'        => \&do_logor,
    '&&'        => \&do_logand,
  - '~~'        => \&simple_binary,
  + '^^'        => \&simple_binary,
    '//'        => \&do_defined,
    ',' => \&do_array,
    'x' => \&do_repeat,
  @@ -1413,39 +1413,41 @@
   
   use vars '%op_is_array';
   BEGIN {
  -    my @arrayops = qw(= .. x // ~~ && || _);
  +    my @arrayops = qw(= .. x // ^^ && || _);
       push(@arrayops, ',');
       @[EMAIL PROTECTED] = (1) x @arrayops;
   }
   
   sub val {
       my $x = shift;
  +
       if (ref($x->op) eq 'P6C::hype') {
  +     check_assign_op($x->op->op);
        return do_hyped($x->op->op, $x->l, $x->r);
       }
  +
       my $ret;
       my $op = $x->op;
       if ($ops{$op}) {
        $ret = $ops{$op}->($x);
  -    } elsif($op =~ /^([^=]+)=$/ && $ops{$1}) {
  -     # XXX:
  -     die "Internal error -- assignment op `$op' snuck into IMCC.pm";
  -
  -     # Translate assignment operation into a binary operation.
  -     # XXX: Context propagation is broken for these, so we won't
  -     # ever do this.
  -     $op = $1;
  -     $ret = $ops{'='}->(new P6C::Binop op => '=', l => $x->l,
  -                        r => P6C::Binop->new(op => $op, l => $x->l,
  -                                             r => $x->r));
       } else {
  -     unimp $op;
  +     check_assign_op($op);
  +     unimp "Unimplemented operator $op";
       }
   
       if (!$op_is_array{$op}) {
        return scalar_in_context($ret, $x->{ctx});
       }
       return $ret;
  +}
  +
  +sub check_assign_op {
  +    my $op = shift;
  +    if($op =~ /^([^=]+)=$/ && $ops{$1}) {
  +        # XXX: This should probably be checked at an earler stage.
  +        die "Internal error -- assignment op `$op' snuck into IMCC.pm";
  +    }
  +    return 1;
   }
   
   ######################################################################
  
  
  
  1.28      +25 -21    parrot/languages/perl6/P6C/Parser.pm
  
  Index: Parser.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/Parser.pm,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -w -r1.27 -r1.28
  --- Parser.pm 13 Oct 2003 17:00:41 -0000      1.27
  +++ Parser.pm 27 Nov 2003 19:43:20 -0000      1.28
  @@ -229,7 +229,8 @@
       use vars '$err_handler';
       use vars qw(%KEYWORDS %CLASSES %WANT);
       use vars qw($NAMEPART $COMPARE $CONTEXT $MULDIV $PREFIX $ADDSUB $INCR
  -             $LOG_OR $LOGOR $FILETEST $ASSIGN $HYPE $MATCH $BITSHIFT
  +             $LOG_OR $LOGOR $FILETEST $ASSIGN $VOPEN $VCLOSE $MATCH 
  +             $BITSHIFT $BITOR $BITAND
                $SOB $FLUSH $NUMPART $NUMBER $RXATOM $RXMETA $RXCHARCLASS
                $SPECIAL_DELIM
                $RXESCAPED $HEXCHAR $RXASSERTION);
  @@ -246,7 +247,8 @@
   # Regexen used in the parser:
   BEGIN {
       $SOB     = qr|$Parse::RecDescent::skip(?<![^\n\s]){|o;
  -    $HYPE    = qr/\^?/;
  +    $VOPEN   = qr/>>/;
  +    $VCLOSE  = qr/<</;
       $NAMEPART        = qr/[a-zA-Z_][\w_]*/;
       $COMPARE = qr{(?:cmp|eq|[gnl]e|[gl]t)\b|<=>|[<>=!]=|<|>};
       $CONTEXT = [EMAIL PROTECTED]&*_?]|\+(?!\+)};
  @@ -260,9 +262,11 @@
       $ADDSUB  = qr{[-+_]};
       $BITSHIFT        = qr{<<|>>};
       $LOG_OR  = qr{(?:x?or|err)\b};
  -    $LOGOR   = qr{\|\||~~|//};
  +    $LOGOR   = qr{\|\||\^\^|//};
  +    $BITOR   = qr{(?:\|(?!\|)|~(?!~))};
  +    $BITAND  = qr{&(?!&)};
       $FILETEST        = qr{-[rwxoRWXOezsfdlpSbctugkTBMAC]+\b};
  -    $ASSIGN  = qr{(?:!|:|//|&&?|\|\|?|~~?|<<|>>|$ADDSUB|$MULDIV|\*\*)?=};
  +    $ASSIGN  = qr{(?:!|:|//|&&?|\|\|?|~|\^\^|<<|>>|$ADDSUB|$MULDIV|\*\*)?=};
       # Used for flushing syntax errors
       $FLUSH   = qr/\w+|[^\s\w;}#'"]+/;
       $NUMPART = qr/(?!_)[\d_]+(?<!_)/;
  @@ -488,14 +492,14 @@
                | subscript(s)
   
   apply:                 <leftop: term apply_op apply_rhs>
  -apply_op:      /$HYPE\./o
  +apply_op:      /\.|$VOPEN\.$VCLOSE/o
   
   incr:                  incr_op <commit> apply
                | apply incr_op(?)
  -incr_op:       /$HYPE$INCR/o
  +incr_op:       /$INCR|$VOPEN$INCR$VCLOSE/o
   
   pow:           <leftop: incr pow_op prefix>
  -pow_op:                /$HYPE\*\*/o
  +pow_op:                /\*\*|$VOPEN\*\*$VCLOSE/o
   
   prefix:                filetest_op <commit> prefix
                | prefix_op <commit> prefix
  @@ -503,7 +507,7 @@
                | pow
   
   # prefix_op:   '!' | '~' | '\\' | /-(?![->])/
  -prefix_op:     /$HYPE$PREFIX/o
  +prefix_op:     /$PREFIX|$VOPEN$PREFIX$VCLOSE/o
   filetest_op:   /$FILETEST/o
   
   pair:                  namepart '=>' <commit> prefix
  @@ -512,36 +516,36 @@
                | prefix ('=>' prefix)(?)
   
   match:                 <leftop: maybe_pair match_op maybe_pair>
  -match_op:      /$HYPE$MATCH/o
  +match_op:      /$MATCH|$VOPEN$MATCH$VCLOSE/o
   
   muldiv:                <leftop: match muldiv_op match>
   # muldiv_op:   '*' | '/' | '%' | 'x'
  -muldiv_op:     /$HYPE$MULDIV/o
  +muldiv_op:     /$MULDIV|$VOPEN$MULDIV$VCLOSE/o
   
   addsub:                <leftop: muldiv addsub_op muldiv>
   # addsub_op:   '+' | '-' | '_'
  -addsub_op:     /$HYPE$ADDSUB/o
  +addsub_op:     /$ADDSUB|$VOPEN$ADDSUB$VCLOSE/o
   
   bitshift:      <leftop: addsub bitshift_op addsub>
  -bitshift_op:   /$HYPE$BITSHIFT/o
  +bitshift_op:   /$BITSHIFT|$VOPEN$BITSHIFT$VCLOSE/o
   
   compare:       <leftop: bitshift compare_op bitshift>
  -compare_op:    /$HYPE$COMPARE/o
  +compare_op:    /$COMPARE|$VOPEN$COMPARE$VCLOSE/o
   # compare_op:          '<=>' | '<=' | '==' | '>=' | '<' | '>' | '!='
   #            | 'eq' | 'ge' | 'ne' | 'le' | 'lt' | 'gt' | 'cmp'
   
   bitand:                <leftop: compare bitand_op compare>
  -bitand_op:     /$HYPE&(?!&)/o
  +bitand_op:     /$BITAND|$VOPEN$BITAND$VCLOSE/o
   
   bitor:                 <leftop: bitand bitor_op bitand>
  -bitor_op:      /$HYPE(?:\|(?!\|)|~(?!~))/o
  +bitor_op:      /$BITOR|$VOPEN$BITOR$VCLOSE/o
   
   logand:                <leftop: bitor logand_op bitor>
  -logand_op:     /$HYPE&&/o
  +logand_op:     /&&|$VOPEN&&$VCLOSE/o
   
   logor:                 <leftop: logand logor_op logand>
  -# logor_op:    '||' | '~~' | '//'
  -logor_op:      /$HYPE$LOGOR/o
  +# logor_op:    '||' | '^^' | '//'
  +logor_op:      /$LOGOR|$VOPEN$LOGOR$VCLOSE/o
   
   range:                 logor (range_op logor)(?)
   range_op:      '..'
  @@ -571,7 +575,7 @@
                | ternary
   assign_rhs:    assign_op scalar_expr
   
  -assign_op:     /$HYPE$ASSIGN/o
  +assign_op:     /$ASSIGN|$VOPEN$ASSIGN$VCLOSE/o
   # assign_op:   /[!:]?=/ <commit>
   #            | assignable_op <skip:''> '='
   # assignable_op:       '//'
  @@ -595,11 +599,11 @@
   adv_clause:    /:(?!:)/ comma['scalar_expr']
   
   log_AND:       <leftop: adverb log_AND_op adverb>
  -log_AND_op:    /${HYPE}and\b/o
  +log_AND_op:    /and\b|${VOPEN}and\b$VCLOSE/o
   
   log_OR:                <leftop: log_AND log_OR_op log_AND>
   # log_OR_op:   'or' | 'xor' | 'err'
  -log_OR_op:     /$HYPE$LOG_OR/o
  +log_OR_op:     /$LOG_OR|$VOPEN$LOG_OR$VCLOSE/o
   
   expr:                  log_OR
   
  
  
  
  1.25      +1 -1      parrot/languages/perl6/P6C/Tree.pm
  
  Index: Tree.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/Tree.pm,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -w -r1.24 -r1.25
  --- Tree.pm   13 Oct 2003 17:00:41 -0000      1.24
  +++ Tree.pm   27 Nov 2003 19:43:20 -0000      1.25
  @@ -124,7 +124,7 @@
   # Having a separate rule for hyping is too expensive.
   sub operator_tree {
       local $_ = shift->[1];
  -    if (/^\^(.+)/) {
  +    if (/^>>(.+)<</) {
        return new P6C::hype op => $1;
       }
       return $_;
  
  
  
  1.14      +11 -1     parrot/languages/perl6/P6C/IMCC/Binop.pm
  
  Index: Binop.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC/Binop.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -w -r1.13 -r1.14
  --- Binop.pm  12 Sep 2002 14:34:42 -0000      1.13
  +++ Binop.pm  27 Nov 2003 19:43:22 -0000      1.14
  @@ -10,7 +10,7 @@
   use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK);
   @ISA = qw(Exporter);
   @EXPORT_OK = qw(do_pow do_logand do_logor do_defined do_concat do_repeat
  -             do_range do_smartmatch);
  +             do_range do_smartmatch imcc_op);
   %EXPORT_TAGS = (all => [EMAIL PROTECTED]);
   
   sub do_pow ;
  @@ -27,6 +27,16 @@
   sub sm_hash_scalar ;
   sub sm_expr_num ;
   sub sm_expr_str ;
  +
  +# Remap operator names from P6 to IMCC.
  +sub imcc_op {
  +     my $op = shift;
  +
  +     return "~~" if ($op eq '^^');
  +     return "." if ($op eq '_');
  +
  +     return $op;
  +}
   
   1;
   
  
  
  
  1.5       +8 -6      parrot/languages/perl6/P6C/IMCC/hype.pm
  
  Index: hype.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC/hype.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- hype.pm   26 Sep 2002 13:38:21 -0000      1.4
  +++ hype.pm   27 Nov 2003 19:43:22 -0000      1.5
  @@ -9,6 +9,7 @@
   package P6C::IMCC::hype;
   use SelfLoader;
   use P6C::IMCC ':all';
  +use P6C::IMCC::Binop 'imcc_op';
   use P6C::Util qw(diag is_array_expr unimp);
   require Exporter;
   use vars qw(@ISA @EXPORT_OK);
  @@ -20,7 +21,7 @@
   
   use vars '%optype';
   BEGIN {
  -    my %opmap = (int => [ qw(>> << | & ~ ~~)],
  +    my %opmap = (int => [ qw(>> << | & ~ ^^)],
                 num => [ qw(+ - * / % **)],
                 str => [ qw(_) ]);
       while (my ($t, $ops) = each %opmap) {
  @@ -50,11 +51,12 @@
   sub simple_hyped {
       my ($op, $targ, $lindex, $rindex) = @_;
       my $optype = $optype{$op} or unimp "Can't hype $op yet";
  -    $op = '.' if $op eq '_'; # XXX: should handle this elsewhere.
  +    $op = imcc_op($op);      # XXX: should handle this elsewhere.
       my $ltmp = gentmp $optype;
       my $rtmp = gentmp $optype;
       my $dest = gentmp $optype;
       return <<END;
  +     # simple_hyped $op
        $ltmp = $lindex
        $rtmp = $rindex
        $dest = $ltmp $op $rtmp
  @@ -118,11 +120,11 @@
        return hype_scalar_array(@_);
       } else {
        diag "Tried to hyper-operate two scalars";
  -     return simple_binary(@_);
  +     return P6C::Binop::simple_binary(@_);
       }
   }
   
  -# @xs ^op $y
  +# @xs >>op<< $y
   sub hype_array_scalar {
       my ($op, $l, $r) = @_;
       my $lval = $l->val;
  @@ -141,7 +143,7 @@
       return $op->{ctx} ? array_in_context($dest, $op->{ctx}) : $dest;
   }
   
  -# $x ^op @ys
  +# $x >>op<< @ys
   sub hype_scalar_array {
       my ($op, $l, $r) = @_;
       my $lval = $l->val;
  @@ -160,7 +162,7 @@
       return $op->{ctx} ? array_in_context($dest, $op->{ctx}) : $dest;
   }
   
  -# @xs ^op @ys
  +# @xs >>op<< @ys
   #
   # Currently iterates over the number of elements in the _shorter_ of
   # the two arrays, rather than the longer.  This is useful for working
  
  
  
  1.2       +6 -6      parrot/languages/perl6/t/compiler/basic.t
  
  Index: basic.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/basic.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- basic.t   13 Oct 2003 17:00:57 -0000      1.1
  +++ basic.t   27 Nov 2003 19:43:25 -0000      1.2
  @@ -133,10 +133,10 @@
       print1(2 && 0);
       print1(0 && 2);
       print1(0 && 0);
  -    print1(2 ~~ 3);
  -    print1(2 ~~ 0);
  -    print1(0 ~~ 2);
  -    print1(0 ~~ 0);
  +    print1(2 ^^ 3);
  +    print1(2 ^^ 0);
  +    print1(0 ^^ 2);
  +    print1(0 ^^ 0);
       my $x;
       print1($x // 0);
       print1(0  // $x);
  @@ -154,8 +154,8 @@
   
   
   0
  -1
  -1
  +2
  +2
   0
   0
   0
  
  
  
  1.2       +1 -1      parrot/languages/perl6/t/compiler/globals.t
  
  Index: globals.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/globals.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- globals.t 13 Oct 2003 17:00:57 -0000      1.1
  +++ globals.t 27 Nov 2003 19:43:25 -0000      1.2
  @@ -6,7 +6,7 @@
   ##############################
   output_is(<<'CODE', <<'OUT', "globals");
   sub foo() {
  -    print $x, " is ", @xs ^_ ' ', "\n";
  +    print $x, " is ", @xs >>_<< ' ', "\n";
       $y = 0;
       for @xs { $y = $y + $_ }
   }
  
  
  
  1.3       +34 -34    parrot/languages/perl6/t/compiler/hyper.t
  
  Index: hyper.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/hyper.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- hyper.t   1 Nov 2003 12:07:09 -0000       1.2
  +++ hyper.t   27 Nov 2003 19:43:25 -0000      1.3
  @@ -13,13 +13,13 @@
       my @x = (3,4);
       my @b = (5,6);
       my $i = 2;
  -    parray @a ^* @x ^+ @b;
  -    parray $i ^* @x ^+ @b;
  -    parray @a  * @x ^+ @b;
  -    parray 2 * 3 ^+ @b;
  -#    print1(@a ^* @x  + @b); # Array math not in 0.0.7
  +    parray @a >>*<< @x >>+<< @b;
  +    parray $i >>*<< @x >>+<< @b;
  +    parray @a  * @x >>+<< @b;
  +    parray 2 * 3 >>+<< @b;
  +#    print1(@a >>*<< @x  + @b); # Array math not in 0.0.7
   # IMCC clobbers too many registers with this:
  -#     @y = @a ^<< @a;
  +#     @y = @a >><<<< @a;
   #     print1('(' _ @y[0] _ ', ' _ @y[1] _ ')');
   }
   CODE
  @@ -35,7 +35,7 @@
       my $a = 2.1;
       my @x = 1..1000;
       my @b = 1001..2000;
  -    my @c = $a ^* @x ^+ @b;
  +    my @c = $a >>*<< @x >>+<< @b;
       print1(@c[0]);
       print1(@c[9]);
       print1(@c[99]);
  @@ -61,11 +61,11 @@
       parray(@c);
       @c = @a || @b;
       parray(@c);
  -    @c = @a ^&& @b;
  +    @c = @a >>&&<< @b;
       parray(@c);
  -    @c = @a ^|| @b;
  +    @c = @a >>||<< @b;
       parray(@c);
  -    @c = @a ^~~ @b;
  +    @c = @a >>^^<< @b;
       parray(@c);
   }
   CODE
  @@ -81,18 +81,18 @@
   sub main () {
       my @a = (1..3);
       my @b = (4..9);
  -    my @c = @a ^+ @b;
  -    print @c ^_ ' ',"x\n";
  -    @c = @b ^+ @a;
  -    print @c ^_ ' ',"x\n";
  -    @b = @b ^+ @a;
  -    print @b ^_ ' ',"x\n";
  +    my @c = @a >>+<< @b;
  +    print @c >>_<< ' ',"x\n";
  +    @c = @b >>+<< @a;
  +    print @c >>_<< ' ',"x\n";
  +    @b = @b >>+<< @a;
  +    print @b >>_<< ' ',"x\n";
       @b = (4..9);
  -    @b ^+= @a;
  -    print @b ^_ ' ',"x\n";
  +    @b >>+=<< @a;
  +    print @b >>_<< ' ',"x\n";
       @b = (4..9);
  -    @a ^+= @b;
  -    print @a ^_ ' ',"x\n";
  +    @a >>+=<< @b;
  +    print @a >>_<< ' ',"x\n";
   }
   CODE
   5 7 9 7 8 9 x
  @@ -108,31 +108,31 @@
   my @b = 5..6;
   my @c;
   @c = @a;
  [EMAIL PROTECTED] ^+= @b;
  -print @c ^_ ' ',"x\n";
  [EMAIL PROTECTED] >>+=<< @b;
  +print @c >>_<< ' ',"x\n";
   @c = @b;
  [EMAIL PROTECTED] ^+= @a;
  -print @c ^_ ' ',"x\n";
  [EMAIL PROTECTED] >>+=<< @a;
  +print @c >>_<< ' ',"x\n";
   
   @c = @a;
  [EMAIL PROTECTED] ^*= @b;
  -print @c ^_ ' ',"x\n";
  [EMAIL PROTECTED] >>*=<< @b;
  +print @c >>_<< ' ',"x\n";
   
   @c = @a;
  [EMAIL PROTECTED] ^**= @b;
  -print @c ^_ ' ',"x\n";
  [EMAIL PROTECTED] >>**=<< @b;
  +print @c >>_<< ' ',"x\n";
   
   @c = @a;
  [EMAIL PROTECTED] ^/= @b;
  -print @c ^_ ' ',"x\n";
  [EMAIL PROTECTED] >>/=<< @b;
  +print @c >>_<< ' ',"x\n";
   
   @c = @b;
  [EMAIL PROTECTED] ^%= @a;
  -print @c ^_ ' ',"x\n";
  [EMAIL PROTECTED] >>%=<< @a;
  +print @c >>_<< ' ',"x\n";
   
   @c = @b;
  [EMAIL PROTECTED] ^-= @a;
  -print @c ^_ ' ',"x\n";
  [EMAIL PROTECTED] >>-=<< @a;
  +print @c >>_<< ' ',"x\n";
   CODE
   /7 9 4 x
   7 9 4 x
  
  
  
  1.2       +2 -2      parrot/languages/perl6/t/compiler/qsort.t
  
  Index: qsort.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/qsort.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- qsort.t   21 Jul 2002 16:09:27 -0000      1.1
  +++ qsort.t   27 Nov 2003 19:43:25 -0000      1.2
  @@ -27,10 +27,10 @@
   sub main() {
       my @a = 1..10;
       qsort @a, 0, @a - 1;
  -    print @a ^_ "\n";
  +    print @a >>_<< "\n";
       @a = (10,9,8,7,6,5,4,3,2,1);
       qsort @a, 0, @a - 1;
  -    print @a ^_ "\n";
  +    print @a >>_<< "\n";
   }
   CODE
   10
  
  
  

Reply via email to