This is a port of the mruby/c tutorial Chapter 03 to the mbed environment.
load.c File Reference
mruby bytecode loader. More...
Go to the source code of this file.
Functions | |
static int | load_header (struct VM *vm, const uint8_t **pos) |
Parse header section. | |
static int | load_irep (struct VM *vm, const uint8_t **pos) |
Parse IREP section. | |
static int | load_lvar (struct VM *vm, const uint8_t **pos) |
Parse LVAR section. | |
int | load_mrb (struct VM *vm) |
Setup mrb program. | |
int | loca_mrb_array (struct VM *vm, const uint8_t *ptr) |
Detailed Description
mruby bytecode loader.
Copyright (C) 2015 Kyushu Institute of Technology. Copyright (C) 2015 Shimane IT Open-Innovation Center.
This file is distributed under BSD 3-Clause License.
Definition in file load.c.
Function Documentation
static int load_header | ( | struct VM * | vm, |
const uint8_t ** | pos | ||
) | [static] |
static int load_irep | ( | struct VM * | vm, |
const uint8_t ** | pos | ||
) | [static] |
Parse IREP section.
- Parameters:
-
vm A pointer of VM. pos A pointer of pointer of IREP section.
- Returns:
- int zero if no error.
Structure "IREP" section identifier 0000_0000 section size "0000" rite version
(loop n of child irep bellow) 0000_0000 record size 0000 n of local variable 0000 n of register 0000 n of child irep
0000_0000 n of byte code (ISEQ BLOCK) ... byte codes
0000_0000 n of pool (POOL BLOCK) (loop n of pool) 00 type 0000 length ... pool data
0000_0000 n of symbol (SYMS BLOCK) (loop n of symbol) 0000 length ... symbol data
static int load_lvar | ( | struct VM * | vm, |
const uint8_t ** | pos | ||
) | [static] |
int load_mrb | ( | struct VM * | vm ) |
Generated on Tue Jul 12 2022 23:36:30 by 1.7.2