Numworks Epsilon  1.4.1
Graphing Calculator Operating System
bc.h File Reference
#include "py/runtime.h"
#include "py/objfun.h"

Go to the source code of this file.

Classes

struct  _mp_exc_stack_t
 
struct  _mp_code_state_t
 

Macros

#define mp_bytecode_print_inst(code, const_table)   mp_bytecode_print2(code, 1, const_table)
 
#define MP_TAGPTR_PTR(x)   ((void*)((uintptr_t)(x) & ~((uintptr_t)3)))
 
#define MP_TAGPTR_TAG0(x)   ((uintptr_t)(x) & 1)
 
#define MP_TAGPTR_TAG1(x)   ((uintptr_t)(x) & 2)
 
#define MP_TAGPTR_MAKE(ptr, tag)   ((void*)((uintptr_t)(ptr) | (tag)))
 

Typedefs

typedef struct _mp_exc_stack_t mp_exc_stack_t
 
typedef struct _mp_code_state_t mp_code_state_t
 

Functions

mp_uint_t mp_decode_uint (const byte **ptr)
 
mp_uint_t mp_decode_uint_value (const byte *ptr)
 
const bytemp_decode_uint_skip (const byte *ptr)
 
mp_vm_return_kind_t mp_execute_bytecode (mp_code_state_t *code_state, volatile mp_obj_t inject_exc)
 
mp_code_state_tmp_obj_fun_bc_prepare_codestate (mp_obj_t func, size_t n_args, size_t n_kw, const mp_obj_t *args)
 
void mp_setup_code_state (mp_code_state_t *code_state, size_t n_args, size_t n_kw, const mp_obj_t *args)
 
void mp_bytecode_print (const void *descr, const byte *code, mp_uint_t len, const mp_uint_t *const_table)
 
void mp_bytecode_print2 (const byte *code, size_t len, const mp_uint_t *const_table)
 
const bytemp_bytecode_print_str (const byte *ip)
 

Macro Definition Documentation

◆ mp_bytecode_print_inst

#define mp_bytecode_print_inst (   code,
  const_table 
)    mp_bytecode_print2(code, 1, const_table)

Definition at line 102 of file bc.h.

◆ MP_TAGPTR_MAKE

#define MP_TAGPTR_MAKE (   ptr,
  tag 
)    ((void*)((uintptr_t)(ptr) | (tag)))

Definition at line 108 of file bc.h.

◆ MP_TAGPTR_PTR

#define MP_TAGPTR_PTR (   x)    ((void*)((uintptr_t)(x) & ~((uintptr_t)3)))

Definition at line 105 of file bc.h.

◆ MP_TAGPTR_TAG0

#define MP_TAGPTR_TAG0 (   x)    ((uintptr_t)(x) & 1)

Definition at line 106 of file bc.h.

◆ MP_TAGPTR_TAG1

#define MP_TAGPTR_TAG1 (   x)    ((uintptr_t)(x) & 2)

Definition at line 107 of file bc.h.

Typedef Documentation

◆ mp_code_state_t

◆ mp_exc_stack_t

Function Documentation

◆ mp_bytecode_print()

void mp_bytecode_print ( const void *  descr,
const byte code,
mp_uint_t  len,
const mp_uint_t const_table 
)

◆ mp_bytecode_print2()

void mp_bytecode_print2 ( const byte code,
size_t  len,
const mp_uint_t const_table 
)

◆ mp_bytecode_print_str()

const byte* mp_bytecode_print_str ( const byte ip)

◆ mp_decode_uint()

mp_uint_t mp_decode_uint ( const byte **  ptr)

Definition at line 43 of file bc.c.

◆ mp_decode_uint_skip()

const byte* mp_decode_uint_skip ( const byte ptr)

Definition at line 67 of file bc.c.

◆ mp_decode_uint_value()

mp_uint_t mp_decode_uint_value ( const byte ptr)

Definition at line 61 of file bc.c.

◆ mp_execute_bytecode()

mp_vm_return_kind_t mp_execute_bytecode ( mp_code_state_t code_state,
volatile mp_obj_t  inject_exc 
)

Definition at line 127 of file vm.c.

◆ mp_obj_fun_bc_prepare_codestate()

mp_code_state_t* mp_obj_fun_bc_prepare_codestate ( mp_obj_t  func,
size_t  n_args,
size_t  n_kw,
const mp_obj_t args 
)

◆ mp_setup_code_state()

void mp_setup_code_state ( mp_code_state_t code_state,
size_t  n_args,
size_t  n_kw,
const mp_obj_t args 
)

Definition at line 108 of file bc.c.