2 * Copyright (C) 2001-2003, Parrot Foundation.
6 * This is the Parrot embedding system--the only part of Parrot that
7 * the outside world should see.
8 * Data Structure and Algorithms:
12 * embed.c, docs/embed.pod.
15 #ifndef PARROT_EMBED_H_GUARD
16 #define PARROT_EMBED_H_GUARD
18 #include "parrot/core_types.h" /* types used */
19 #include "parrot/compiler.h" /* compiler capabilities */
20 #include "parrot/config.h" /* PARROT_VERSION, PARROT_JIT_CAPABLE... */
21 #include "parrot/interpreter.h" /* give us the interpreter flags */
22 #include "parrot/warnings.h" /* give us the warnings flags */
24 typedef int Parrot_warnclass
;
29 } Parrot_disassemble_options
;
31 PARROT_EXPORT Parrot_Interp
Parrot_new(Parrot_Interp parent
);
33 PARROT_EXPORT
void Parrot_init_stacktop(Parrot_Interp
, void *);
35 PARROT_EXPORT
void Parrot_set_flag(Parrot_Interp
, Parrot_Int
);
36 PARROT_EXPORT
void Parrot_clear_flag(Parrot_Interp
, Parrot_Int
);
37 PARROT_EXPORT Parrot_Int
Parrot_test_flag(Parrot_Interp
, Parrot_Int
);
39 PARROT_EXPORT
void Parrot_set_trace(Parrot_Interp
, Parrot_UInt
);
40 PARROT_EXPORT
void Parrot_clear_trace(Parrot_Interp
, Parrot_UInt
);
41 PARROT_EXPORT Parrot_UInt
Parrot_test_trace(Parrot_Interp
, Parrot_UInt
);
43 PARROT_EXPORT
void Parrot_set_debug(Parrot_Interp
, Parrot_UInt
);
44 PARROT_EXPORT
void Parrot_clear_debug(Parrot_Interp
, Parrot_UInt
);
45 PARROT_EXPORT Parrot_UInt
Parrot_test_debug(Parrot_Interp
, Parrot_UInt
);
47 PARROT_EXPORT
void Parrot_set_executable_name(Parrot_Interp
, Parrot_String
);
49 PARROT_EXPORT
void Parrot_set_run_core(Parrot_Interp
, Parrot_Run_core_t core
);
51 PARROT_EXPORT
void Parrot_setwarnings(Parrot_Interp
, Parrot_warnclass
);
53 PARROT_EXPORT Parrot_PackFile
Parrot_pbc_read(Parrot_Interp
, const char *, const int);
55 PARROT_EXPORT
void Parrot_pbc_load(Parrot_Interp
, Parrot_PackFile
);
57 PARROT_EXPORT
void Parrot_pbc_fixup_loaded(Parrot_Interp
);
59 PARROT_EXPORT
void Parrot_setup_argv(Parrot_Interp
, int argc
, const char **argv
);
61 PARROT_EXPORT
void Parrot_setup_opt(Parrot_Interp
, int n
, char *argv
);
63 PARROT_EXPORT
void Parrot_runcode(Parrot_Interp
, int argc
, char **argv
);
65 PARROT_EXPORT Parrot_PMC
Parrot_compile_string(Parrot_Interp
,
66 Parrot_String type
, const char *code
, Parrot_String
*error
);
68 PARROT_EXPORT
void Parrot_destroy(Parrot_Interp
);
70 PARROT_EXPORT Parrot_Opcode
* Parrot_debug(Parrot_Interp
, Parrot_Interp
, Parrot_Opcode
*pc
);
72 PARROT_EXPORT
void Parrot_disassemble(Parrot_Interp
, const char *outfile
, Parrot_disassemble_options options
);
75 PARROT_DOES_NOT_RETURN
76 void Parrot_exit(Parrot_Interp
, int status
);
78 PARROT_EXPORT
void Parrot_run_native(PARROT_INTERP
, native_func_t func
);
80 /* Parrot_set_config_hash exists in *_config.o (e.g install_config.o),
81 so if you make this call then you will need to link with it in
82 addition to libparrot */
83 void Parrot_set_config_hash(void);
85 int Parrot_revision(void);
87 #endif /* PARROT_EMBED_H_GUARD */
91 * c-file-style: "parrot"
93 * vim: expandtab shiftwidth=4: