NAME ^

src/inter_misc.c - Parrot Interpreter - Misc functions

DESCRIPTION ^

NCI function setup, interpinfo, and sysinfo opcodes.

Functions ^

void register_nci_method(Parrot_Interp interp, 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.

void Parrot_mark_method_writes(Parrot_Interp interp, int type, const char *name)

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

void Parrot_compreg(Parrot_Interp interp, STRING *type, Parrot_compiler_func_t func);

Register a parser/compiler function.

PMC *Parrot_compile_string(Parrot_Interp interp, STRING *type, char *code, String **error)

Compile code string.

void Parrot_compile_file(Parrot_Interp interp, const char *fullname, String **error)

Compile code file.

INTVAL interpinfo(Interp *interp, INTVAL what)

PMC *interpinfo_p(Interp *interp, INTVAL what)

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

INTVAL sysinfo_i(Parrot_Interp 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.

STRING *sysinfo_s(Parrot_Interp 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.

SEE ALSO ^

include/parrot/interpreter.h.


parrot