class documentation

An interpreter frame. This contains the local value and block stacks and the associated code and pointer. The most complex usage is with generators in which a frame is stored and then repeatedly reactivated. Other than that frames are created executed and then discarded. Attributes: f_code: The code object this frame is executing. f_globals: The globals dict used for global name resolution. f_locals: The locals used for name resolution. Will be modified by Frame.__init__ if callargs is passed. f_builtins: Similar for builtins. f_back: The frame above self on the stack. f_lineno: The first line number of the code object. ctx: The abstract context we belong to. node: The node at which the frame is created. states: A mapping from opcodes to FrameState objects. cells: local variables bound in a closure, or used in a closure. block_stack: A stack of blocks used to manage exceptions, loops, and "with"s. data_stack: The value stack that is used for instruction operands. allowed_returns: The return annotation of this function. check_return: Whether the actual return type of a call should be checked against allowed_returns. return_variable: The return value of this function, as a Variable. yield_variable: The yield value of this function, as a Variable.

Method __init__ Initialize a special frame as needed by TypegraphVirtualMachine.
Method __repr__ Undocumented
Method lookup_name Undocumented
Instance Variable allowed_returns Undocumented
Instance Variable cells Undocumented
Instance Variable check_return Undocumented
Instance Variable class_closure_var Undocumented
Instance Variable current_block Undocumented
Instance Variable current_opcode Undocumented
Instance Variable f_back Undocumented
Instance Variable f_builtins Undocumented
Instance Variable f_code Undocumented
Instance Variable f_globals Undocumented
Instance Variable f_lineno Undocumented
Instance Variable f_locals Undocumented
Instance Variable first_arg Undocumented
Instance Variable func Undocumented
Instance Variable node Undocumented
Instance Variable overloads Undocumented
Instance Variable return_variable Undocumented
Instance Variable skip_in_tracebacks Undocumented
Instance Variable states Undocumented
Instance Variable substs Undocumented
Instance Variable targets Undocumented
Instance Variable yield_variable Undocumented
Property type_params Undocumented

Inherited from ContextWeakrefMixin:

Class Variable __slots__ Undocumented
Instance Variable ctx_weakref Undocumented
Property ctx Undocumented
def __init__(self, node: cfg.CFGNode, ctx: _ContextType, f_code: blocks.OrderedCode, f_globals: abstract.LazyConcreteDict, f_locals: abstract.LazyConcreteDict, f_back: FrameType, callargs: Dict[str, cfg.Variable], closure: Optional[Tuple[cfg.Variable, ...]], func: Optional[cfg.Binding], first_arg: Optional[cfg.Variable], substs: Collection[Dict[str, cfg.Variable]]): (source)

Initialize a special frame as needed by TypegraphVirtualMachine. Args: node: The current CFG graph node. ctx: The owning abstract context. f_code: The code object to execute in this frame. f_globals: The global context to execute in as a SimpleValue as used by TypegraphVirtualMachine. f_locals: Local variables. Will be modified if callargs is passed. f_back: The frame above this one on the stack. callargs: Additional function arguments to store in f_locals. closure: A tuple containing the new co_freevars. func: Optionally, a binding to the function this frame corresponds to. first_arg: First argument to the function. substs: Maps from type parameter names in scope for this frame to their possible values. Raises: NameError: If we can't resolve any references into the outer frame.

def __repr__(self): (source)

Undocumented

def lookup_name(self, target_name): (source)

Undocumented

allowed_returns = (source)

Undocumented

Undocumented

check_return: bool = (source)

Undocumented

class_closure_var = (source)

Undocumented

current_block = (source)

Undocumented

current_opcode = (source)

Undocumented

Undocumented

f_builtins = (source)

Undocumented

Undocumented

f_globals = (source)

Undocumented

f_lineno = (source)

Undocumented

f_locals = (source)

Undocumented

first_arg = (source)

Undocumented

Undocumented

Undocumented

overloads = (source)

Undocumented

return_variable = (source)

Undocumented

skip_in_tracebacks: bool = (source)

Undocumented

Undocumented

Undocumented

Undocumented

yield_variable = (source)

Undocumented

@property
type_params = (source)

Undocumented