NAME ^

src/inter_misc.c - Parrot Interpreter miscellaneous functions

DESCRIPTION ^

NCI function setup, compiler registration, interpinfo, and sysinfo opcodes.

Functions ^

PARROT_API void register_nci_method(PARROT_INTERP, const int type, void *func, const char *name, const char *proto)

Create an entry in the nci_method_table for the given NCI method of PMC class type.

PARROT_API void register_raw_nci_method_in_ns(PARROT_INTERP, const int type, void *func, const char *name)

TODO: Not yet documented!!!

PARROT_API void Parrot_mark_method_writes(PARROT_INTERP, int type, NOTNULL(const char *name))

Mark the method name on PMC type type as one that modifies the PMC.

PARROT_API void Parrot_compreg(PARROT_INTERP, STRING *type, Parrot_compiler_func_t func)

Register a parser/compiler function.

PARROT_API PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL PMC *Parrot_compile_string(PARROT_INTERP, NOTNULL(STRING *type), NOTNULL(const char *code), NOTNULL(STRING **error))

Compile code string.

PARROT_API PARROT_CANNOT_RETURN_NULL void *Parrot_compile_file(PARROT_INTERP, NOTNULL(const char *fullname), NOTNULL(STRING **error))

Compile code file.

PARROT_API INTVAL interpinfo(PARROT_INTERP, INTVAL what)

what specifies the type of information you want about the interpreter.

PARROT_API PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL PMC *interpinfo_p(PARROT_INTERP, INTVAL what)

what specifies the type of information you want about the interpreter.

PARROT_API PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL STRING *interpinfo_s(PARROT_INTERP, INTVAL what)

TODO: Not yet documented!!!

PARROT_WARN_UNUSED_RESULT INTVAL sysinfo_i(SHIM_INTERP, INTVAL info_wanted)

Returns the system info.

info_wanted is one of:

    PARROT_INTSIZE
    PARROT_FLOATSIZE
    PARROT_POINTERSIZE
In unknown info is requested then -1 is returned.

PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT STRING *sysinfo_s(PARROT_INTERP, INTVAL info_wanted)

Returns the system info string.

info_wanted is one of:

    PARROT_OS
    PARROT_OS_VERSION
    PARROT_OS_VERSION_NUMBER
    CPU_ARCH
    CPU_TYPE
If unknown info is requested then and empty string is returned.


parrot