src/builtins/guts.pir - subs that are part of the internals,
not for users
- !EXPORT(symbols,
from :named('from') [,
to :named('to')] )
- Export symbols in namespace
from to the namespace given by to.
If to isn't given,
then exports into the HLL global namespace.
This function differs somewhat from Parrot's Exporter PMC in that it understands how to properly merge MultiSub PMCs.
- !OUTER(name [,'max'=>max])
- Helper function to obtain the lexical
name from the caller's outer scope.
(Note that it never finds a lexical in the caller's lexpad -- use find_lex for that.) The max parameter specifies the maximum outer to search -- the default value of 1 will search the caller's immediate outer scope and no farther.
If the requested lexical is not found,
!OUTER returns null.
- !VAR
- Helper function for implementing the VAR and .VAR macros.
- !DOTYPECHECK
- Checks that the value and the assignee are type-compatible and does the assignment.
- !TYPECHECKPARAM
- Checks the type of a parameter.
- !SAMETYPE_EXACT
- Takes two types and returns true if they match exactly (not accounting for any subtyping relations,
etc).
- !TOPERL6MULTISUB
- At the moment,
we don't have the abilility to have Parrot use our own MultiSub type,
nor are we ready to (because built-ins need to get Perl 6 signatures first).
So for now we just transform multis in user code like this.
- !SETUP_ARGS
- Sets up the @*ARGS global.
We could possibly use the args pmc coming directly from Parrot,
but currently Parrot provides it as a ResizableStringArray and we need Undefs for non-existent elements (RSA gives empty strings).
- !keyword_class(name)
- Internal helper method to create a class.
- !keyword_role(name)
- Internal helper method to create a role.
- !keyword_grammar(name)
- Internal helper method to create a grammar.
- !keyword_enum(name)
- Internal helper method to create an enum class.
- !keyword_does(class,
role)
- Internal helper method to implement the functionality of the does keyword.
- !keyword_has(class,
attr_name,
type)
- Adds an attribute with the given name to the class or role.
- !anon_enum(value_list)
- Constructs a Mapping,
based upon the values list.