From: <pj...@us...> - 2009-10-24 05:46:42
|
Revision: 6898 http://jython.svn.sourceforge.net/jython/?rev=6898&view=rev Author: pjenvey Date: 2009-10-24 05:46:34 +0000 (Sat, 24 Oct 2009) Log Message: ----------- use the unsychronized size() call when we're already synchronized Modified Paths: -------------- trunk/jython/src/org/python/core/PyList.java Modified: trunk/jython/src/org/python/core/PyList.java =================================================================== --- trunk/jython/src/org/python/core/PyList.java 2009-10-24 04:34:03 UTC (rev 6897) +++ trunk/jython/src/org/python/core/PyList.java 2009-10-24 05:46:34 UTC (rev 6898) @@ -293,7 +293,7 @@ for (int i = 1; i < count; i++) { list.addAll(oldList); } - gListAllocatedStatus = __len__(); // now omit? + gListAllocatedStatus = list.size(); // now omit? return this; } @@ -473,7 +473,7 @@ @ExposedMethod(doc = BuiltinDocs.list_append_doc) final synchronized void list_append(PyObject o) { pyadd(o); - gListAllocatedStatus = __len__(); + gListAllocatedStatus = list.size(); } /** @@ -576,7 +576,7 @@ index = size(); } pyadd(index, o); - gListAllocatedStatus = __len__(); + gListAllocatedStatus = list.size(); } /** @@ -594,7 +594,7 @@ @ExposedMethod(doc = BuiltinDocs.list_remove_doc) final synchronized void list_remove(PyObject o) { del(_index(o, "list.remove(x): x not in list", 0, size())); - gListAllocatedStatus = __len__(); + gListAllocatedStatus = list.size(); } /** @@ -609,7 +609,7 @@ @ExposedMethod(doc = BuiltinDocs.list_reverse_doc) final synchronized void list_reverse() { Collections.reverse(list); - gListAllocatedStatus = __len__(); + gListAllocatedStatus = list.size(); } /** @@ -665,7 +665,7 @@ list.add(item); } } - gListAllocatedStatus = __len__(); + gListAllocatedStatus = list.size(); } @Override @@ -746,7 +746,7 @@ if (reverse) { Collections.reverse(list); // maintain stability of sort by reversing first } - gListAllocatedStatus = __len__(); + gListAllocatedStatus = list.size(); } private static class PyObjectDefaultComparator implements Comparator<PyObject> { @@ -790,7 +790,7 @@ if (reverse) { Collections.reverse(list); } - gListAllocatedStatus = __len__(); + gListAllocatedStatus = list.size(); } private static class PyObjectComparator implements Comparator<PyObject> { @@ -892,7 +892,7 @@ for (KV kv : decorated) { list.add(kv.value); } - gListAllocatedStatus = __len__(); + gListAllocatedStatus = list.size(); } public int hashCode() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |