Class PyFrame

    • Field Detail

      • TYPE

        public static final PyType TYPE
      • f_back

        public PyFrame f_back
        Previous frame or null.
      • f_code

        public PyBaseCode f_code
        The underyling code object.
      • f_builtins

        public PyObject f_builtins
        builtin symbol table.
      • f_globals

        public PyObject f_globals
        Global symbol table.
      • f_locals

        public PyObject f_locals
        Local symbol table.
      • f_lineno

        public int f_lineno
        Current line number.
      • f_fastlocals

        public PyObject[] f_fastlocals
      • f_env

        public PyCell[] f_env
        Nested scopes: cell + free env.
      • f_ncells

        public int f_ncells
      • f_nfreevars

        public int f_nfreevars
      • f_lasti

        public int f_lasti
      • f_savedlocals

        public java.lang.Object[] f_savedlocals
      • f_exits

        public PyObject[] f_exits
        with context exits - used by generated bytecode
      • tracefunc

        public TraceFunction tracefunc
        An interface to functions suitable for tracing, e.g. via sys.settrace().
    • Method Detail

      • getGeneratorInput

        public java.lang.Object getGeneratorInput()
      • checkGeneratorInput

        public java.lang.Object checkGeneratorInput()
      • getLocals

        public PyObject getLocals()
        Return the locals dict. First merges the fast locals into f_locals, then returns the updated f_locals.
        Returns:
        a PyObject mapping of locals
      • setTrace

        public void setTrace​(PyObject trace)
      • delTrace

        public void delTrace()
      • getf_locals

        public PyObject getf_locals()
        Return the current f_locals dict.
        Returns:
        a PyObject mapping of locals
      • setline

        public void setline​(int line)
        Track the current line number. Called by generated code. This is not to be confused with the CPython method frame_setlineno() which causes the interpreter to jump to the given line.
      • getline

        public int getline()
      • getlocal

        public PyObject getlocal​(int index)
      • getname

        public PyObject getname​(java.lang.String index)
      • getglobal

        public PyObject getglobal​(java.lang.String index)
      • setlocal

        public void setlocal​(int index,
                             PyObject value)
      • setlocal

        public void setlocal​(java.lang.String index,
                             PyObject value)
      • setglobal

        public void setglobal​(java.lang.String index,
                              PyObject value)
      • dellocal

        public void dellocal​(int index)
      • dellocal

        public void dellocal​(java.lang.String index)
      • delglobal

        public void delglobal​(java.lang.String index)
      • getclosure

        public PyObject getclosure​(int index)
      • getderef

        public PyObject getderef​(int index)
      • setderef

        public void setderef​(int index,
                             PyObject value)
      • to_cell

        public void to_cell​(int parm_index,
                            int env_index)
      • refersDirectlyTo

        public boolean refersDirectlyTo​(PyObject ob)
                                 throws java.lang.UnsupportedOperationException
        Description copied from interface: Traverseproc
        Optional operation. Should only be implemented if it is more efficient than calling Traverseproc.traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.
        Specified by:
        refersDirectlyTo in interface Traverseproc
        Throws:
        java.lang.UnsupportedOperationException