26 m_sandboxIsDisplayed(
false)
31 return sCurrentExecutionEnvironment;
35 assert(sCurrentExecutionEnvironment ==
nullptr);
36 sCurrentExecutionEnvironment =
this;
56 for (
int i = n - 3; i >= 0; i -= 3) {
57 if (values[i] != 0 || i == 0) {
61 #if MICROPY_ENABLE_SOURCE_LINE 67 qstr block = values[i + 2];
68 if (block == MP_QSTR_NULL) {
83 assert(sCurrentExecutionEnvironment ==
this);
84 sCurrentExecutionEnvironment =
nullptr;
93 #if MP_PORT_USE_STACK_SYMBOLS 97 volatile int stackTop;
125 void **regs_ptr = (
void**)®s;
147 if (sScriptProvider !=
nullptr) {
149 if (script !=
nullptr) {
167 assert(sCurrentExecutionEnvironment !=
nullptr);
168 sCurrentExecutionEnvironment->
printText(str, len);
172 assert(sCurrentExecutionEnvironment !=
nullptr);
173 return sCurrentExecutionEnvironment->
inputText(prompt);
const mp_print_t mp_plat_print
static ExecutionEnvironment * currentExecutionEnvironment()
bool mp_obj_is_exception_instance(mp_obj_t self_in)
void runCode(const char *)
void gc_init(void *start, void *end)
void init(void *heapStart, void *heapEnd)
virtual const char * contentOfScript(const char *name)=0
virtual const char * inputText(const char *prompt)
mp_lexer_t * mp_lexer_new_from_str_len(qstr src_name, const char *str, size_t len, size_t free_len)
int mp_print_str(const mp_print_t *print, const char *str)
mp_import_stat_t mp_import_stat(const char *path)
qstr qstr_from_str(const char *str)
LIBA_BEGIN_DECLS typedef int jmp_buf[31]
void gc_collect_start(void)
#define MP_STATE_THREAD(x)
mp_obj_t mp_call_function_0(mp_obj_t fun)
mp_lexer_t * mp_lexer_new_from_file(const char *filename)
const void * _stack_start
const char * mp_hal_input(const char *prompt)
size_t strlen(const char *s)
#define mp_stack_set_limit(limit)
mp_obj_t mp_compile(mp_parse_tree_t *parse_tree, qstr source_file, uint emit_opt, bool is_repl)
void gc_collect_root(void **ptrs, size_t len)
void mp_obj_exception_get_traceback(mp_obj_t self_in, size_t *n, size_t **values)
NORETURN void mp_raise_OSError(int errno_)
void registerScriptProvider(ScriptProvider *s)
void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind)
void gc_collect_end(void)
mp_parse_tree_t mp_parse(struct _mp_lexer_t *lex, mp_parse_input_kind_t input_kind)
virtual void printText(const char *text, size_t length)
void mp_hal_set_interrupt_char(int c)
void nlr_jump_fail(void *val)
void mp_hal_stdout_tx_strn_cooked(const char *str, size_t len)
int mp_printf(const mp_print_t *print, const char *fmt,...)
void mp_stack_set_top(void *top)