From: <pj...@us...> - 2009-10-02 00:59:47
|
Revision: 6821 http://jython.svn.sourceforge.net/jython/?rev=6821&view=rev Author: pjenvey Date: 2009-10-02 00:59:40 +0000 (Fri, 02 Oct 2009) Log Message: ----------- small cleanup Modified Paths: -------------- trunk/jython/src/org/python/core/PyFrame.java Modified: trunk/jython/src/org/python/core/PyFrame.java =================================================================== --- trunk/jython/src/org/python/core/PyFrame.java 2009-10-01 20:48:58 UTC (rev 6820) +++ trunk/jython/src/org/python/core/PyFrame.java 2009-10-02 00:59:40 UTC (rev 6821) @@ -1,26 +1,35 @@ -// Copyright (c) Corporation for National Research Initiatives +/* + * Copyright (c) Corporation for National Research Initiatives + * Copyright (c) Jython Developers + */ package org.python.core; /** * A Python frame object. */ -public class PyFrame extends PyObject -{ +public class PyFrame extends PyObject { + + /** Previous frame or null. */ public PyFrame f_back; + /** The underyling code object. */ public PyBaseCode f_code; + /** Local symbol table. */ public PyObject f_locals; + /** Global symbol table. */ public PyObject f_globals; + /** Current line number. */ public int f_lineno; + /** builtin symbol table. */ public PyObject f_builtins; public PyObject[] f_fastlocals; - /** nested scopes: cell + free env. */ + /** Nested scopes: cell + free env. */ public PyCell[] f_env; public int f_ncells; @@ -35,11 +44,10 @@ private Object generatorInput = Py.None; - // with context exits - used by generated bytecode + /** with context exits - used by generated bytecode */ public PyObject[] f_exits; - - /** an interface to functions suitable for tracing, e.g. via - * sys.settrace(). */ + + /** an interface to functions suitable for tracing, e.g. via sys.settrace(). */ public TraceFunction tracefunc; private static final String NAME_ERROR_MSG = "name '%.200s' is not defined"; @@ -52,9 +60,7 @@ private static final String[] __members__ = {"f_back", "f_code", "f_locals", "f_globals", "f_lineno", "f_builtins", "f_trace"}; - public PyFrame(PyBaseCode code, PyObject locals, PyObject globals, - PyObject builtins) - { + public PyFrame(PyBaseCode code, PyObject locals, PyObject globals, PyObject builtins) { f_code = code; f_locals = locals; f_globals = globals; @@ -101,7 +107,7 @@ f_env[env_j] = new PyCell(); } // inherit the freevars - for (int i=0; env_j < ntotal; i++, env_j++) { + for (int i = 0; env_j < ntotal; i++, env_j++) { f_env[env_j] = (PyCell)freevars.pyget(i); } } @@ -123,7 +129,7 @@ generatorInput = Py.None; return input; } - + public Object checkGeneratorInput() { return generatorInput; } @@ -223,13 +229,13 @@ return f_locals; } - // - // 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. - // + /** + * 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. + */ public void setline(int line) { f_lineno = line; if (tracefunc != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |