python-on-a-chip online compiler

Dependencies:   mbed TSI

Embed: (wiki syntax)

« Back to documentation index

PmFrame_s Struct Reference

PmFrame_s Struct Reference

Frame. More...

#include <frame.h>

Data Fields

PmObjDesc_t od
 Obligatory obj descriptor.
struct PmFrame_sfo_back
 Ptr to previous frame obj.
pPmFunc_t fo_func
 Ptr to fxn obj.
PmMemSpace_t fo_memspace:8
 Mem space where func's CO comes from.
uint8_t const * fo_ip
 Instrxn ptr (pts into memspace)
pPmBlock_t fo_blockstack
 Linked list of blocks.
pPmDict_t fo_attrs
 Local attributes dict (non-fast locals)
pPmDict_t fo_globals
 Global attributes dict (pts to root frame's globals.
pPmObj_tfo_sp
 Points to next empty slot in fo_locals (1 past TOS)
uint8_t fo_isImport:1
 Frame can be an import-frame that handles RETURN differently.
uint8_t fo_isInit:1
 Flag to indicate class initailzer frame; handle RETURN differently.
pPmObj_t fo_locals [1]
 Array of local vars and stack (space appended at alloc)

Detailed Description

Frame.

A struct that holds the execution frame of a function, including the stack, local vars and pointer to the code object.

This struct doesn't declare the stack. frame_new() is responsible for allocating the extra memory at the tail of fo_locals[] to hold both the locals and stack.

Definition at line 83 of file frame.h.


Field Documentation

Local attributes dict (non-fast locals)

Definition at line 104 of file frame.h.

struct PmFrame_s* fo_back

Ptr to previous frame obj.

Definition at line 89 of file frame.h.

Linked list of blocks.

Definition at line 101 of file frame.h.

Ptr to fxn obj.

Definition at line 92 of file frame.h.

Global attributes dict (pts to root frame's globals.

Definition at line 107 of file frame.h.

uint8_t const* fo_ip

Instrxn ptr (pts into memspace)

Definition at line 98 of file frame.h.

uint8_t fo_isImport

Frame can be an import-frame that handles RETURN differently.

Definition at line 113 of file frame.h.

uint8_t fo_isInit

Flag to indicate class initailzer frame; handle RETURN differently.

Definition at line 117 of file frame.h.

Array of local vars and stack (space appended at alloc)

Definition at line 121 of file frame.h.

Mem space where func's CO comes from.

Definition at line 95 of file frame.h.

Points to next empty slot in fo_locals (1 past TOS)

Definition at line 110 of file frame.h.

Obligatory obj descriptor.

Definition at line 86 of file frame.h.