On Nov 22, 2005, at 18:50, Roger Browne wrote:
Leopold Toetsch wrote:
.HLL_map .LexPad -> .DynLexPad # (2)
Why not use "," instead of "->"? It would be one less special-case for
the PIR programmer to remember.
No problem. If folks prefer a comma I'll change it.
PDD20 says:
.HLL "Tcl", "tcl_group"
...
P0 = new Integer # really TclInteger
What do I write when I really want a new Integer (e.g. to pass to a
routine written in something other than the current .HLL?)?
Ah, have missed that in the pdd - that's misleading.
$P0 = new .Integer
always produces a .Integer and never a mapped type. If the programmer
wants that she can always write:
$P0 - new .TclInt
Mapped types are only created inside Parrot C code and never from
PASM/PIR.
E.g. the builtin Complex.abs() vtable has to create a .Float result.
Here the mapping of a .Float to a .PyNum is honored. The same is true,
when Parrot has to create a lexpad on behalf of the HLL, then a mapping
is used.
Regards,
Roger Browne
leo