Parrot_get_HLL_id
Parrot_register_HLL_type
Parrot_get_ctx_HLL_type
I've been using these in some experimental PMCs, with good results.
Is there any way to set and use these HLL type mappings from PIR?
Regards,
Roger Browne
Not yet. Syntax proposals welcome.
> Regards,
> Roger Browne
leo
Um, 3 new opcodes?
get_lang_id(out INT, in STR)
Return an integer id $1 for the HLL named in $2.
For example:
.local int amber_id
amber_id = get_lang_id "Amber"
register_lang_type(in INT, in INT, in INT)
Register the type $3 as corresponding to the standard
Parrot type $2 when using the HLL whose id is in $1.
For example:
.local int amber_integer_type
amber_integer_type = find_type "Am_INTEGER"
register_lang_type amber_id, .Integer, amber_integer_type
get_lang_type(out INT, in INT)
Return the type $1 corresponding to the standard Parrot
type $S2 for the language currently set by the .HLL directive.
For example:
.local int lang_int_type
.local pmc p
lang_int_type = get_lang_type .Integer
p = new lang_int_type
Regards,
Roger Browne