On Wed, 9 Oct 2002, Dan Sugalski wrote:

> At 7:42 PM -0700 10/8/02, Steve Fink wrote:
> >Thanks, applied.
> >
> >Who came up with the idea of two-argument ne, anyway? That's kind of
> >bizarre.
>
>
> Definitely bizarre. I think I'd rather not have it, it doesn't make much sense.

 Easily done. Patch below removes the ops, plus the relevent tests from
 integer.t and number.t

 Simon

--- core.ops.old        Thu Oct 10 11:57:08 2002
+++ core.ops    Thu Oct 10 11:57:29 2002
@@ -902,14 +902,6 @@ op eq (in PMC, in PMC, inconst INT) {

 ########################################

-=item B<ne>(in INT, in INT)
-
-=item B<ne>(in NUM, in NUM)
-
-=item B<ne>(in STR, in STR)
-
-=item B<ne>(in PMC, in PMC)
-
 =item B<ne>(in INT, in INT, inconst INT)

 =item B<ne>(in NUM, in NUM, inconst INT)
@@ -920,38 +912,8 @@ op eq (in PMC, in PMC, inconst INT) {

 Branch if $1 is not equal to $2.

-Return address is popped off the call stack if no address is supplied.
-
 =cut

-inline op ne (in INT, in INT) {
-  if ($1 != $2) {
-    goto POP();
-  }
-  goto NEXT();
-}
-
-inline op ne (in NUM, in NUM) {
-  if ($1 != $2) {
-    goto POP();
-  }
-  goto NEXT();
-}
-
-op ne (in STR, in STR) {
-  if (string_compare (interpreter, $1, $2) != 0) {
-    goto POP();
-  }
-  goto NEXT();
-}
-
-op ne (in PMC, in PMC) {
-  if (! $1->vtable->is_equal(interpreter, $1, $2)) {
-    goto POP();
-  }
-  goto NEXT();
-}
-
 inline op ne(in INT, in INT, inconst INT) {
   if ($1 != $2) {
     goto OFFSET($3);

--- t/op/integer.t.old  Thu Oct 10 11:58:24 2002
+++ t/op/integer.t      Thu Oct 10 12:00:56 2002
@@ -1,6 +1,6 @@
 #! perl -w

-use Parrot::Test tests => 39;
+use Parrot::Test tests => 38;

 output_is(<<CODE, <<OUTPUT, "set_i_ic");
        # XXX: Need a test for writing outside the set of available
@@ -520,47 +520,6 @@ ok 1
 ok 2
 OUTPUT

-output_is(<<CODE, <<OUTPUT, "ne ic, i (pop label off stack)");
-
-       set     I0, 12
-       set     I1, 10
-
-       print   "start\\n"
-       bsr     BR1
-       print   "done 1\\n"
-       bsr     BR2
-       print   "done 2\\n"
-       bsr     BR3
-       print   "done 3\\n"
-        bsr     BR4
-        print   "Shouldn't get here\\n"
-
-       end
-
-BR1:   ne      I0, 10
-       print   "bad "
-       ret
-
-BR2:   ne      10, 12
-       print   "10 is 12! "
-       ret
-
-BR3:   ne      I0, I1
-       print   "10 is 12, even when in I reg "
-       ret
-
-BR4:    ne      12, 12
-        print   "done 4\\n"
-        end
-
-CODE
-start
-done 1
-done 2
-done 3
-done 4
-OUTPUT
-
 output_is(<<CODE, <<OUTPUT, "lt_i_ic");
        set     I0, 2147483647
        set     I1, -2147483648


--- t/op/number.t.old   Thu Oct 10 11:58:35 2002
+++ t/op/number.t       Thu Oct 10 12:01:45 2002
@@ -1,6 +1,6 @@
 #! perl -w

-use Parrot::Test tests => 34;
+use Parrot::Test tests => 33;
 use Test::More;

 output_is(<<CODE, <<OUTPUT, "set_n_nc");
@@ -491,50 +491,6 @@ ok 1
 ok 2
 OUTPUT

-output_is(<<'CODE', <<OUTPUT, "ne_n");
-        set     N0, 1.234567
-        set     N1, -1.234567
-
-        bsr     BR1
-        print   "ok 1\n"
-        bsr     BR2
-        print   "ok 2\n"
-        bsr     BR3
-        print   "ok 3\n"
-        bsr     BR4
-        print   "ok 4\n"
-        bsr     BR5
-        print   "Shouldn't get here\n"
-        end
-
-BR1:    ne N0, N1
-        print "not ok 1\n"
-        ret
-
-BR2:    ne 2.54, N0
-        print "not ok 2\n"
-        ret
-
-BR3:    ne N0, 0.00
-        print "not ok 3\n"
-        ret
-
-BR4:    ne 1.0, 2.0
-        print "not ok 4\n"
-        ret
-
-BR5:    ne N0, N0
-        print "ok 5\n"
-        end
-
-CODE
-ok 1
-ok 2
-ok 3
-ok 4
-ok 5
-OUTPUT
-
 output_is(<<CODE, <<OUTPUT, "lt_n_ic");
        set     N0, 1000.0
        set     N1, 500.0

Reply via email to