[RFC] Constant PMCs in PBC

Patrick R. Michaud pmichaud at pobox.com
Mon Dec 7 14:02:05 UTC 2009


On Mon, Dec 07, 2009 at 07:39:13AM -0500, Will Coleda wrote:
> For a non-EH, you can do something like:
> .sub 'string_options' :anon :immediate
>     .local pmc opts
>     opts = split ' ', 'bytelength compare equal first index is last
> length map match range repeat replace reverse tolower toupper totitle
> trim trimleft trimright wordend wordstart'
> 
>     .return(opts)
> .end

The other limitation is that :immediate only helps when creating
constants of core PMC types.  If you have a dynpmc or some other
structure (e.g., for HLL constants), or if the act of creating the
constant has other side-effects, then :immediate doesn't help.

Pm


More information about the parrot-dev mailing list