python-on-a-chip online compiler

Dependencies:   mbed TSI

Embed: (wiki syntax)

« Back to documentation index

PmNativeFrame_s Struct Reference

PmNativeFrame_s Struct Reference

Native Frame. More...

#include <frame.h>

Data Fields

PmObjDesc_t od
 Object descriptor.
struct PmFrame_snf_back
 Ptr to previous frame obj.
pPmFunc_t nf_func
 Ptr to fxn obj.
pPmObj_t nf_stack
 Single stack slot.
uint8_t nf_active
 Boolean to indicate if the native frame is active.
uint8_t nf_numlocals
 Number of args passed to the native function.
pPmObj_t nf_locals [NATIVE_MAX_NUM_LOCALS]
 Local vars.

Detailed Description

Native Frame.

A struct that holds the execution frame of a native function, including the args and single stack slot, and pointer to the code object.

This struct doesn't need an OD because it is only used statically in the globals struct. There's only one native frame, the global one. This happens because a native function is a leaf node in the call tree (a native func can't call python funcs).

Definition at line 138 of file frame.h.


Field Documentation

uint8_t nf_active

Boolean to indicate if the native frame is active.

Definition at line 153 of file frame.h.

struct PmFrame_s* nf_back

Ptr to previous frame obj.

Definition at line 144 of file frame.h.

Ptr to fxn obj.

Definition at line 147 of file frame.h.

pPmObj_t nf_locals[NATIVE_MAX_NUM_LOCALS]

Local vars.

Definition at line 159 of file frame.h.

uint8_t nf_numlocals

Number of args passed to the native function.

Definition at line 156 of file frame.h.

Single stack slot.

Definition at line 150 of file frame.h.

Object descriptor.

Definition at line 141 of file frame.h.