cvsuser     03/12/19 01:01:36

  Modified:    languages/perl6/P6C Addcontext.pm IMCC.pm Parser.pm
               languages/perl6/P6C/IMCC Binop.pm hype.pm
               languages/perl6/P6C/Tree String.pm
               languages/perl6/examples qsort.p6
               languages/perl6/t/compiler aggregates.t basic.t call.t
                        exceptions.t for.t globals.t hyper.t qsort.t
                        string.t
  Log:
  This patch updates the following operators and their assignment
  counterparts:
  
  _ becomes ~ (concatenation)
  & becomes +& ~& (bitwise AND, numeric and string)
  | becomes +| ~| (bitwise OR, numeric and string)
  ~ becomes +^ ~^ (bitwise XOR, numeric and string)
  
  Unary +^ (bitwise negation, a.k.a. ones complement) is not implemented
  yet.
  
  Courtesy of Allison Randal
  
  Revision  Changes    Path
  1.22      +3 -3      parrot/languages/perl6/P6C/Addcontext.pm
  
  Index: Addcontext.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/Addcontext.pm,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -w -r1.21 -r1.22
  --- Addcontext.pm     27 Nov 2003 19:43:20 -0000      1.21
  +++ Addcontext.pm     19 Dec 2003 09:01:19 -0000      1.22
  @@ -40,13 +40,13 @@
       # type => [list-of-ops].
       my %opmap =
        ( # Ops that work differently for different scalar types:
  -      PerlUndef => [ qw(| & ~ // ..),
  +      PerlUndef => [ qw(| & +^ ~^ // ..),
          # Unfortunately, these work differently on ints and nums:
                        qw(+ - * / % **)],
   
         PerlInt => [ qw(<< >>) ],
   
  -      PerlString => [ qw(_) ],
  +      PerlString => [ qw(~) ],
   
         # NOTE: Actually, according to apo 3, boolean operators
         # propagate values in their surrounding context (even though
  @@ -900,7 +900,7 @@
                              @ PerlArray
                                 * PerlArray
                              $ PerlUndef
  -                           _ PerlString
  +                           ~ PerlString
                              ? bool
                              + PerlNum);
   }
  
  
  
  1.31      +8 -16     parrot/languages/perl6/P6C/IMCC.pm
  
  Index: IMCC.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/IMCC.pm,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -w -r1.30 -r1.31
  --- IMCC.pm   27 Nov 2003 19:43:20 -0000      1.30
  +++ IMCC.pm   19 Dec 2003 09:01:19 -0000      1.31
  @@ -1341,16 +1341,6 @@
   use P6C::Util ':all';
   use P6C::Context;
   
  -# Create generic code for $a op $b.
  -sub simple_binary {
  -    my $x = shift;
  -    my $ltmp = $x->l->val;
  -    my $rtmp = $x->r->val;
  -    my $dest = newtmp 'PerlUndef';
  -    my $op = imcc_op($x->op);
  -    code("\t$dest = $ltmp $op $rtmp\n");
  -    return $dest;
  -}
   
   # '=' assignment op.
   sub do_assign {
  @@ -1392,12 +1382,14 @@
   
    '>>'        => \&simple_binary,
    '<<'        => \&simple_binary,
  - '|' => \&simple_binary,
  - '&' => \&simple_binary,
  - '~' => \&simple_binary,
  + '+&'        => \&simple_binary,
  + '~&'        => \&simple_binary_pasm,
  + '+|'        => \&simple_binary,
  + '~|'        => \&simple_binary_pasm,
  + '+^'        => \&simple_binary,
  + '~^'        => \&simple_binary_pasm,
   
  -# '_' => \&simple_binary, # PMC concat broken.
  - '_' => \&do_concat,
  + '~' => \&do_concat,
    '=' => \&do_assign,
    '||'        => \&do_logor,
    '&&'        => \&do_logand,
  @@ -1413,7 +1405,7 @@
   
   use vars '%op_is_array';
   BEGIN {
  -    my @arrayops = qw(= .. x // ^^ && || _);
  +    my @arrayops = qw(= .. x // ^^ && || ~);
       push(@arrayops, ',');
       @[EMAIL PROTECTED] = (1) x @arrayops;
   }
  
  
  
  1.29      +8 -7      parrot/languages/perl6/P6C/Parser.pm
  
  Index: Parser.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/Parser.pm,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -w -r1.28 -r1.29
  --- Parser.pm 27 Nov 2003 19:43:20 -0000      1.28
  +++ Parser.pm 19 Dec 2003 09:01:19 -0000      1.29
  @@ -251,22 +251,23 @@
       $VCLOSE  = qr/<</;
       $NAMEPART        = qr/[a-zA-Z_][\w_]*/;
       $COMPARE = qr{(?:cmp|eq|[gnl]e|[gl]t)\b|<=>|[<>=!]=|<|>};
  -    $CONTEXT = [EMAIL PROTECTED]&*_?]|\+(?!\+)};
  +    $CONTEXT = [EMAIL PROTECTED]&*?]|\+(?!\+)|~(?![~\&\|\^])};
       $MULDIV  = qr{[\%*x]|/(?!/)};
       $MATCH   = qr{[=!]~};
       $INCR    = qr{\+\+|--};
  -    $PREFIX  = qr{ [!~\\]   |    # logical negation '!', bitwise negation '~', 
create a reference '\'
  +    $PREFIX  = qr{ [!\\]    |    # logical negation '!', create a reference '\'
  +                      \+\^     |    # unary bitwise XOR (bitwise negation)
                         \+(?!\+) |    # posification '+', but not increment '++' 
                         -(?![->])     # negation '-', but not decrement '--', but not 
dereference '->'
                       }x;
  -    $ADDSUB  = qr{[-+_]};
  +    $ADDSUB  = qr{[-+~](?![\&\|\^])};
       $BITSHIFT        = qr{<<|>>};
       $LOG_OR  = qr{(?:x?or|err)\b};
       $LOGOR   = qr{\|\||\^\^|//};
  -    $BITOR   = qr{(?:\|(?!\|)|~(?!~))};
  -    $BITAND  = 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_]+(?<!_)/;
  @@ -523,7 +524,7 @@
   muldiv_op:     /$MULDIV|$VOPEN$MULDIV$VCLOSE/o
   
   addsub:                <leftop: muldiv addsub_op muldiv>
  -# addsub_op:   '+' | '-' | '_'
  +# addsub_op:   '+' | '-' | '~'
   addsub_op:     /$ADDSUB|$VOPEN$ADDSUB$VCLOSE/o
   
   bitshift:      <leftop: addsub bitshift_op addsub>
  
  
  
  1.15      +39 -4     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.14
  retrieving revision 1.15
  diff -u -w -r1.14 -r1.15
  --- Binop.pm  27 Nov 2003 19:43:22 -0000      1.14
  +++ Binop.pm  19 Dec 2003 09:01:24 -0000      1.15
  @@ -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 imcc_op);
  +             do_range do_smartmatch imcc_op simple_binary simple_binary_pasm);
   %EXPORT_TAGS = (all => [EMAIL PROTECTED]);
   
   sub do_pow ;
  @@ -28,14 +28,49 @@
   sub sm_expr_num ;
   sub sm_expr_str ;
   
  -# Remap operator names from P6 to IMCC.
  +# Remap operator symbols from P6 to IMCC.
   sub imcc_op {
        my $op = shift;
  -
        return "~~" if ($op eq '^^');
  -     return "." if ($op eq '_');
  +     return "."  if ($op eq '~');
  +     return "|"  if ($op eq '+|');
  +     return "&"  if ($op eq '+&');
  +     return "~"  if ($op eq '+^');
  +     return $op;
  +}
   
  +# Remap operator symbols from P6 to PASM opcodes
  +sub pasm_op {
  +     my $op = shift;
  +     return "bands" if ($op eq '~&');
  +     return "bors"  if ($op eq '~|');
  +     return "bxors" if ($op eq '~^');
        return $op;
  +}
  +
  +#
  +# Create generic code for $a op $b.
  +sub simple_binary {
  +    my $x = shift;
  +    my $ltmp = $x->l->val;
  +    my $rtmp = $x->r->val;
  +    my $dest = newtmp 'PerlUndef';
  +    my $op = imcc_op($x->op);
  +    code("\t$dest = $ltmp $op $rtmp\n");
  +    return $dest;
  +}
  +
  +#
  +# Some p6 operators correspond to a single PASM opcode but don't
  +# have PIR syntax.
  +sub simple_binary_pasm {
  +    my $x = shift;
  +    my $dest = newtmp 'PerlUndef';
  +    my $ltmp = $x->l->val;
  +    my $rtmp = $x->r->val;
  +    my $opcode = pasm_op($x->op);
  +    code("\t$opcode $dest, $ltmp, $rtmp\n");
  +    return $dest;
   }
   
   1;
  
  
  
  1.6       +3 -3      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.5
  retrieving revision 1.6
  diff -u -w -r1.5 -r1.6
  --- hype.pm   27 Nov 2003 19:43:22 -0000      1.5
  +++ hype.pm   19 Dec 2003 09:01:24 -0000      1.6
  @@ -21,9 +21,9 @@
   
   use vars '%optype';
   BEGIN {
  -    my %opmap = (int => [ qw(>> << | & ~ ^^)],
  +    my %opmap = (int => [ qw(>> << +| +& +^ ^^)],
                 num => [ qw(+ - * / % **)],
  -              str => [ qw(_) ]);
  +              str => [ qw(~ ~| ~& ~^) ]);
       while (my ($t, $ops) = each %opmap) {
        @[EMAIL PROTECTED] = ($t) x @$ops;
       }
  @@ -120,7 +120,7 @@
        return hype_scalar_array(@_);
       } else {
        diag "Tried to hyper-operate two scalars";
  -     return P6C::Binop::simple_binary(@_);
  +     return P6C::IMCC::Binop::simple_binary(@_);
       }
   }
   
  
  
  
  1.9       +3 -2      parrot/languages/perl6/P6C/Tree/String.pm
  
  Index: String.pm
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/P6C/Tree/String.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- String.pm 13 Oct 2003 17:00:52 -0000      1.8
  +++ String.pm 19 Dec 2003 09:01:26 -0000      1.9
  @@ -153,9 +153,10 @@
       my ($list) = @_;
       my $type = 'PerlString';
       if (@$list > 1) {
  -        my $val = new P6C::Binop op => '_', l => make_node(shift @$list), r => 
make_node(shift @$list);
  +     # XXX: hardcoded P6 op, nasty
  +        my $val = new P6C::Binop op => '~', l => make_node(shift @$list), r => 
make_node(shift @$list);
           while (@$list) {
  -            $val = new P6C::Binop op => '_', l => $val, r => make_node(shift @$list)
  +            $val = new P6C::Binop op => '~', l => $val, r => make_node(shift @$list)
           }
           return $val;
       }
  
  
  
  1.3       +2 -2      parrot/languages/perl6/examples/qsort.p6
  
  Index: qsort.p6
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/examples/qsort.p6,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- qsort.p6  18 Feb 2003 13:25:13 -0000      1.2
  +++ qsort.p6  19 Dec 2003 09:01:33 -0000      1.3
  @@ -21,8 +21,8 @@
   sub main() {
       my @a = 1..(@ARGS[0] || 100);
       qsort @a, 0, @a - 1;
  -    print @a ^_ "\n";
  +    print @a >>~<< "\n";
       @a = reverse @a;
       qsort @a, 0, @a - 1;
  -    print @a ^_ "\n";
  +    print @a >>~<< "\n";
   }
  
  
  
  1.2       +10 -10    parrot/languages/perl6/t/compiler/aggregates.t
  
  Index: aggregates.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/aggregates.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- aggregates.t      13 Oct 2003 17:00:57 -0000      1.1
  +++ aggregates.t      19 Dec 2003 09:01:35 -0000      1.2
  @@ -9,7 +9,7 @@
       my $a = (2,3,4);
       my ($b, $c) = (2,3,4);
       my ($d, $e, $f) = (5,6);
  -    print1(@a[0] _ ' ' _ @a[1] _ ' ' _ @a[2]);
  +    print1(@a[0] ~ ' ' ~ @a[1] ~ ' ' ~ @a[2]);
       print1($a);
       print1($b);
       print1($c);
  @@ -33,9 +33,9 @@
   sub main() {
       my @a = (1,2,3,4);
       my @b = @a[0,2];
  -    print1(@b[0] _ ', ' _ @b[1]);
  -    print1(@a[0] _ ', ' _ @a[2]);
  -    print1(@a[1] _ ', ' _ @a[3]);
  +    print1(@b[0] ~ ', ' ~ @b[1]);
  +    print1(@a[0] ~ ', ' ~ @a[2]);
  +    print1(@a[1] ~ ', ' ~ @a[3]);
       my @c = @a;
       @a[2] = 5;
       @c[0] = 6;
  @@ -58,7 +58,7 @@
       %x{a} = 'ay?';
       %x{b} = 'be!';
       %x{$x} = 'twenty-three';
  -    print1(%x{a} _', ' _%x{$b} _', ' _%x{23});
  +    print1(%x{a} ~', ' ~%x{$b} ~', ' ~%x{23});
   }
   
   CODE
  @@ -75,7 +75,7 @@
       %x{b} = 'be!';
       %x{$x} = 'twenty-three';
       my @x = %x{'b', 'a', $x};
  -    print1(@x[0] [EMAIL PROTECTED] [EMAIL PROTECTED]);
  +    print1(@x[0] [EMAIL PROTECTED] [EMAIL PROTECTED]);
       my %y = %x;
       %y{a} = 'ay!';
       %x{b} = 'be?';
  @@ -92,7 +92,7 @@
   ##############################
   output_is(<<'CODE', <<'OUT', "Flattening");
   sub foo {
  -    print1(@_[0]_' '[EMAIL PROTECTED]);
  +    print1(@_[0]~' '[EMAIL PROTECTED]);
   }
   
   sub main() {
  @@ -137,9 +137,9 @@
       my @b = @[EMAIL PROTECTED];
       my @c = @a[1..3];
       my ($d, $e) = @a[1..3];
  -    print1(@b[0] _ ' ' _ @b[1] _ ' ' _ @b[2]);
  -    print1(@c[0] _ ' ' _ @c[1] _ ' ' _ @c[2]);
  -    print1($d _ ' ' _ $e);
  +    print1(@b[0] ~ ' ' ~ @b[1] ~ ' ' ~ @b[2]);
  +    print1(@c[0] ~ ' ' ~ @c[1] ~ ' ' ~ @c[2]);
  +    print1($d ~ ' ' ~ $e);
   }
   
   CODE
  
  
  
  1.3       +20 -20    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.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- basic.t   27 Nov 2003 19:43:25 -0000      1.2
  +++ basic.t   19 Dec 2003 09:01:36 -0000      1.3
  @@ -6,7 +6,7 @@
   ##############################
   output_is(<<'CODE', <<'OUT', "Basic hello.");
   sub main() {
  -    print1("Hello, " _ "world");
  +    print1("Hello, " ~ "world");
   }
   CODE
   Hello, world
  @@ -37,7 +37,7 @@
       print1(2 * 3);
       print1(6 / 2);
       print1(2 % 3);
  -    print1(2 _ 3);
  +    print1(2 ~ 3);
       print1(2 ** 3);
       print1(2 ** 3 ** 1);
       print1(2 ** 1 ** 3);
  @@ -65,7 +65,7 @@
       print1 "ok 3" if (--$x == 2);
       my $y = $x++;
       print1 "ok 4" if ($x == 3 && $y == 2);
  -    print1 ("ok "_ ($x++ + $y++));
  +    print1 ("ok "~ ($x++ + $y++));
       print1 "ok 6" if ($x == 4 && $y == 3);
   }
   CODE
  @@ -84,15 +84,15 @@
       my $y = $x;
       my @z = ($x, $y);
       # actually above statement makes next fail -lt
  -    print1 (++$x _ ' ' _ $y);
  +    print1 (++$x ~ ' ' ~ $y);
       $x--;
  -    print ++$x _ ' ' _ $y _ "\n";
  -    print $x++ _ ' ' _ $y _ "\n";
  -    print $x _ ' ' _ $y++ _ "\n";
  -    print $x _ ' ' _ ++$y _ "\n";
  -    print @z[0]++ _ ' ' _ [EMAIL PROTECTED] _ "\n";
  -    print $x _ ' ' _ $y _ "\n";
  -    print @z[0] _ ' ' _ @z[1] _ "\n";
  +    print ++$x ~ ' ' ~ $y ~ "\n";
  +    print $x++ ~ ' ' ~ $y ~ "\n";
  +    print $x ~ ' ' ~ $y++ ~ "\n";
  +    print $x ~ ' ' ~ ++$y ~ "\n";
  +    print @z[0]++ ~ ' ' ~ [EMAIL PROTECTED] ~ "\n";
  +    print $x ~ ' ' ~ $y ~ "\n";
  +    print @z[0] ~ ' ' ~ @z[1] ~ "\n";
   }
   CODE
   3 2
  @@ -110,9 +110,9 @@
   sub main() {
       print1(2 << 3);
       print1(32 >> 3);
  -    print1(32 | 3);
  -    print1(31 & 3);
  -    print1(10 ~ 12);         # 1010 ~ 1100 -> 0110 == 6
  +    print1(32 +| 3);
  +    print1(31 +& 3);
  +    print1(10 +^ 12);                # 1010 +^ 1100 -> 0110 == 6
   }
   CODE
   16
  @@ -256,19 +256,19 @@
       my $a = 3;
       if 1 {
        my $a = 4;
  -     if 2 { my $a = 5; print1("a is " _ $a) }
  -     print1("a is " _ $a);
  +     if 2 { my $a = 5; print1("a is " ~ $a) }
  +     print1("a is " ~ $a);
       }
  -    print1("a is " _ $a);
  +    print1("a is " ~ $a);
       if 1 {
        my $a = 5;
  -     print1("a is " _ $a);
  +     print1("a is " ~ $a);
       }
  -    print1("a is " _ $a);
  +    print1("a is " ~ $a);
       if 1 {
        $a = 6;
       }
  -    print1("a is " _ $a);
  +    print1("a is " ~ $a);
   }
   CODE
   a is 5
  
  
  
  1.2       +7 -7      parrot/languages/perl6/t/compiler/call.t
  
  Index: call.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/call.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- call.t    13 Oct 2003 17:00:57 -0000      1.1
  +++ call.t    19 Dec 2003 09:01:36 -0000      1.2
  @@ -7,7 +7,7 @@
   output_is(<<'CODE', <<'OUT', "subroutine call");
   sub _fact($tot, $max, $n) {
       if $n > $max {
  -     print1($max _ "! = " _ $tot);
  +     print1($max ~ "! = " ~ $tot);
       } else {
        _fact $tot * $n, $max, $n + 1;
       }
  @@ -15,7 +15,7 @@
   
   sub fact($n) {
       unless 0 <= $n < 20 {
  -     print1("Sorry, can't take " _ $n _ " factorial");
  +     print1("Sorry, can't take " ~ $n ~ " factorial");
       } else {
        _fact 1, $n, 1
       }
  @@ -38,7 +38,7 @@
   ##############################
   output_is(<<'CODE', <<'OUT', "no args");
   sub noargs() {
  -    print "ok " _ $i++ _ "\n";
  +    print "ok " ~ $i++ ~ "\n";
   }
   
   sub main() {
  @@ -62,7 +62,7 @@
   }
   
   sub noargs() {
  -    print "ok " _ $i++ _ "\n";
  +    print "ok " ~ $i++ ~ "\n";
   }
   
   CODE
  @@ -288,15 +288,15 @@
   }
   
   sub one($x) {
  -    print1('one ' _$x);
  +    print1('one ' ~$x);
   }
   
   sub two($x, $y) {
  -    print1('two ' _$x _' ' _$y);
  +    print1('two ' ~$x ~' ' ~$y);
   }
   
   sub three($x, $y, $z) {
  -    print1('three ' _$x _' ' _$y _' ' _$z);
  +    print1('three ' ~$x ~' ' ~$y ~' ' ~$z);
   }
   
   sub main() {
  
  
  
  1.2       +1 -1      parrot/languages/perl6/t/compiler/exceptions.t
  
  Index: exceptions.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/exceptions.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- exceptions.t      13 Oct 2003 17:00:57 -0000      1.1
  +++ exceptions.t      19 Dec 2003 09:01:36 -0000      1.2
  @@ -18,7 +18,7 @@
        die;
        CATCH { default { 2 } }
       }
  -    print $x _' ' _$y, "\n";
  +    print $x ~' ' ~$y, "\n";
   }
   CODE
   dying
  
  
  
  1.2       +1 -1      parrot/languages/perl6/t/compiler/for.t
  
  Index: for.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/for.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- for.t     13 Oct 2003 17:00:57 -0000      1.1
  +++ for.t     19 Dec 2003 09:01:36 -0000      1.2
  @@ -78,7 +78,7 @@
   output_is(<<'CODE', <<'OUT', "For 1;1 -> 2;3");
   sub main() {
       for 11..20 ; 1..15 -> $a, $b ; $c, $d, $e {
  -     print1($a _ ' ' _ $c);
  +     print1($a ~ ' ' ~ $c);
       }
   }
   
  
  
  
  1.3       +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.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- globals.t 27 Nov 2003 19:43:25 -0000      1.2
  +++ globals.t 19 Dec 2003 09:01:36 -0000      1.3
  @@ -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.4       +15 -15    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.3
  retrieving revision 1.4
  diff -u -w -r1.3 -r1.4
  --- hyper.t   27 Nov 2003 19:43:25 -0000      1.3
  +++ hyper.t   19 Dec 2003 09:01:36 -0000      1.4
  @@ -6,7 +6,7 @@
   ##############################
   output_is(<<'CODE', <<'OUT', 'Hyper 1');
   sub parray(@y) {
  -    print1('(' _ @y[0] _ ', ' _ @y[1] _ ')');
  +    print1('(' ~ @y[0] ~ ', ' ~ @y[1] ~ ')');
   }
   sub main() {
       my @a = (1,2);
  @@ -20,7 +20,7 @@
   #    print1(@a >>*<< @x  + @b); # Array math not in 0.0.7
   # IMCC clobbers too many registers with this:
   #     @y = @a >><<<< @a;
  -#     print1('(' _ @y[0] _ ', ' _ @y[1] _ ')');
  +#     print1('(' ~ @y[0] ~ ', ' ~ @y[1] ~ ')');
   }
   CODE
   (8, 14)
  @@ -51,7 +51,7 @@
   ##############################
   output_is(<<'CODE', <<'OUT', 'Hyper 3');
   sub parray(@y) {
  -    print1('(' _ @y[0] _ ', ' _ @y[1] _ ', ' _ @y[2] _ ')');
  +    print1('(' ~ @y[0] ~ ', ' ~ @y[1] ~ ', ' ~ @y[2] ~ ')');
   }
   
   sub main() {
  @@ -82,17 +82,17 @@
       my @a = (1..3);
       my @b = (4..9);
       my @c = @a >>+<< @b;
  -    print @c >>_<< ' ',"x\n";
  +    print @c >>~<< ' ',"x\n";
       @c = @b >>+<< @a;
  -    print @c >>_<< ' ',"x\n";
  +    print @c >>~<< ' ',"x\n";
       @b = @b >>+<< @a;
  -    print @b >>_<< ' ',"x\n";
  +    print @b >>~<< ' ',"x\n";
       @b = (4..9);
       @b >>+=<< @a;
  -    print @b >>_<< ' ',"x\n";
  +    print @b >>~<< ' ',"x\n";
       @b = (4..9);
       @a >>+=<< @b;
  -    print @a >>_<< ' ',"x\n";
  +    print @a >>~<< ' ',"x\n";
   }
   CODE
   5 7 9 7 8 9 x
  @@ -109,30 +109,30 @@
   my @c;
   @c = @a;
   @c >>+=<< @b;
  -print @c >>_<< ' ',"x\n";
  +print @c >>~<< ' ',"x\n";
   @c = @b;
   @c >>+=<< @a;
  -print @c >>_<< ' ',"x\n";
  +print @c >>~<< ' ',"x\n";
   
   @c = @a;
   @c >>*=<< @b;
  -print @c >>_<< ' ',"x\n";
  +print @c >>~<< ' ',"x\n";
   
   @c = @a;
   @c >>**=<< @b;
  -print @c >>_<< ' ',"x\n";
  +print @c >>~<< ' ',"x\n";
   
   @c = @a;
   @c >>/=<< @b;
  -print @c >>_<< ' ',"x\n";
  +print @c >>~<< ' ',"x\n";
   
   @c = @b;
   @c >>%=<< @a;
  -print @c >>_<< ' ',"x\n";
  +print @c >>~<< ' ',"x\n";
   
   @c = @b;
   @c >>-=<< @a;
  -print @c >>_<< ' ',"x\n";
  +print @c >>~<< ' ',"x\n";
   CODE
   /7 9 4 x
   7 9 4 x
  
  
  
  1.3       +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.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- qsort.t   27 Nov 2003 19:43:25 -0000      1.2
  +++ qsort.t   19 Dec 2003 09:01:36 -0000      1.3
  @@ -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
  
  
  
  1.2       +1 -1      parrot/languages/perl6/t/compiler/string.t
  
  Index: string.t
  ===================================================================
  RCS file: /cvs/public/parrot/languages/perl6/t/compiler/string.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- string.t  13 Oct 2003 17:00:57 -0000      1.1
  +++ string.t  19 Dec 2003 09:01:36 -0000      1.2
  @@ -12,7 +12,7 @@
       # qq + interpolation
       print(qq|$speech $action $person\n"But you speak like a fool."\n|);
       # obviously refering to those folks who think Perl6 is a "bad thing." :)
  -    print "\"pass " _ 'test"' _ "\n"; # backslash quotes + spacing
  +    print "\"pass " ~ 'test"' ~ "\n"; # backslash quotes + spacing
   }
   CODE
   "You have not seen, so I forgive your jest," said Gimli.
  
  
  

Reply via email to