FRAME

From RubySpec

Jump to: navigation, search

Each level in the call stack gets a FRAME structure allocated to hold information about that call. FRAME contains the following fields:

self
The current "self" object for this method
argc
The count of incoming arguments for the method
argv
The array of arguments for the method (ruby objects)
last_func
The last function called (?)
orig_func
???
last_class
The class under which this method executes (?)
prev
The call chain of FRAME instances is managed as a linked list; prev points at the previous FRAME in the stack
tmp
???
node
The (current? starting?) AST node for Ruby code executing within this frame
iter
The current block-passing state for this frame, see iter
flags
???
uniq
???
extern struct FRAME {
    VALUE self;
    int argc;
    VALUE *argv;
    ID last_func;
    ID orig_func;
    VALUE last_class;
    struct FRAME *prev;
    struct FRAME *tmp;
    struct RNode *node;
    int iter;
    int flags;
    unsigned long uniq;
} *ruby_frame;
Personal tools