Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cvs commit: parrot/src resources.c string.c utils.c

1 view
Skip to first unread message

Leopold Toetsch

unread,
Feb 12, 2004, 3:48:47 PM2/12/04
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski <d...@cvs.perl.org> wrote:
> A few more mod ops

> +=item B<cmod>(out PMC, in INT, in INT)

I'm not sure if this is a good idea. We currently don't have any such
kind of ops that takes 2 natural types and spits out a new PMC

BTW, the doc above has out PMC, the implementation is:

> +op cmod(in PMC, in INT, in INT) {

so that's b0rken anyway.

But implementing *one* such opcode (cmod) implies that we have it for
all math ops for symmetry reasons.

A further note: while its safe to add opcodes w/o updating ops.num, the
next adding of unregistered ops might break the ops numbering (and
existing PBCs), so its not really recommended ;)

leo

Dan Sugalski

unread,
Feb 13, 2004, 8:34:56 AM2/13/04
to l...@toetsch.at, Dan Sugalski, perl6-i...@perl.org
At 9:48 PM +0100 2/12/04, Leopold Toetsch wrote:
>Dan Sugalski <d...@cvs.perl.org> wrote:
>> A few more mod ops
>
>> +=item B<cmod>(out PMC, in INT, in INT)
>
>I'm not sure if this is a good idea. We currently don't have any such
>kind of ops that takes 2 natural types and spits out a new PMC

Yeah, good point.

>BTW, the doc above has out PMC, the implementation is:
>
>> +op cmod(in PMC, in INT, in INT) {
>
>so that's b0rken anyway.

D'oh! That's what I get for doing a half-hack job. Dammit. I'll go
fix that. Well, OK, I'll go yank 'em, as this is a very good point:

>But implementing *one* such opcode (cmod) implies that we have it for
>all math ops for symmetry reasons.
>
>A further note: while its safe to add opcodes w/o updating ops.num, the
>next adding of unregistered ops might break the ops numbering (and
>existing PBCs), so its not really recommended ;)

I'm OK with not numbering officially straight off, at least until
things get hashed out a bit. In this case it's especially wise, as
the extra mod/cmod ops are going to get yanked. :)
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Leopold Toetsch

unread,
Feb 17, 2004, 4:55:54 AM2/17/04
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski <d...@sidhe.org> wrote:

> D'oh! That's what I get for doing a half-hack job. Dammit. I'll go
> fix that. Well, OK, I'll go yank 'em, as this is a very good point:

These c?mod opcodes are history. I've deleted them

ops.num is updated.

leo

0 new messages