Changeset 7183

Show
Ignore:
Timestamp:
09/28/05 18:26:48 (3 years ago)
Author:
iblech
Message:

* Usual svn properties.
* t/unspecced/evaluation_order.t: More subtests and test fixes.
* PIL2JS: PIL::PAssign, PIL::PBind: Evaluate the LHS first, then eval the RHS

in assignment and binding.
(This means evaluation_order.t passes 9/10 now.)

Files:
11 modified

Legend:

Unmodified
Added
Removed
  • Setup.lhs

    • Property svn:mime-type changed from text/script to text/plain; charset=UTF-8
    • Property svn:eol-style set to native
  • perl5/PIL2JS/lib/PIL/PAssign.pm

    r6693 r7183  
    2323  no warnings "recursion"; 
    2424 
    25   return PIL::possibly_ccify $self->{pRHS}, sub { 
    26     my $src = shift; 
    27     return PIL::possibly_ccify $self->{pLHS}, sub { 
    28       my $dest = shift; 
     25  return PIL::possibly_ccify $self->{pLHS}, sub { 
     26    my $dest = shift; 
     27    return PIL::possibly_ccify $self->{pRHS}, sub { 
     28      my $src = shift; 
    2929      sprintf "%s(%s.STORE(%s))", 
    3030      $self->{CC}->as_js, 
  • perl5/PIL2JS/lib/PIL/PBind.pm

    r6937 r7183  
    2323  no warnings "recursion"; 
    2424 
    25   return PIL::possibly_ccify $self->{pRHS}, sub { 
    26     my $src = shift; 
    27     return PIL::possibly_ccify $self->{pLHS}, sub { 
    28       my $dest = shift; 
     25  return PIL::possibly_ccify $self->{pLHS}, sub { 
     26    my $dest = shift; 
     27    return PIL::possibly_ccify $self->{pRHS}, sub { 
     28      my $src = shift; 
    2929      sprintf "%s(%s.BINDTO(%s))", 
    3030      $self->{CC}->as_js, 
  • perl5/Perl6-MetaModel2.0/lib/chaos.pl

    • Property svn:mime-type set to text/plain; charset=UTF-8
    • Property svn:eol-style set to native
  • perl5/Perl6-MetaModel2.0/t/35_AUTOLOAD.t

    • Property svn:mime-type set to text/plain; charset=UTF-8
    • Property svn:eol-style set to native
  • perl5/Perl6-Value/lib/Perl6/Junction.pm

    • Property svn:mime-type set to text/plain; charset=UTF-8
    • Property svn:eol-style set to native
  • pil.cabal

    • Property svn:mime-type set to text/plain; charset=UTF-8
    • Property svn:eol-style set to native
  • src/Data/FastPackedString.hs

    • Property svn:mime-type set to text/plain; charset=UTF-8
    • Property svn:eol-style set to native
  • src/cbits/fpstring.c

    • Property svn:mime-type set to text/plain; charset=UTF-8
    • Property svn:eol-style set to native
  • src/cbits/fpstring.h

    • Property svn:mime-type set to text/plain; charset=UTF-8
    • Property svn:eol-style set to native
  • t/unspecced/evaluation_order.t

    r7070 r7183  
    44use Test; 
    55 
    6 plan 5; 
     6plan 10; 
    77 
    88throws_ok { 
    99        die "first"; 
    1010        die "second"; 
    11 } "first", "this better work ;-)"; 
     11}, "first", "this better work ;-)"; 
    1212 
    1313throws_ok { 
    1414        my @a; 
    1515        @a[die "first"] = die "second"; 
    16 } "first", "evaluation order of left/right sides of assignment"; 
     16}, "first", "evaluation order of left/right sides of array assignment"; 
    1717 
    1818throws_ok { 
    19         my @a = (die "first", die "second"); 
    20 }"first", "evaluation order of list context"; 
     19        my @a; 
     20        @a[die "first"] := die "second"; 
     21}, "first", "evaluation order of left/right sides of array binding"; 
    2122 
    2223throws_ok { 
    23         my $x = die "first", die "second"; 
    24 } "first", "evaluation order of multiple items in scalar context"; 
     24        my sub foo ($arg) is rw { my $var }; 
     25        foo(die "first") = die "second"; 
     26}, "first", "evaluation order of left/right sides of lvalue sub assignment"; 
    2527 
    2628throws_ok { 
    27         say(die "first", die "second"); 
    28 } "first", "evaluation in function application"; 
     29        my sub foo ($arg) is rw { my $var }; 
     30        foo(die "first") := die "second"; 
     31}, "first", "evaluation order of left/right sides of lvalue sub binding"; 
    2932 
     33throws_ok { 
     34        my @a = (die("first"), die("second")); 
     35}, "first", "evaluation order of list context"; 
    3036 
     37throws_ok { 
     38        my $x = die("first"), die("second"); 
     39}, "first", "evaluation order of multiple items in scalar context"; 
     40 
     41throws_ok { 
     42        say(die("first"), die("second")); 
     43}, "first", "evaluation in function application"; 
     44 
     45throws_ok { 
     46        (die "first")(die "second"); 
     47}, "first", "evaluation order of using (die()) as subref"; 
     48 
     49throws_ok { 
     50        (die "first") += die "second"; 
     51}, "first", "evaluation order of +=";