This is a port of the mruby/c tutorial Chapter 03 to the mbed environment.
vm.c File Reference
mruby bytecode executor. More...
Go to the source code of this file.
Functions | |
static char * | find_irep_symbol (uint8_t *p, int n) |
find sym[n] from symbol table in irep | |
static int | op_nop (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute NOP. | |
static int | op_move (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute MOVE. | |
static int | op_loadl (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LOADL. | |
static int | op_loadi (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LOADI. | |
static int | op_loadsym (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LOADSYM. | |
static int | op_loadnil (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LOADNIL. | |
static int | op_loadself (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LOADSELF. | |
static int | op_loadt (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LOADT. | |
static int | op_loadf (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LOADF. | |
static int | op_getglobal (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute GETGLOBAL. | |
static int | op_setglobal (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute SETGLOBAL. | |
static int | op_getconst (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute GETCONST. | |
static int | op_setconst (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute SETCONST. | |
static int | op_jmp (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute JMP. | |
static int | op_jmpif (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute JMPIF. | |
static int | op_jmpnot (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute JMPNOT. | |
static int | op_send (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute SEND. | |
static int | op_enter (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute ENTER. | |
static int | op_return (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute RETURN. | |
static int | op_add (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute ADD. | |
static int | op_addi (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute ADDI. | |
static int | op_sub (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute ADD. | |
static int | op_subi (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute. | |
static int | op_mul (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute. | |
static int | op_div (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute. | |
static int | op_eq (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute EQ. | |
static int | op_lt (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LT. | |
static int | op_le (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LE. | |
static int | op_gt (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute GE. | |
static int | op_ge (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute GE. | |
static int | op_array (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Make Array. | |
static int | op_string (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Create string object. | |
static int | op_hash (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Create HASH object. | |
static int | op_lambda (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute LAMBDA. | |
static int | op_range (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute RANGE. | |
static int | op_class (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute CLASS. | |
static int | op_method (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute METHOD. | |
static int | op_tclass (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute TCLASS. | |
static int | op_stop (mrb_vm *vm, uint32_t code, mrb_value *regs) |
Execute STOP. | |
mrb_irep * | new_irep (mrb_vm *vm) |
Allocate new IREP. | |
struct VM * | vm_open (void) |
VM initializer. | |
void | vm_close (struct VM *vm) |
VM finalizer. | |
void | vm_boot (struct VM *vm) |
Boot the VM. | |
int | vm_run (mrb_vm *vm) |
Fetch a bytecode and execute. | |
void | debug_irep (mrb_vm *vm, mrb_irep *irep) |
Detailed Description
mruby bytecode executor.
Copyright (C) 2015 Kyushu Institute of Technology. Copyright (C) 2015 Shimane IT Open-Innovation Center.
This file is distributed under BSD 3-Clause License.
Fetch mruby VM bytecodes, decode and execute.
Definition in file vm.c.
Function Documentation
void debug_irep | ( | mrb_vm * | vm, |
mrb_irep * | irep | ||
) |
static char* find_irep_symbol | ( | uint8_t * | p, |
int | n | ||
) | [static] |
mrb_irep* new_irep | ( | mrb_vm * | vm ) |
static int op_add | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_addi | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_array | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_class | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_div | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_enter | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_eq | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_ge | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_getconst | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_getglobal | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_gt | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_hash | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_jmp | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_jmpif | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_jmpnot | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_lambda | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_le | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_loadf | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_loadi | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_loadl | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_loadnil | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_loadself | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_loadsym | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_loadt | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_lt | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_method | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_move | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_mul | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_nop | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_range | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_return | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_send | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_setconst | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_setglobal | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_stop | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_string | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_sub | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_subi | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
static int op_tclass | ( | mrb_vm * | vm, |
uint32_t | code, | ||
mrb_value * | regs | ||
) | [static] |
void vm_boot | ( | struct VM * | vm ) |
void vm_close | ( | struct VM * | vm ) |
struct VM* vm_open | ( | void | ) | [read] |
Generated on Tue Jul 12 2022 23:36:30 by 1.7.2