Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Fri, 22 Apr 2005 17:51:19 +0200
Local: Fri, Apr 22 2005 11:51 am
Subject: [RFC] unary operations
All infix operations are now converted to the new scheme. The most
visible part of the change is that infix operations now *can* return a new destination PMC: Px = n_add Py, Pz # create new Px as sum(Py, Pz) and that overloaded infix functions have to return the result. For Python, Lisp and probably more HLLs the same is of course needed for abs Px, Py # use existing abs, Px exists This is of course just a fancy way to write n_abs Px, Py # same but it makes it more clear that a new value is assigned. For the existing unary opcodes with PMC variants: abs, neg, not, nots (don't we have more?) the same scheme as to infix opcodes apply: if the passed in C<dest> PMC abs Px # VTABLE_i_absolute() I'd like additionally to have PMC variants of mostly existing vtables PMC *get_str() # string context The exsiting C<INTVAL get_bool()> should better be C<get_bool_native> so PMC *get_bool() I think these all should just return a new result PMC. Comments welcome, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Thu, 28 Apr 2005 17:40:11 +0200
Local: Thurs, Apr 28 2005 11:40 am
Subject: Re: [RFC] unary operations
I've implemented this part now:
> For Python, Lisp and probably more HLLs the same is of course needed for Actually the ops are: > unary opcodes: > abs Px, Py # use existing abs, Px exists > Px = n_abs Py # create new abs result PMC > This is of course just a fancy way to write > n_abs Px, Py # same > but it makes it more clear that a new value is assigned. > For the existing unary opcodes with PMC variants: > abs, neg, not, nots (don't we have more?) abs, neg, not, bnot, bnots and new: n_abs, n_neg, n_not, n_bnot, n_bnots > the same scheme as to infix opcodes apply: if the passed in C<dest> PMC Done too plus a few missing unary inplace variants. > is NULL, a new result PMC is created. I don't know, if we should have > distinct inplace variants too: > abs Px # VTABLE_i_absolute() leo You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||
| Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy |
| ©2009 Google |