Update of /cvsroot/jython/jython/org/python/core
In directory usw-pr-cvs1:/tmp/cvs-serv30527
Modified Files:
PyFrame.java
Log Message:
Partially reverted badly buggy change (that passed through the test suites).
The point is that f_fastlocals is used and needed for arg passing too.
Index: PyFrame.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/core/PyFrame.java,v
retrieving revision 2.8
retrieving revision 2.9
diff -C2 -r2.8 -r2.9
*** PyFrame.java 2001/05/15 18:53:35 2.8
--- PyFrame.java 2001/05/22 12:38:03 2.9
***************
*** 40,44 ****
// This needs work to be efficient with multiple interpreter states
if (locals == null && code != null) {
! if ((code.co_flags&PyTableCode.CO_OPTIMIZED)!=0) {
if (code.co_nlocals>0) f_fastlocals = new PyObject[code.co_nlocals-code.xxx_npurecell]; // internal: may change
} else f_locals = new PyStringMap();
--- 40,44 ----
// This needs work to be efficient with multiple interpreter states
if (locals == null && code != null) {
! if ((code.co_flags&PyTableCode.CO_OPTIMIZED)!=0 || code.nargs > 0) { // ! f_fastlocals needed for arg passing too
if (code.co_nlocals>0) f_fastlocals = new PyObject[code.co_nlocals-code.xxx_npurecell]; // internal: may change
} else f_locals = new PyStringMap();
***************
*** 121,128 ****
if (o != null) f_locals.__setitem__(f_code.co_varnames[i], o);
}
! /* ?? xxx_
! // This should turn off fast_locals optimization after somebody
! // gets the locals dict
! f_fastlocals = null; */
}
int j = 0;
--- 121,125 ----
if (o != null) f_locals.__setitem__(f_code.co_varnames[i], o);
}
! if ((f_code.co_flags&PyTableCode.CO_OPTIMIZED) == 0) f_fastlocals = null;
}
int j = 0;
|