In response to the message I posted yesterday about Rakudo
running significantly slower when in a custom HLL, Allison and
chromatic were able to identify PMCProxy creation as the likely
source of the problem.

Based on that, I'm now working to clean up the places where
Rakudo is currently causing PMCProxys to be created, and could
use some clarification of the Parrot specification.

In the 'parrot' HLL, the PIR to create a new instance of a
ResizablePMCArray is simply:

    $P0 = new ['ResizablePMCArray']
 or $P0 = new 'ResizablePMCArray'

However, if I want to create a ResizablePMCArray from a sub in
a different HLL namespace, is my only option to do something like ... ?

    $P1 = get_root_namespace ['parrot';'ResizablePMCArray']
    $P0 = new $P1


Also, if my HLL has custom/dynamic PMC types (e.g., 'MyInt') and I 
want to create new instances of those, do I therefore have to do

    $P1 = get_root_namespace ['parrot';'MyInt']
    $P0 = new $P1

(Keep in mind that dynpmcs currently occupy the 'parrot' HLL namespace,
regardless of the HLL in which they are actually declared.)

I'm interested in answers to (1) what works today, (2) what is
guaranteed to work for the forseeable future, and (3) the "correct"
ways of doing the above (but perhaps doesn't currently work).

Thanks!

Pm
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to