(none) imager-devel
/ help / lists / applications / search /
 

Re: 0.38pre5 release

From: Tony Cook (
00177@xyz.molar.is)
Date: Fös 23 Feb 2001 - 00:34:29 UTC

  • Next message: Arnar Mar Hrafnkelsson: "Re: 0.38pre5 release"

    On Thu, 22 Feb 2001, Arnar Mar Hrafnkelsson wrote:

    > [addi@steypa Imager]$ perl -Iblib/lib -Iblib/arch t/t57infix.t
    > 1..7
    > ok 1
    > ok 2
    > not ok 3
    > not ok 4
    > not ok 5
    > not ok 6
    > not ok 7

    I messed up. The format of the disassembled output that t57infix checks
    changed to include dummy jump labels, and t57infix doesn't know how to
    handle that. The machine I developed Assem.pm on didn't have
    Parse::RecDescent installed, so I didn't see the problems there.

    The warning in Assem.pm seems spurious, but I've fixed it anyway.

    Patch below.

    Tony

    --- t/t57infix.t 2001/02/23 00:21:53 1.1
    +++ t/t57infix.t 2001/02/23 00:24:07
    @@ -15,14 +15,14 @@
         my $code = $expr->dumpcode();
         my @code = split /\n/,$code;
         #print $code;
    - print $code[-1] =~ /^ret/ ? "ok 3\n" : "not ok 3\n";
    - print grep(/^mult.*360/, @code) ? "ok 4\n" : "not ok 4\n";
    + print $code[-1] =~ /:\s+ret/ ? "ok 3\n" : "not ok 3\n";
    + print grep(/:\s+mult.*360/, @code) ? "ok 4\n" : "not ok 4\n";
         # strength reduction converts these to mults
    - #print grep(/^div.*x/, @code) ? "ok 5\n" : "not ok 5\n";
    - #print grep(/^div.*y/, @code) ? "ok 6\n" : "not ok 6\n";
    - print grep(/^mult.*x/, @code) ? "ok 5\n" : "not ok 5\n";
    - print grep(/^mult.*y/, @code) ? "ok 6\n" : "not ok 6\n";
    - print grep(/^hsv.*0\.8/, @code) ? "ok 7\n" : "not ok 7\n";
    + #print grep(/:\s+div.*x/, @code) ? "ok 5\n" : "not ok 5\n";
    + #print grep(/:\s+div.*y/, @code) ? "ok 6\n" : "not ok 6\n";
    + print grep(/:\s+mult.*x/, @code) ? "ok 5\n" : "not ok 5\n";
    + print grep(/:\s+mult.*y/, @code) ? "ok 6\n" : "not ok 6\n";
    + print grep(/:\s+hsv.*0\.8/, @code) ? "ok 7\n" : "not ok 7\n";
       }
       else {
         print "not ok 2 # ",Imager::Expr::error(),"\n";
    --- lib/Imager/Expr/Assem.pm 2001/02/23 00:24:47 1.1
    +++ lib/Imager/Expr/Assem.pm 2001/02/23 00:29:04
    @@ -77,16 +77,16 @@
           }
           elsif ($op =~ s/\s*(\S+)\s*=\s*(\S+)\s*//) {
             # some normal ops finally
    - my ($result, $code) = ($1, $2);
    - unless ($attr->{$code}) {
    - push(@msgs, "$lineno: unknown operator $code");
    + my ($result, $opcode) = ($1, $2);
    + unless ($attr->{$opcode}) {
    + push(@msgs, "$lineno: unknown operator $opcode");
               next;
             }
             my @oper;
             while ($op =~ s/(\S+)\s*//) {
               push(@oper, $1);
             }
    - push(@ops, [$lineno, $result, $code, @oper]);
    + push(@ops, [$lineno, $result, $opcode, @oper]);
           }
           else {
             push(@msgs, "$lineno: invalid statement '$op'");



  •