[Python-checkins] r65314 - in python/branches/tlee-ast-optimize: .bzrignore Doc/glossary.rst Doc/library/2to3.rst Doc/library/development.rst Doc/library/email.message.rst Doc/library/itertools.rst Doc/library/math.rst Doc/library/parser.rst Doc/library/popen2.rst Doc/library/random.rst Doc/library/stdtypes.rst Doc/library/subprocess.rst Doc/tools/sphinxext/pyspecific.py Doc/tutorial/inputoutput.rst Doc/whatsnew/2.6.rst Lib/bsddb/test/test_misc.py Lib/bsddb/test/test_replication.py Lib/io.py Lib/locale.py Lib/random.py Lib/robotparser.py Lib/shelve.py Lib/test/decimaltestdata/abs.decTest Lib/test/decimaltestdata/add.decTest Lib/test/decimaltestdata/and.decTest Lib/test/decimaltestdata/base.decTest Lib/test/decimaltestdata/clamp.decTest Lib/test/decimaltestdata/class.decTest Lib/test/decimaltestdata/compare.decTest Lib/test/decimaltestdata/comparetotal.decTest Lib/test/decimaltestdata/comparetotmag.decTest Lib/test/decimaltestdata/copy.decTest Lib/test/decimaltestdata/copyabs.decTest Lib/test/decimaltestdata/copynegate.decTest Lib/test/decimaltestdata/copysign.decTest Lib/test/decimaltestdata/ddAbs.decTest Lib/test/decimaltestdata/ddAdd.decTest Lib/test/decimaltestdata/ddAnd.decTest Lib/test/decimaltestdata/ddBase.decTest Lib/test/decimaltestdata/ddCanonical.decTest Lib/test/decimaltestdata/ddClass.decTest Lib/test/decimaltestdata/ddCompare.decTest Lib/test/decimaltestdata/ddCompareSig.decTest Lib/test/decimaltestdata/ddCompareTotal.decTest Lib/test/decimaltestdata/ddCompareTotalMag.decTest Lib/test/decimaltestdata/ddCopy.decTest Lib/test/decimaltestdata/ddCopyAbs.decTest Lib/test/decimaltestdata/ddCopyNegate.decTest Lib/test/decimaltestdata/ddCopySign.decTest Lib/test/decimaltestdata/ddDivide.decTest Lib/test/decimaltestdata/ddDivideInt.decTest Lib/test/decimaltestdata/ddEncode.decTest Lib/test/decimaltestdata/ddFMA.decTest Lib/test/decimaltestdata/ddInvert.decTest Lib/test/decimaltestdata/ddLogB.decTest Lib/test/decimaltestdata/ddMax.decTest Lib/test/decimaltestdata/ddMaxMag.decTest Lib/test/decimaltestdata/ddMin.decTest Lib/test/decimaltestdata/ddMinMag.decTest Lib/test/decimaltestdata/ddMinus.decTest Lib/test/decimaltestdata/ddMultiply.decTest Lib/test/decimaltestdata/ddNextMinus.decTest Lib/test/decimaltestdata/ddNextPlus.decTest Lib/test/decimaltestdata/ddNextToward.decTest Lib/test/decimaltestdata/ddOr.decTest Lib/test/decimaltestdata/ddPlus.decTest Lib/test/decimaltestdata/ddQuantize.decTest Lib/test/decimaltestdata/ddReduce.decTest Lib/test/decimaltestdata/ddRemainder.decTest Lib/test/decimaltestdata/ddRemainderNear.decTest Lib/test/decimaltestdata/ddRotate.decTest Lib/test/decimaltestdata/ddSameQuantum.decTest Lib/test/decimaltestdata/ddScaleB.decTest Lib/test/decimaltestdata/ddShift.decTest Lib/test/decimaltestdata/ddSubtract.decTest Lib/test/decimaltestdata/ddToIntegral.decTest Lib/test/decimaltestdata/ddXor.decTest Lib/test/decimaltestdata/decDouble.decTest Lib/test/decimaltestdata/decQuad.decTest Lib/test/decimaltestdata/decSingle.decTest Lib/test/decimaltestdata/divide.decTest Lib/test/decimaltestdata/divideint.decTest Lib/test/decimaltestdata/dqAbs.decTest Lib/test/decimaltestdata/dqAdd.decTest Lib/test/decimaltestdata/dqAnd.decTest Lib/test/decimaltestdata/dqBase.decTest Lib/test/decimaltestdata/dqCanonical.decTest Lib/test/decimaltestdata/dqClass.decTest Lib/test/decimaltestdata/dqCompare.decTest Lib/test/decimaltestdata/dqCompareSig.decTest Lib/test/decimaltestdata/dqCompareTotal.decTest Lib/test/decimaltestdata/dqCompareTotalMag.decTest Lib/test/decimaltestdata/dqCopy.decTest Lib/test/decimaltestdata/dqCopyAbs.decTest Lib/test/decimaltestdata/dqCopyNegate.decTest Lib/test/decimaltestdata/dqCopySign.decTest Lib/test/decimaltestdata/dqDivide.decTest Lib/test/decimaltestdata/dqDivideInt.decTest Lib/test/decimaltestdata/dqEncode.decTest Lib/test/decimaltestdata/dqFMA.decTest Lib/test/decimaltestdata/dqInvert.decTest Lib/test/decimaltestdata/dqLogB.decTest Lib/test/decimaltestdata/dqMax.decTest Lib/test/decimaltestdata/dqMaxMag.decTest Lib/test/decimaltestdata/dqMin.decTest Lib/test/decimaltestdata/dqMinMag.decTest Lib/test/decimaltestdata/dqMinus.decTest Lib/test/decimaltestdata/dqMultiply.decTest Lib/test/decimaltestdata/dqNextMinus.decTest Lib/test/decimaltestdata/dqNextPlus.decTest Lib/test/decimaltestdata/dqNextToward.decTest Lib/test/decimaltestdata/dqOr.decTest Lib/test/decimaltestdata/dqPlus.decTest Lib/test/decimaltestdata/dqQuantize.decTest Lib/test/decimaltestdata/dqReduce.decTest Lib/test/decimaltestdata/dqRemainder.decTest Lib/test/decimaltestdata/dqRemainderNear.decTest Lib/test/decimaltestdata/dqRotate.decTest Lib/test/decimaltestdata/dqSameQuantum.decTest Lib/test/decimaltestdata/dqScaleB.decTest Lib/test/decimaltestdata/dqShift.decTest Lib/test/decimaltestdata/dqSubtract.decTest Lib/test/decimaltestdata/dqToIntegral.decTest Lib/test/decimaltestdata/dqXor.decTest Lib/test/decimaltestdata/dsBase.decTest Lib/test/decimaltestdata/dsEncode.decTest Lib/test/decimaltestdata/exp.decTest Lib/test/decimaltestdata/fma.decTest Lib/test/decimaltestdata/inexact.decTest Lib/test/decimaltestdata/invert.decTest Lib/test/decimaltestdata/ln.decTest Lib/test/decimaltestdata/log10.decTest Lib/test/decimaltestdata/logb.decTest Lib/test/decimaltestdata/max.decTest Lib/test/decimaltestdata/maxmag.decTest Lib/test/decimaltestdata/min.decTest Lib/test/decimaltestdata/minmag.decTest Lib/test/decimaltestdata/minus.decTest Lib/test/decimaltestdata/multiply.decTest Lib/test/decimaltestdata/nextminus.decTest Lib/test/decimaltestdata/nextplus.decTest Lib/test/decimaltestdata/nexttoward.decTest Lib/test/decimaltestdata/or.decTest Lib/test/decimaltestdata/plus.decTest Lib/test/decimaltestdata/power.decTest Lib/test/decimaltestdata/powersqrt.decTest Lib/test/decimaltestdata/quantize.decTest Lib/test/decimaltestdata/randomBound32.decTest Lib/test/decimaltestdata/randoms.decTest Lib/test/decimaltestdata/reduce.decTest Lib/test/decimaltestdata/remainder.decTest Lib/test/decimaltestdata/remainderNear.decTest Lib/test/decimaltestdata/rescale.decTest Lib/test/decimaltestdata/rotate.decTest Lib/test/decimaltestdata/rounding.decTest Lib/test/decimaltestdata/samequantum.decTest Lib/test/decimaltestdata/scaleb.decTest Lib/test/decimaltestdata/shift.decTest Lib/test/decimaltestdata/squareroot.decTest Lib/test/decimaltestdata/subtract.decTest Lib/test/decimaltestdata/testall.decTest Lib/test/decimaltestdata/tointegral.decTest Lib/test/decimaltestdata/tointegralx.decTest Lib/test/decimaltestdata/xor.decTest Lib/test/exception_hierarchy.txt Lib/test/test_itertools.py Lib/test/test_locale.py Lib/test/test_math.py Lib/test/test_random.py Lib/test/test_robotparser.py Lib/test/test_shelve.py Lib/test/test_unicode.py Lib/test/test_zipfile.py Lib/zipfile.py Misc/NEWS Modules/_bisectmodule.c Modules/_collectionsmodule.c Modules/_ctypes/_ctypes.c Modules/_ctypes/ctypes.h Modules/mathmodule.c Modules/parsermodule.c Objects/enumobject.c Objects/exceptions.c Objects/unicodeobject.c Python/ceval.c Tools/pybench/Calls.py

thomas.lee python-checkins at python.org
Wed Jul 30 22:06:46 CEST 2008


Author: thomas.lee
Date: Wed Jul 30 22:06:40 2008
New Revision: 65314

Log:
Merged revisions 65196-65313 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r65198 | georg.brandl | 2008-07-24 01:16:45 +1000 (Thu, 24 Jul 2008) | 2 lines
  
  3k-warn about parser's "ast" aliases.
........
  r65199 | georg.brandl | 2008-07-24 01:17:09 +1000 (Thu, 24 Jul 2008) | 2 lines
  
  Move opcode handling to Python's extension.
........
  r65205 | georg.brandl | 2008-07-24 02:00:44 +1000 (Thu, 24 Jul 2008) | 2 lines
  
  Use correct indentation.
........
  r65209 | raymond.hettinger | 2008-07-24 10:08:18 +1000 (Thu, 24 Jul 2008) | 1 line
  
  Finish-up the partial conversion from int to Py_ssize_t for deque indices and length.
........
  r65210 | raymond.hettinger | 2008-07-24 10:53:49 +1000 (Thu, 24 Jul 2008) | 1 line
  
  Parse to the correct datatype.
........
  r65211 | benjamin.peterson | 2008-07-24 12:27:46 +1000 (Thu, 24 Jul 2008) | 1 line
  
  fix spacing
........
  r65212 | benjamin.peterson | 2008-07-24 12:31:28 +1000 (Thu, 24 Jul 2008) | 1 line
  
  fix markup
........
  r65213 | benjamin.peterson | 2008-07-24 12:45:37 +1000 (Thu, 24 Jul 2008) | 1 line
  
  add some documentation for 2to3
........
  r65214 | raymond.hettinger | 2008-07-24 15:38:48 +1000 (Thu, 24 Jul 2008) | 1 line
  
  Finish conversion from int to Py_ssize_t.
........
  r65215 | raymond.hettinger | 2008-07-24 17:04:55 +1000 (Thu, 24 Jul 2008) | 1 line
  
  Convert from long to Py_ssize_t.
........
  r65216 | georg.brandl | 2008-07-24 17:09:21 +1000 (Thu, 24 Jul 2008) | 2 lines
  
  Fix indentation.
........
  r65217 | thomas.heller | 2008-07-24 21:16:45 +1000 (Thu, 24 Jul 2008) | 1 line
  
  Make ctypes compatible with Python 2.3, 2.4, and 2.5 again.
........
  r65225 | benjamin.peterson | 2008-07-26 02:55:37 +1000 (Sat, 26 Jul 2008) | 1 line
  
  teach .bzrignore about doc tools
........
  r65226 | benjamin.peterson | 2008-07-26 03:02:11 +1000 (Sat, 26 Jul 2008) | 1 line
  
  document default value for fillvalue
........
  r65227 | antoine.pitrou | 2008-07-26 03:45:59 +1000 (Sat, 26 Jul 2008) | 3 lines
  
  #2242: utf7 decoding crashes on bogus input on some Windows/MSVC versions
........
  r65233 | raymond.hettinger | 2008-07-26 04:43:33 +1000 (Sat, 26 Jul 2008) | 1 line
  
  Issue 1592:  Better error reporting for operations on closed shelves.
........
  r65235 | antoine.pitrou | 2008-07-26 05:42:26 +1000 (Sat, 26 Jul 2008) | 3 lines
  
  #3394: zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix
........
  r65237 | antoine.pitrou | 2008-07-26 06:40:19 +1000 (Sat, 26 Jul 2008) | 3 lines
  
  convert test_locale to unittest, and add a mechanism to override localconv() results for further testing (#1864, #1222)
........
  r65239 | benjamin.peterson | 2008-07-26 07:59:53 +1000 (Sat, 26 Jul 2008) | 1 line
  
  fix indentation
........
  r65240 | antoine.pitrou | 2008-07-26 08:02:07 +1000 (Sat, 26 Jul 2008) | 3 lines
  
  add a pybench test for complex function calls (part of #1819)
........
  r65241 | antoine.pitrou | 2008-07-26 08:13:52 +1000 (Sat, 26 Jul 2008) | 4 lines
  
  Raymond's patch for #1819: speedup function calls with named parameters
  (35% faster according to pybench)
........
  r65242 | antoine.pitrou | 2008-07-26 08:22:08 +1000 (Sat, 26 Jul 2008) | 3 lines
  
  add a NEWS entry
........
  r65244 | antoine.pitrou | 2008-07-26 20:29:43 +1000 (Sat, 26 Jul 2008) | 3 lines
  
  try to fix most buildbot failures on test_locale + add a debug output for the solaris buildbot
........
  r65245 | antoine.pitrou | 2008-07-26 21:56:37 +1000 (Sat, 26 Jul 2008) | 3 lines
  
  Fix more buildbot failures on test_locale.
........
  r65246 | andrew.kuchling | 2008-07-26 23:08:19 +1000 (Sat, 26 Jul 2008) | 1 line
  
  This sentence continues to bug me; rewrite it for the second time
........
  r65247 | andrew.kuchling | 2008-07-26 23:09:06 +1000 (Sat, 26 Jul 2008) | 1 line
  
  Remove extra words
........
  r65248 | antoine.pitrou | 2008-07-26 23:49:13 +1000 (Sat, 26 Jul 2008) | 4 lines
  
  disable some failing tests in test_locale due to a bug in locale.py.
  this should fix the failures on the solaris buildbot.
........
  r65253 | georg.brandl | 2008-07-27 08:13:29 +1000 (Sun, 27 Jul 2008) | 2 lines
  
  Shorten some overlong lines.
........
  r65255 | skip.montanaro | 2008-07-27 10:49:02 +1000 (Sun, 27 Jul 2008) | 3 lines
  
  Close issue 3437 - missing state change when Allow lines are processed.
  Adds test cases which use Allow: as well.
........
  r65256 | skip.montanaro | 2008-07-27 10:50:41 +1000 (Sun, 27 Jul 2008) | 2 lines
  
  note robotparser bug fix.
........
  r65257 | mark.dickinson | 2008-07-27 16:39:07 +1000 (Sun, 27 Jul 2008) | 3 lines
  
  Issue #3449: Update decimal module to use most recent specification
  (v. 1.68) and tests (v. 2.58) from IBM.
........
  r65258 | mark.dickinson | 2008-07-27 17:15:29 +1000 (Sun, 27 Jul 2008) | 4 lines
  
  Remove math.sum tests related to overflow, special values, and behaviour
  near the extremes of the floating-point range.  (The behaviour of math.sum
  should be regarded as undefined in these cases.)
........
  r65259 | benjamin.peterson | 2008-07-28 01:22:14 +1000 (Mon, 28 Jul 2008) | 1 line
  
  clarify Popen argument
........
  r65263 | andrew.kuchling | 2008-07-29 03:04:48 +1000 (Tue, 29 Jul 2008) | 1 line
  
  Clarify wording
........
  r65266 | benjamin.peterson | 2008-07-29 09:35:27 +1000 (Tue, 29 Jul 2008) | 1 line
  
  backport r65264
........
  r65284 | jesus.cea | 2008-07-29 23:38:50 +1000 (Tue, 29 Jul 2008) | 1 line
  
  Refinements in the bsddb testsuite
........
  r65289 | jesus.cea | 2008-07-30 02:16:23 +1000 (Wed, 30 Jul 2008) | 5 lines
  
  Be less strict with replication timeouts (the machine
  can be a bit loaded), and be sure to yield the CPU
  when waiting.
........
  r65292 | mark.dickinson | 2008-07-30 04:45:38 +1000 (Wed, 30 Jul 2008) | 4 lines
  
  More modifications to tests for math.sum:  replace the Python
  version of msum by a version using a different algorithm, and
  use the new float.fromhex method to specify test results exactly.
........
  r65293 | benjamin.peterson | 2008-07-30 05:28:49 +1000 (Wed, 30 Jul 2008) | 1 line
  
  the from __future__ import  with_statement isn't needed in 2.6
........
  r65296 | raymond.hettinger | 2008-07-30 17:27:30 +1000 (Wed, 30 Jul 2008) | 1 line
  
  Neaten-up the itertools recipes.
........
  r65299 | mark.dickinson | 2008-07-30 22:01:41 +1000 (Wed, 30 Jul 2008) | 5 lines
  
  Fix special-value handling for math.sum.
  Also minor cleanups to the code: fix tabbing, remove
  trailing whitespace, and reformat to fit into 80
  columns.
........
  r65307 | benjamin.peterson | 2008-07-30 23:46:53 +1000 (Wed, 30 Jul 2008) | 1 line
  
  getrandombits is actually getrandbits
........
  r65308 | mark.dickinson | 2008-07-31 02:20:10 +1000 (Thu, 31 Jul 2008) | 2 lines
  
  Rename math.sum to math.fsum
........
  r65309 | mark.dickinson | 2008-07-31 02:25:16 +1000 (Thu, 31 Jul 2008) | 3 lines
  
  Replace math.sum with math.fsum in a couple of comments
  that were missed by r65308
........
  r65310 | benjamin.peterson | 2008-07-31 03:45:10 +1000 (Thu, 31 Jul 2008) | 1 line
  
  backport r64751
........
  r65312 | benjamin.peterson | 2008-07-31 05:35:27 +1000 (Thu, 31 Jul 2008) | 1 line
  
  add BufferError to the exception hieracrchy
........


Added:
   python/branches/tlee-ast-optimize/Doc/library/2to3.rst
      - copied unchanged from r65312, /python/trunk/Doc/library/2to3.rst
Modified:
   python/branches/tlee-ast-optimize/   (props changed)
   python/branches/tlee-ast-optimize/.bzrignore
   python/branches/tlee-ast-optimize/Doc/glossary.rst
   python/branches/tlee-ast-optimize/Doc/library/development.rst
   python/branches/tlee-ast-optimize/Doc/library/email.message.rst
   python/branches/tlee-ast-optimize/Doc/library/itertools.rst
   python/branches/tlee-ast-optimize/Doc/library/math.rst
   python/branches/tlee-ast-optimize/Doc/library/parser.rst
   python/branches/tlee-ast-optimize/Doc/library/popen2.rst
   python/branches/tlee-ast-optimize/Doc/library/random.rst
   python/branches/tlee-ast-optimize/Doc/library/stdtypes.rst
   python/branches/tlee-ast-optimize/Doc/library/subprocess.rst
   python/branches/tlee-ast-optimize/Doc/tools/sphinxext/pyspecific.py
   python/branches/tlee-ast-optimize/Doc/tutorial/inputoutput.rst
   python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst
   python/branches/tlee-ast-optimize/Lib/bsddb/test/test_misc.py
   python/branches/tlee-ast-optimize/Lib/bsddb/test/test_replication.py
   python/branches/tlee-ast-optimize/Lib/io.py
   python/branches/tlee-ast-optimize/Lib/locale.py
   python/branches/tlee-ast-optimize/Lib/random.py
   python/branches/tlee-ast-optimize/Lib/robotparser.py
   python/branches/tlee-ast-optimize/Lib/shelve.py
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/abs.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/add.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/and.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/base.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/clamp.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/class.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/compare.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/comparetotal.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/comparetotmag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copy.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copyabs.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copynegate.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copysign.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAbs.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAdd.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAnd.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddBase.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCanonical.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddClass.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompare.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareSig.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareTotal.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareTotalMag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopy.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopyAbs.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopyNegate.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopySign.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddDivide.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddDivideInt.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddEncode.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddFMA.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddInvert.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddLogB.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMax.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMaxMag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMin.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMinMag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMinus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMultiply.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextMinus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextPlus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextToward.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddOr.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddPlus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddQuantize.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddReduce.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRemainder.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRemainderNear.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRotate.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddSameQuantum.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddScaleB.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddShift.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddSubtract.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddToIntegral.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddXor.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decDouble.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decQuad.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decSingle.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/divide.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/divideint.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAbs.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAdd.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAnd.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqBase.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCanonical.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqClass.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompare.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareSig.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareTotal.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareTotalMag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopy.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopyAbs.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopyNegate.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopySign.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqDivide.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqDivideInt.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqEncode.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqFMA.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqInvert.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqLogB.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMax.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMaxMag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMin.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMinMag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMinus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMultiply.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextMinus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextPlus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextToward.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqOr.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqPlus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqQuantize.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqReduce.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRemainder.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRemainderNear.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRotate.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqSameQuantum.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqScaleB.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqShift.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqSubtract.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqToIntegral.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqXor.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dsBase.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dsEncode.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/exp.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/fma.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/inexact.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/invert.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ln.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/log10.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/logb.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/max.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/maxmag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/min.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/minmag.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/minus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/multiply.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nextminus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nextplus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nexttoward.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/or.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/plus.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/power.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/powersqrt.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/quantize.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/randomBound32.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/randoms.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/reduce.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/remainder.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/remainderNear.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rescale.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rotate.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rounding.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/samequantum.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/scaleb.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/shift.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/squareroot.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/subtract.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/testall.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/tointegral.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/tointegralx.decTest
   python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/xor.decTest
   python/branches/tlee-ast-optimize/Lib/test/exception_hierarchy.txt
   python/branches/tlee-ast-optimize/Lib/test/test_itertools.py
   python/branches/tlee-ast-optimize/Lib/test/test_locale.py
   python/branches/tlee-ast-optimize/Lib/test/test_math.py
   python/branches/tlee-ast-optimize/Lib/test/test_random.py
   python/branches/tlee-ast-optimize/Lib/test/test_robotparser.py
   python/branches/tlee-ast-optimize/Lib/test/test_shelve.py
   python/branches/tlee-ast-optimize/Lib/test/test_unicode.py
   python/branches/tlee-ast-optimize/Lib/test/test_zipfile.py
   python/branches/tlee-ast-optimize/Lib/zipfile.py
   python/branches/tlee-ast-optimize/Misc/NEWS
   python/branches/tlee-ast-optimize/Modules/_bisectmodule.c
   python/branches/tlee-ast-optimize/Modules/_collectionsmodule.c
   python/branches/tlee-ast-optimize/Modules/_ctypes/_ctypes.c
   python/branches/tlee-ast-optimize/Modules/_ctypes/ctypes.h
   python/branches/tlee-ast-optimize/Modules/mathmodule.c
   python/branches/tlee-ast-optimize/Modules/parsermodule.c
   python/branches/tlee-ast-optimize/Objects/enumobject.c
   python/branches/tlee-ast-optimize/Objects/exceptions.c
   python/branches/tlee-ast-optimize/Objects/unicodeobject.c
   python/branches/tlee-ast-optimize/Python/ceval.c
   python/branches/tlee-ast-optimize/Tools/pybench/Calls.py

Modified: python/branches/tlee-ast-optimize/.bzrignore
==============================================================================
--- python/branches/tlee-ast-optimize/.bzrignore	(original)
+++ python/branches/tlee-ast-optimize/.bzrignore	Wed Jul 30 22:06:40 2008
@@ -35,11 +35,14 @@
 tags
 TAGS
 .gdb_history
+Doc/tools/sphinx
+Doc/tools/jinja
+Doc/tools/pygments
+Doc/tools/docutils
 Modules/Setup
 Modules/Setup.config
 Modules/Setup.local
 Modules/config.c
 Parser/pgen
-Lib/plat-mac/errors.rsrc.df.rsrc
 Lib/lib2to3/Grammar*.pickle
 Lib/lib2to3/PatternGrammar*.pickle

Modified: python/branches/tlee-ast-optimize/Doc/glossary.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/glossary.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/glossary.rst	Wed Jul 30 22:06:40 2008
@@ -22,7 +22,8 @@
       source and traversing the parse tree.
 
       2to3 is available in the standard library as :mod:`lib2to3`; a standalone
-      entry point is provided as :file:`Tools/scripts/2to3`.
+      entry point is provided as :file:`Tools/scripts/2to3`.  See
+      :ref:`2to3-reference`.
 
    abstract base class
       Abstract Base Classes (abbreviated ABCs) complement :term:`duck-typing` by

Modified: python/branches/tlee-ast-optimize/Doc/library/development.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/development.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/development.rst	Wed Jul 30 22:06:40 2008
@@ -9,7 +9,8 @@
 :mod:`pydoc` module takes a module and generates documentation based on the
 module's contents.  The :mod:`doctest` and :mod:`unittest` modules contains
 frameworks for writing unit tests that automatically exercise code and verify
-that the expected output  is produced.
+that the expected output is produced.  :program:`2to3` can translate Python 2.x
+source code into valid Python 3.x code.
 
 The list of modules described in this chapter is:
 
@@ -19,4 +20,5 @@
    pydoc.rst
    doctest.rst
    unittest.rst
+   2to3.rst
    test.rst

Modified: python/branches/tlee-ast-optimize/Doc/library/email.message.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/email.message.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/email.message.rst	Wed Jul 30 22:06:40 2008
@@ -90,7 +90,7 @@
 
    .. method:: get_payload([i[, decode]])
 
-      Return a reference the current payload, which will be a list of
+      Return the current payload, which will be a list of
       :class:`Message` objects when :meth:`is_multipart` is ``True``, or a
       string when :meth:`is_multipart` is ``False``.  If the payload is a list
       and you mutate the list object, you modify the message's payload in place.

Modified: python/branches/tlee-ast-optimize/Doc/library/itertools.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/itertools.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/itertools.rst	Wed Jul 30 22:06:40 2008
@@ -368,9 +368,10 @@
           except IndexError:
               pass
 
-   If one of the iterables is potentially infinite, then the :func:`izip_longest`
-   function should be wrapped with something that limits the number of calls (for
-   example :func:`islice` or :func:`takewhile`).
+   If one of the iterables is potentially infinite, then the
+   :func:`izip_longest` function should be wrapped with something that limits
+   the number of calls (for example :func:`islice` or :func:`takewhile`).  If
+   not specified, *fillvalue* defaults to ``None``.
 
    .. versionadded:: 2.6
 
@@ -644,13 +645,13 @@
        return izip(a, b)
 
    def grouper(n, iterable, fillvalue=None):
-       "grouper(3, 'abcdefg', 'x') --> ('a','b','c'), ('d','e','f'), ('g','x','x')"
+       "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
        args = [iter(iterable)] * n
        kwds = dict(fillvalue=fillvalue)
        return izip_longest(*args, **kwds)
 
    def roundrobin(*iterables):
-       "roundrobin('abc', 'd', 'ef') --> 'a', 'd', 'e', 'b', 'f', 'c'"
+       "roundrobin('ABC', 'D', 'EF') --> A D E B F C"
        # Recipe credited to George Sakkis
        pending = len(iterables)
        nexts = cycle(iter(it).next for it in iterables)
@@ -670,22 +671,20 @@
            yield set(x for m, x in pairs if m&n)
 
    def compress(data, selectors):
-       "compress('abcdef', [1,0,1,0,1,1]) --> a c e f"
-       decorated = izip(data, selectors)
-       filtered =  ifilter(operator.itemgetter(1), decorated)
-       return imap(operator.itemgetter(0), filtered)
-
-    def combinations_with_replacement(iterable, r):
-        "combinations_with_replacement('ABC', 3) --> AA AB AC BB BC CC"
-        pool = tuple(iterable)
-        n = len(pool)
-        indices = [0] * r
-        yield tuple(pool[i] for i in indices)
-        while 1:
-            for i in reversed(range(r)):
-                if indices[i] != n - 1:
-                    break
-            else:
-                return
-            indices[i:] = [indices[i] + 1] * (r - i)
-            yield tuple(pool[i] for i in indices)
+       "compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F"
+       return (d for d, s in izip(data, selectors) if s)
+
+   def combinations_with_replacement(iterable, r):
+       "combinations_with_replacement('ABC', 3) --> AA AB AC BB BC CC"
+       pool = tuple(iterable)
+       n = len(pool)
+       indices = [0] * r
+       yield tuple(pool[i] for i in indices)
+       while 1:
+           for i in reversed(range(r)):
+               if indices[i] != n - 1:
+                   break
+           else:
+               return
+           indices[i:] = [indices[i] + 1] * (r - i)
+           yield tuple(pool[i] for i in indices)

Modified: python/branches/tlee-ast-optimize/Doc/library/math.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/math.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/math.rst	Wed Jul 30 22:06:40 2008
@@ -83,6 +83,16 @@
    apart" the internal representation of a float in a portable way.
 
 
+.. function:: fsum(iterable)
+
+   Return an accurate floating point sum of values in the iterable.  Avoids
+   loss of precision by tracking multiple intermediate partial sums.  The
+   algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the
+   typical case where the rounding mode is half-even.
+
+   .. versionadded:: 2.6
+
+
 .. function:: isinf(x)
 
    Checks if the float *x* is positive or negative infinite.
@@ -112,16 +122,6 @@
    *x*, and both are floats.
 
 
-.. function:: sum(iterable)
-
-   Return an accurate floating point sum of values in the iterable.  Avoids
-   loss of precision by tracking multiple intermediate partial sums.  The
-   algorithm's accuracy depends on IEEE-754 arithmetic guarantees and the
-   typical case where the rounding mode is half-even.
-
-   .. versionadded:: 2.6
-
-
 .. function:: trunc(x)
 
    Return the :class:`Real` value *x* truncated to an :class:`Integral` (usually

Modified: python/branches/tlee-ast-optimize/Doc/library/parser.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/parser.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/parser.rst	Wed Jul 30 22:06:40 2008
@@ -34,6 +34,7 @@
    replaced by "ast"; this is a legacy from the time when there was no other
    AST and has nothing to do with the AST found in Python 2.5.  This is also the
    reason for the functions' keyword arguments being called *ast*, not *st*.
+   The "ast" functions will be removed in Python 3.0.
 
 There are a few things to note about this module which are important to making
 use of the data structures created.  This is not a tutorial on editing the parse

Modified: python/branches/tlee-ast-optimize/Doc/library/popen2.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/popen2.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/popen2.rst	Wed Jul 30 22:06:40 2008
@@ -149,7 +149,7 @@
 can occur.  A similar situation can occur with other combinations of reads and
 writes.  The essential factors are that more than :const:`_PC_PIPE_BUF` bytes
 are being written by one process in a blocking fashion, while the other process
-is reading from the other process, also in a blocking fashion.
+is reading from the first process, also in a blocking fashion.
 
 .. Example explanation and suggested work-arounds substantially stolen
    from Martin von Löwis:

Modified: python/branches/tlee-ast-optimize/Doc/library/random.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/random.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/random.rst	Wed Jul 30 22:06:40 2008
@@ -36,11 +36,11 @@
 Class :class:`Random` can also be subclassed if you want to use a different
 basic generator of your own devising: in that case, override the :meth:`random`,
 :meth:`seed`, :meth:`getstate`, :meth:`setstate` and :meth:`jumpahead` methods.
-Optionally, a new generator can supply a :meth:`getrandombits` method --- this
+Optionally, a new generator can supply a :meth:`getrandbits` method --- this
 allows :meth:`randrange` to produce selections over an arbitrarily large range.
 
 .. versionadded:: 2.4
-   the :meth:`getrandombits` method.
+   the :meth:`getrandbits` method.
 
 As an example of subclassing, the :mod:`random` module provides the
 :class:`WichmannHill` class that implements an alternative generator in pure

Modified: python/branches/tlee-ast-optimize/Doc/library/stdtypes.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/stdtypes.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/stdtypes.rst	Wed Jul 30 22:06:40 2008
@@ -2039,7 +2039,7 @@
    the :keyword:`with` statement.  For example, the following code will
    automatically close *f* when the :keyword:`with` block is exited::
 
-      from __future__ import with_statement
+      from __future__ import with_statement # This isn't required in Python 2.6
 
       with open("hello.txt") as f:
           for line in f:
@@ -2127,8 +2127,9 @@
    returned, even if no *size* parameter was given.
 
    .. note::
-      As this function depends on the underlying  :cfunc:`fread` C function,
-      it will behave the same in details such as caching EOF.
+      This function is simply a wrapper for the underlying
+      :cfunc:`fread` C function, and will behave the same in corner cases,
+      such as whether the EOF value is cached.
 
 
 .. method:: file.readline([size])

Modified: python/branches/tlee-ast-optimize/Doc/library/subprocess.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/subprocess.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/subprocess.rst	Wed Jul 30 22:06:40 2008
@@ -38,9 +38,10 @@
 
    Arguments are:
 
-   *args* should be a string, or a sequence of program arguments.  The program to
-   execute is normally the first item in the args sequence or string, but can be
-   explicitly set by using the executable argument.
+   *args* should be a string, or a sequence of program arguments.  The program
+   to execute is normally the first item in the args sequence or the string if a
+   string is given, but can be explicitly set by using the *executable*
+   argument.
 
    On Unix, with *shell=False* (default): In this case, the Popen class uses
    :meth:`os.execvp` to execute the child program. *args* should normally be a

Modified: python/branches/tlee-ast-optimize/Doc/tools/sphinxext/pyspecific.py
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/tools/sphinxext/pyspecific.py	(original)
+++ python/branches/tlee-ast-optimize/Doc/tools/sphinxext/pyspecific.py	Wed Jul 30 22:06:40 2008
@@ -85,6 +85,28 @@
             f.close()
 
 
+# Support for documenting Opcodes
+
+import re
+from sphinx import addnodes
+
+opcode_sig_re = re.compile(r'(\w+(?:\+\d)?)\s*\((.*)\)')
+
+def parse_opcode_signature(env, sig, signode):
+    """Transform an opcode signature into RST nodes."""
+    m = opcode_sig_re.match(sig)
+    if m is None:
+        raise ValueError
+    opname, arglist = m.groups()
+    signode += addnodes.desc_name(opname, opname)
+    paramlist = addnodes.desc_parameterlist()
+    signode += paramlist
+    paramlist += addnodes.desc_parameter(arglist, arglist)
+    return opname.strip()
+
+
 def setup(app):
     app.add_role('issue', issue_role)
     app.add_builder(PydocTopicsBuilder)
+    app.add_description_unit('opcode', 'opcode', '%s (opcode)',
+                             parse_opcode_signature)

Modified: python/branches/tlee-ast-optimize/Doc/tutorial/inputoutput.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/tutorial/inputoutput.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/tutorial/inputoutput.rst	Wed Jul 30 22:06:40 2008
@@ -143,12 +143,14 @@
 If keyword arguments are used in the format method, their values are referred to
 by using the name of the argument. ::
 
-   >>> print 'This {food} is {adjective}.'.format(food='spam', adjective='absolutely horrible')
+   >>> print 'This {food} is {adjective}.'.format(
+   ...       food='spam', adjective='absolutely horrible')
    This spam is absolutely horrible.
 
 Positional and keyword arguments can be arbitrarily combined::
 
-   >>> print 'The story of {0}, {1}, and {other}.'.format('Bill', 'Manfred', other='Georg')
+   >>> print 'The story of {0}, {1}, and {other}.'.format('Bill', 'Manfred',
+   ...                                                    other='Georg')
    The story of Bill, Manfred, and Georg.
 
 An optional ``':``` and format specifier can follow the field name. This also
@@ -176,7 +178,8 @@
 square brackets ``'[]'`` to access the keys ::
 
    >>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678}
-   >>> print 'Jack: {0[Jack]:d}; Sjoerd: {0[Sjoerd]:d}; Dcab: {0[Dcab]:d}'.format(table)
+   >>> print ('Jack: {0[Jack]:d}; Sjoerd: {0[Sjoerd]:d}; '
+   ...        'Dcab: {0[Dcab]:d}'.format(table))
    Jack: 4098; Sjoerd: 4127; Dcab: 8637678
 
 This could also be done by passing the table as keyword arguments with the '**'

Modified: python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/whatsnew/2.6.rst	Wed Jul 30 22:06:40 2008
@@ -1144,7 +1144,7 @@
 ABC that can describe an existing type or class, or if you want
 to declare that some third-party class implements an ABC.
 For example, if you defined a :class:`PrintableType` ABC,
-it's legal to do:
+it's legal to do::
 
   # Register Python's types
   PrintableType.register(int)
@@ -1537,7 +1537,7 @@
   * :func:`~math.factorial` computes the factorial of a number.
     (Contributed by Raymond Hettinger; :issue:`2138`.)
 
-  * :func:`~math.sum` adds up the stream of numbers from an iterable,
+  * :func:`~math.fsum` adds up the stream of numbers from an iterable,
     and is careful to avoid loss of precision by calculating partial sums.
     (Contributed by Jean Brouwers, Raymond Hettinger, and Mark Dickinson;
     :issue:`2819`.)

Modified: python/branches/tlee-ast-optimize/Lib/bsddb/test/test_misc.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/bsddb/test/test_misc.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/bsddb/test/test_misc.py	Wed Jul 30 22:06:40 2008
@@ -77,7 +77,7 @@
             # double free happened during exit from DBC_get
         finally:
             db1.close()
-            os.unlink(self.filename)
+            test_support.unlink(self.filename)
 
     def test06_key_with_null_bytes(self):
         try:
@@ -96,7 +96,7 @@
             self.assertEqual(db1['aaa'], 'eh eh eh!')
         finally:
             db1.close()
-            os.unlink(self.filename)
+            test_support.unlink(self.filename)
 
     def test07_DB_set_flags_persists(self):
         if db.version() < (4,2):
@@ -124,7 +124,7 @@
             self.assertEqual([('a', 'new A')], db1.items())
         finally:
             db1.close()
-            os.unlink(self.filename)
+            test_support.unlink(self.filename)
 
 
 #----------------------------------------------------------------------

Modified: python/branches/tlee-ast-optimize/Lib/bsddb/test/test_replication.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/bsddb/test/test_replication.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/bsddb/test/test_replication.py	Wed Jul 30 22:06:40 2008
@@ -128,7 +128,7 @@
         # is not generated if the master has no new transactions.
         # This is solved in BDB 4.6 (#15542).
         import time
-        timeout = time.time()+2
+        timeout = time.time()+10
         while (time.time()<timeout) and not (self.confirmed_master and self.client_startupdone) :
             time.sleep(0.02)
         self.assertTrue(time.time()<timeout)
@@ -181,22 +181,28 @@
         self.dbMaster.put("ABC", "123", txn=txn)
         txn.commit()
         import time
-        timeout=time.time()+1
+        timeout=time.time()+10
         v=None
         while (time.time()<timeout) and (v==None) :
             txn=self.dbenvClient.txn_begin()
             v=self.dbClient.get("ABC", txn=txn)
             txn.commit()
+            if v==None :
+                time.sleep(0.02)
+        self.assertTrue(time.time()<timeout)
         self.assertEquals("123", v)
 
         txn=self.dbenvMaster.txn_begin()
         self.dbMaster.delete("ABC", txn=txn)
         txn.commit()
-        timeout=time.time()+1
+        timeout=time.time()+10
         while (time.time()<timeout) and (v!=None) :
             txn=self.dbenvClient.txn_begin()
             v=self.dbClient.get("ABC", txn=txn)
             txn.commit()
+            if v==None :
+                time.sleep(0.02)
+        self.assertTrue(time.time()<timeout)
         self.assertEquals(None, v)
 
 class DBBaseReplication(DBReplicationManager):
@@ -297,7 +303,7 @@
         # is not generated if the master has no new transactions.
         # This is solved in BDB 4.6 (#15542).
         import time
-        timeout = time.time()+2
+        timeout = time.time()+10
         while (time.time()<timeout) and not (self.confirmed_master and
                 self.client_startupdone) :
             time.sleep(0.02)
@@ -333,22 +339,28 @@
         self.dbMaster.put("ABC", "123", txn=txn)
         txn.commit()
         import time
-        timeout=time.time()+1
+        timeout=time.time()+10
         v=None
         while (time.time()<timeout) and (v==None) :
             txn=self.dbenvClient.txn_begin()
             v=self.dbClient.get("ABC", txn=txn)
             txn.commit()
+            if v==None :
+                time.sleep(0.02)
+        self.assertTrue(time.time()<timeout)
         self.assertEquals("123", v)
 
         txn=self.dbenvMaster.txn_begin()
         self.dbMaster.delete("ABC", txn=txn)
         txn.commit()
-        timeout=time.time()+1
+        timeout=time.time()+10
         while (time.time()<timeout) and (v!=None) :
             txn=self.dbenvClient.txn_begin()
             v=self.dbClient.get("ABC", txn=txn)
             txn.commit()
+            if v==None :
+                time.sleep(0.02)
+        self.assertTrue(time.time()<timeout)
         self.assertEquals(None, v)
 
     if db.version() >= (4,7) :

Modified: python/branches/tlee-ast-optimize/Lib/io.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/io.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/io.py	Wed Jul 30 22:06:40 2008
@@ -906,8 +906,12 @@
         """
         raw._checkReadable()
         _BufferedIOMixin.__init__(self, raw)
-        self._read_buf = b""
         self.buffer_size = buffer_size
+        self._reset_read_buf()
+
+    def _reset_read_buf(self):
+        self._read_buf = b""
+        self._read_pos = 0
 
     def read(self, n=None):
         """Read n bytes.
@@ -917,25 +921,50 @@
         mode. If n is negative, read until EOF or until read() would
         block.
         """
-        if n is None:
-            n = -1
         nodata_val = b""
-        while n < 0 or len(self._read_buf) < n:
-            to_read = max(self.buffer_size,
-                          n if n is not None else 2*len(self._read_buf))
-            current = self.raw.read(to_read)
-            if current in (b"", None):
-                nodata_val = current
+        empty_values = (b"", None)
+        buf = self._read_buf
+        pos = self._read_pos
+
+        # Special case for when the number of bytes to read is unspecified.
+        if n is None or n == -1:
+            self._reset_read_buf()
+            chunks = [buf[pos:]]  # Strip the consumed bytes.
+            current_size = 0
+            while True:
+                # Read until EOF or until read() would block.
+                chunk = self.raw.read()
+                if chunk in empty_values:
+                    nodata_val = chunk
+                    break
+                current_size += len(chunk)
+                chunks.append(chunk)
+            return b"".join(chunks) or nodata_val
+
+        # The number of bytes to read is specified, return at most n bytes.
+        avail = len(buf) - pos  # Length of the available buffered data.
+        if n <= avail:
+            # Fast path: the data to read is fully buffered.
+            self._read_pos += n
+            return buf[pos:pos+n]
+        # Slow path: read from the stream until enough bytes are read,
+        # or until an EOF occurs or until read() would block.
+        chunks = [buf[pos:]]
+        wanted = max(self.buffer_size, n)
+        while avail < n:
+            chunk = self.raw.read(wanted)
+            if chunk in empty_values:
+                nodata_val = chunk
                 break
-            self._read_buf += current
-        if self._read_buf:
-            if n < 0:
-                n = len(self._read_buf)
-            out = self._read_buf[:n]
-            self._read_buf = self._read_buf[n:]
-        else:
-            out = nodata_val
-        return out
+            avail += len(chunk)
+            chunks.append(chunk)
+        # n is more then avail only when an EOF occurred or when
+        # read() would have blocked.
+        n = min(n, avail)
+        out = b"".join(chunks)
+        self._read_buf = out[n:]  # Save the extra data in the buffer.
+        self._read_pos = 0
+        return out[:n] if out else nodata_val
 
     def peek(self, n=0):
         """Returns buffered bytes without advancing the position.
@@ -945,13 +974,14 @@
         than self.buffer_size.
         """
         want = min(n, self.buffer_size)
-        have = len(self._read_buf)
+        have = len(self._read_buf) - self._read_pos
         if have < want:
             to_read = self.buffer_size - have
             current = self.raw.read(to_read)
             if current:
-                self._read_buf += current
-        return self._read_buf
+                self._read_buf = self._read_buf[self._read_pos:] + current
+                self._read_pos = 0
+        return self._read_buf[self._read_pos:]
 
     def read1(self, n):
         """Reads up to n bytes, with at most one read() system call."""
@@ -960,16 +990,16 @@
         if n <= 0:
             return b""
         self.peek(1)
-        return self.read(min(n, len(self._read_buf)))
+        return self.read(min(n, len(self._read_buf) - self._read_pos))
 
     def tell(self):
-        return self.raw.tell() - len(self._read_buf)
+        return self.raw.tell() - len(self._read_buf) + self._read_pos
 
     def seek(self, pos, whence=0):
         if whence == 1:
-            pos -= len(self._read_buf)
+            pos -= len(self._read_buf) - self._read_pos
         pos = self.raw.seek(pos, whence)
-        self._read_buf = b""
+        self._reset_read_buf()
         return pos
 
 
@@ -1138,14 +1168,14 @@
         # First do the raw seek, then empty the read buffer, so that
         # if the raw seek fails, we don't lose buffered data forever.
         pos = self.raw.seek(pos, whence)
-        self._read_buf = b""
+        self._reset_read_buf()
         return pos
 
     def tell(self):
-        if (self._write_buf):
+        if self._write_buf:
             return self.raw.tell() + len(self._write_buf)
         else:
-            return self.raw.tell() - len(self._read_buf)
+            return BufferedReader.tell(self)
 
     def truncate(self, pos=None):
         if pos is None:
@@ -1174,8 +1204,9 @@
 
     def write(self, b):
         if self._read_buf:
-            self.raw.seek(-len(self._read_buf), 1) # Undo readahead
-            self._read_buf = b""
+            # Undo readahead
+            self.raw.seek(self._read_pos - len(self._read_buf), 1)
+            self._reset_read_buf()
         return BufferedWriter.write(self, b)
 
 

Modified: python/branches/tlee-ast-optimize/Lib/locale.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/locale.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/locale.py	Wed Jul 30 22:06:40 2008
@@ -12,6 +12,7 @@
 """
 
 import sys, encodings, encodings.aliases
+import functools
 
 # Try importing the _locale module.
 #
@@ -87,6 +88,21 @@
         """
         return s
 
+
+_localeconv = localeconv
+
+# With this dict, you can override some items of localeconv's return value.
+# This is useful for testing purposes.
+_override_localeconv = {}
+
+ at functools.wraps(_localeconv)
+def localeconv():
+    d = _localeconv()
+    if _override_localeconv:
+        d.update(_override_localeconv)
+    return d
+
+
 ### Number formatting APIs
 
 # Author: Martin von Loewis

Modified: python/branches/tlee-ast-optimize/Lib/random.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/random.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/random.py	Wed Jul 30 22:06:40 2008
@@ -79,9 +79,9 @@
 
     Class Random can also be subclassed if you want to use a different basic
     generator of your own devising: in that case, override the following
-    methods:  random(), seed(), getstate(), setstate() and jumpahead().
-    Optionally, implement a getrandombits() method so that randrange()
-    can cover arbitrarily large ranges.
+    methods: random(), seed(), getstate(), setstate() and jumpahead().
+    Optionally, implement a getrandbits() method so that randrange() can cover
+    arbitrarily large ranges.
 
     """
 

Modified: python/branches/tlee-ast-optimize/Lib/robotparser.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/robotparser.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/robotparser.py	Wed Jul 30 22:06:40 2008
@@ -76,6 +76,10 @@
         """parse the input lines from a robots.txt file.
            We allow that a user-agent: line is not preceded by
            one or more blank lines."""
+        # states:
+        #   0: start state
+        #   1: saw user-agent line
+        #   2: saw an allow or disallow line
         state = 0
         linenumber = 0
         entry = Entry()
@@ -114,6 +118,7 @@
                 elif line[0] == "allow":
                     if state != 0:
                         entry.rulelines.append(RuleLine(line[1], True))
+                        state = 2
         if state == 2:
             self.entries.append(entry)
 

Modified: python/branches/tlee-ast-optimize/Lib/shelve.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/shelve.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/shelve.py	Wed Jul 30 22:06:40 2008
@@ -73,6 +73,16 @@
 
 __all__ = ["Shelf","BsdDbShelf","DbfilenameShelf","open"]
 
+class _ClosedDict(UserDict.DictMixin):
+    'Marker for a closed dict.  Access attempts raise a ValueError.'
+
+    def closed(self, *args):
+        raise ValueError('invalid operation on closed shelf')
+    __getitem__ = __setitem__ = __delitem__ = keys = closed
+
+    def __repr__(self):
+        return '<Closed Dictionary>'
+
 class Shelf(UserDict.DictMixin):
     """Base class for shelf implementations.
 
@@ -136,7 +146,7 @@
             self.dict.close()
         except AttributeError:
             pass
-        self.dict = 0
+        self.dict = _ClosedDict()
 
     def __del__(self):
         if not hasattr(self, 'writeback'):

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/abs.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/abs.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/abs.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- abs.decTest -- decimal absolute value                              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests primarily tests the existence of the operator.
 -- Additon, subtraction, rounding, and more overflows are tested

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/add.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/add.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/add.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------/cancell----------------------------------------------------------
 -- add.decTest -- decimal addition                                    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   9
 rounding:    half_up

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/and.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/and.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/and.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- and.decTest -- digitwise logical AND                               --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/base.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/base.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/base.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- base.decTest -- base decimal <--> string conversions               --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 extended:    1
 
 -- This file tests base conversions from string to a decimal number

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/clamp.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/clamp.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/clamp.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- clamp.decTest -- clamped exponent tests (format-independent)       --
--- Copyright (c) IBM Corporation, 2000, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2000, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests uses the same limits as the 8-byte concrete
 -- representation, but applies clamping without using format-specific

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/class.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/class.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/class.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- class.decTest -- Class operations                                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- [New 2006.11.27]
 

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/compare.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/compare.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/compare.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- compare.decTest -- decimal comparison that allows quiet NaNs       --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/comparetotal.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/comparetotal.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/comparetotal.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- comparetotal.decTest -- decimal comparison using total ordering    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/comparetotmag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/comparetotmag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/comparetotmag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- comparetotmag.decTest -- decimal comparison, abs. total ordering   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that it cannot be assumed that add/subtract tests cover paths
 -- for this operation adequately, here, because the code might be

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copy.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copy.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copy.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- copy.decTest -- quiet copy                                         --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copyabs.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copyabs.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copyabs.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- copyAbs.decTest -- quiet copy and set sign to zero                 --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copynegate.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copynegate.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copynegate.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- copyNegate.decTest -- quiet copy and negate                        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copysign.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copysign.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/copysign.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- copysign.decTest -- quiet copy with sign from rhs                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAbs.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAbs.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAbs.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddAbs.decTest -- decDouble absolute value, heeding sNaN            --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAdd.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAdd.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAdd.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddAdd.decTest -- decDouble addition                                --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests are for decDoubles only; all arguments are
 -- representable in a decDouble
@@ -415,6 +415,31 @@
 ddadd435 add  77e-19      10   ->  10.00000000000000 Inexact Rounded
 ddadd436 add  77e-299     10   ->  10.00000000000000 Inexact Rounded
 
+-- fastpath boundary (more in dqadd)
+--            1234567890123456
+ddadd539 add '4444444444444444'  '3333333333333333' -> '7777777777777777'
+ddadd540 add '4444444444444444'  '4444444444444444' -> '8888888888888888'
+ddadd541 add '4444444444444444'  '5555555555555555' -> '9999999999999999'
+ddadd542 add '3333333333333333'  '4444444444444444' -> '7777777777777777'
+ddadd543 add '4444444444444444'  '4444444444444444' -> '8888888888888888'
+ddadd544 add '5555555555555555'  '4444444444444444' -> '9999999999999999'
+ddadd545 add '3000004000000000'  '3000000000000040' -> '6000004000000040'
+ddadd546 add '3000000400000000'  '4000000000000400' -> '7000000400000400'
+ddadd547 add '3000000040000000'  '5000000000004000' -> '8000000040004000'
+ddadd548 add '4000000004000000'  '3000000000040000' -> '7000000004040000'
+ddadd549 add '4000000000400000'  '4000000000400000' -> '8000000000800000'
+ddadd550 add '4000000000040000'  '5000000004000000' -> '9000000004040000'
+ddadd551 add '5000000000004000'  '3000000040000000' -> '8000000040004000'
+ddadd552 add '5000000000000400'  '4000000400000000' -> '9000000400000400'
+ddadd553 add '5000000000000040'  '5000004000000000' -> 1.000000400000004E+16 Rounded
+-- check propagation
+ddadd554 add '8999999999999999'  '0000000000000001' -> 9000000000000000
+ddadd555 add '0000000000000001'  '8999999999999999' -> 9000000000000000
+ddadd556 add '0999999999999999'  '0000000000000001' -> 1000000000000000
+ddadd557 add '0000000000000001'  '0999999999999999' -> 1000000000000000
+ddadd558 add '4444444444444444'  '4555555555555556' -> 9000000000000000
+ddadd559 add '4555555555555556'  '4444444444444444' -> 9000000000000000
+
 -- negative ulps
 ddadd6440 add   1   -77e-14      ->  0.99999999999923
 ddadd6441 add   1   -77e-15      ->  0.999999999999923
@@ -740,6 +765,9 @@
 ddadd7575 add  1E-383 -1E-398 ->  9.99999999999999E-384  Subnormal
 ddadd7576 add -1E-383 +1E-398 -> -9.99999999999999E-384  Subnormal
 
+-- and another curious case
+ddadd7577 add 7.000000000000E-385 -1.00000E-391 -> 6.999999000000E-385 Subnormal
+
 -- check overflow edge case
 --               1234567890123456
 ddadd7972 apply   9.999999999999999E+384         -> 9.999999999999999E+384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAnd.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAnd.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddAnd.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddAnd.decTest -- digitwise logical AND for decDoubles              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddBase.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddBase.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddBase.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddBase.decTest -- base decDouble <--> string conversions           --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This file tests base conversions from string to a decimal number
 -- and back to a string (in Scientific form)
@@ -1078,6 +1078,14 @@
 ddbas1042 toSci     1.1111111111152445E-384 ->  1.11111111111524E-384 Inexact Rounded Subnormal Underflow
 ddbas1043 toSci     1.1111111111152446E-384 ->  1.11111111111524E-384 Inexact Rounded Subnormal Underflow
 
+-- clamped large normals
+ddbas1070 toSci   1E+369  ->  1E+369
+ddbas1071 toSci   1E+370  ->  1.0E+370  Clamped
+ddbas1072 toSci   1E+378  ->  1.000000000E+378  Clamped
+ddbas1073 toSci   1E+384  ->  1.000000000000000E+384  Clamped
+ddbas1074 toSci   1E+385  ->  Infinity Overflow Inexact Rounded
+
+
 -- clamped zeros [see also clamp.decTest]
 ddbas1075 toSci   0e+10000  ->  0E+369  Clamped
 ddbas1076 toSci   0e-10000  ->  0E-398  Clamped

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCanonical.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCanonical.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCanonical.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCanonical.decTest -- test decDouble canonical results            --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This file tests that copy operations leave uncanonical operands
 -- unchanged, and vice versa

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddClass.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddClass.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddClass.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddClass.decTest -- decDouble Class operations                      --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- [New 2006.11.27]
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompare.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompare.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompare.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCompare.decTest -- decDouble comparison that allows quiet NaNs   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareSig.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareSig.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareSig.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCompareSig.decTest -- decDouble comparison; all NaNs signal      --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareTotal.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareTotal.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareTotal.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCompareTotal.decTest -- decDouble comparison using total ordering--
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareTotalMag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareTotalMag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCompareTotalMag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCompareTotalMag.decTest -- decDouble comparison; abs. total order--
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopy.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopy.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopy.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCopy.decTest -- quiet decDouble copy                             --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopyAbs.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopyAbs.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopyAbs.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCopyAbs.decTest -- quiet decDouble copy and set sign to zero     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopyNegate.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopyNegate.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopyNegate.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCopyNegate.decTest -- quiet decDouble copy and negate            --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopySign.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopySign.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddCopySign.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddCopySign.decTest -- quiet decDouble copy with sign from rhs      --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddDivide.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddDivide.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddDivide.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddDivide.decTest -- decDouble division                             --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddDivideInt.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddDivideInt.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddDivideInt.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddDivideInt.decTest -- decDouble integer division                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddEncode.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddEncode.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddEncode.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddEncode.decTest -- decimal eight-byte format testcases            --
--- Copyright (c) IBM Corporation, 2000, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2000, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -18,7 +18,7 @@
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
 -- [Previously called decimal64.decTest]
-version: 2.57
+version: 2.58
 
 -- This set of tests is for the eight-byte concrete representation.
 -- Its characteristics are:
@@ -488,3 +488,8 @@
 
 -- for narrowing
 decd840 apply  #2870000000000000 ->  2.000000000000000E-99
+
+-- some miscellaneous
+decd850 apply  #0004070000000000 -> 7.000000000000E-385  Subnormal
+decd851 apply  #0008000000020000 -> 1.00000E-391         Subnormal
+

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddFMA.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddFMA.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddFMA.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddFMA.decTest -- decDouble Fused Multiply Add                      --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddInvert.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddInvert.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddInvert.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddInvert.decTest -- digitwise logical INVERT for decDoubles        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddLogB.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddLogB.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddLogB.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddLogB.decTest -- integral 754r adjusted exponent, for decDoubles  --
--- Copyright (c) IBM Corporation, 2005, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2005, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMax.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMax.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMax.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddMax.decTest -- decDouble maxnum                                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMaxMag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMaxMag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMaxMag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddMaxMag.decTest -- decDouble maxnummag                            --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMin.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMin.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMin.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddMin.decTest -- decDouble minnum                                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMinMag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMinMag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMinMag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddMinMag.decTest -- decDouble minnummag                            --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMinus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMinus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMinus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddMinus.decTest -- decDouble 0-x                                   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMultiply.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMultiply.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddMultiply.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddMultiply.decTest -- decDouble multiplication                     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests are for decDoubles only; all arguments are
 -- representable in a decDouble
@@ -167,6 +167,8 @@
 -- tryzeros cases
 ddmul504  multiply  0E-260 1000E-260  -> 0E-398 Clamped
 ddmul505  multiply  100E+260 0E+260   -> 0E+369 Clamped
+-- 65K-1 case
+ddmul506 multiply 77.1 850 -> 65535.0
 
 -- mixed with zeros
 ddmul541 multiply  0    -1     -> -0
@@ -441,18 +443,28 @@
 --                                                        1 234567890123456
 ddmul900 multiply  0.3000000000E-191 0.3000000000E-191 -> 9.00000000000000E-384 Subnormal Rounded
 ddmul901 multiply  0.3000000001E-191 0.3000000001E-191 -> 9.00000000600000E-384 Underflow Inexact Subnormal Rounded
-ddmul902 multiply  9.999999999999999E-383  0.0999999999999         -> 9.99999999999000E-384 Underflow Inexact Subnormal Rounded
-ddmul903 multiply  9.999999999999999E-383  0.09999999999999        -> 9.99999999999900E-384 Underflow Inexact Subnormal Rounded
-ddmul904 multiply  9.999999999999999E-383  0.099999999999999       -> 9.99999999999990E-384 Underflow Inexact Subnormal Rounded
-ddmul905 multiply  9.999999999999999E-383  0.0999999999999999      -> 9.99999999999999E-384 Underflow Inexact Subnormal Rounded
--- prove operands are exact
-ddmul906 multiply  9.999999999999999E-383  1                       -> 9.999999999999999E-383
-ddmul907 multiply                       1  0.09999999999999999     -> 0.09999999999999999
--- the next rounds to Nmin
-ddmul908 multiply  9.999999999999999E-383  0.09999999999999999     -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
+ddmul902 multiply  9.999999999999999E-383  0.0999999999999    -> 9.99999999999000E-384 Underflow Inexact Subnormal Rounded
+ddmul903 multiply  9.999999999999999E-383  0.09999999999999   -> 9.99999999999900E-384 Underflow Inexact Subnormal Rounded
+ddmul904 multiply  9.999999999999999E-383  0.099999999999999  -> 9.99999999999990E-384 Underflow Inexact Subnormal Rounded
+ddmul905 multiply  9.999999999999999E-383  0.0999999999999999 -> 9.99999999999999E-384 Underflow Inexact Subnormal Rounded
+-- The next rounds to Nmin (b**emin); this is the distinguishing case
+-- for detecting tininess (before or after rounding) -- if after
+-- rounding then the result would be the same, but the Underflow flag
+-- would not be set
+ddmul906 multiply  9.999999999999999E-383  0.09999999999999999     -> 1.000000000000000E-383 Underflow Inexact Subnormal Rounded
+-- prove those operands were exact
+ddmul907 multiply  9.999999999999999E-383  1                       -> 9.999999999999999E-383
+ddmul908 multiply                       1  0.09999999999999999     -> 0.09999999999999999
+
+-- reducing tiniest
+ddmul910 multiply 1e-398 0.99 -> 1E-398 Subnormal Inexact Rounded Underflow
+ddmul911 multiply 1e-398 0.75 -> 1E-398 Subnormal Inexact Rounded Underflow
+ddmul912 multiply 1e-398 0.5  -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
+ddmul913 multiply 1e-398 0.25 -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
+ddmul914 multiply 1e-398 0.01 -> 0E-398 Subnormal Inexact Rounded Underflow Clamped
 
 -- hugest
-ddmul909 multiply  9999999999999999 9999999999999999 -> 9.999999999999998E+31 Inexact Rounded
+ddmul920 multiply  9999999999999999 9999999999999999 -> 9.999999999999998E+31 Inexact Rounded
 
 -- power-of-ten edge cases
 ddmul1001 multiply  1      10               -> 10
@@ -535,12 +547,7 @@
 ddmul1098 multiply  10000   99999999999     ->  999999999990000
 
 
-
-
 -- Null tests
 ddmul9990 multiply 10  # -> NaN Invalid_operation
 ddmul9991 multiply  # 10 -> NaN Invalid_operation
 
-
-
-

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextMinus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextMinus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextMinus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddNextMinus.decTest -- decDouble next that is less [754r nextdown] --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextPlus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextPlus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextPlus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddNextPlus.decTest -- decDouble next that is greater [754r nextup] --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextToward.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextToward.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddNextToward.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddNextToward.decTest -- decDouble next toward rhs [754r nextafter] --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddOr.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddOr.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddOr.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddOr.decTest -- digitwise logical OR for decDoubles                --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddPlus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddPlus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddPlus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddPlus.decTest -- decDouble 0+x                                    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddQuantize.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddQuantize.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddQuantize.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddQuantize.decTest -- decDouble quantize operation                 --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Most of the tests here assume a "regular pattern", where the
 -- sign and coefficient are +1.
@@ -653,7 +653,15 @@
 ddqua1021 quantize  8.666666666666000E+384  1.000000000000000E+384 ->  8.666666666666000E+384
 ddqua1022 quantize -8.666666666666000E+384  1.000000000000000E+384 -> -8.666666666666000E+384
 ddqua1027 quantize 8.666666666666000E+323  1E+31    -> NaN Invalid_operation
-ddqua1030 quantize 8.66666666E+3           1E+3     -> 9E+3 Inexact Rounded
+ddqua1029 quantize 8.66666666E+3           1E+3     -> 9E+3 Inexact Rounded
+
+
+--ddqua1030 quantize 8.666666666666000E+384 1E+384   -> 9.000000000000000E+384 Rounded Inexact
+--ddqua1031 quantize 8.666666666666000E+384 1E+384   -> 8.666666666666000E+384 Rounded
+--ddqua1032 quantize 8.666666666666000E+384 1E+383   -> 8.666666666666000E+384 Rounded
+--ddqua1033 quantize 8.666666666666000E+384 1E+382   -> 8.666666666666000E+384 Rounded
+--ddqua1034 quantize 8.666666666666000E+384 1E+381   -> 8.666666666666000E+384 Rounded
+--ddqua1035 quantize 8.666666666666000E+384 1E+380   -> 8.666666666666000E+384 Rounded
 
 -- Int and uInt32 edge values for testing conversions
 ddqua1040 quantize -2147483646     0 -> -2147483646

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddReduce.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddReduce.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddReduce.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddReduce.decTest -- remove trailing zeros from a decDouble         --
--- Copyright (c) IBM Corporation, 2003, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2003, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRemainder.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRemainder.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRemainder.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddRemainder.decTest -- decDouble remainder                         --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRemainderNear.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRemainderNear.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRemainderNear.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddRemainderNear.decTest -- decDouble remainder-near                --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRotate.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRotate.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddRotate.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddRotate.decTest -- rotate a decDouble coefficient left or right   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddSameQuantum.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddSameQuantum.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddSameQuantum.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddSameQuantum.decTest -- check decDouble quantums match            --
--- Copyright (c) IBM Corporation, 2001, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2001, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decDoubles.
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddScaleB.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddScaleB.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddScaleB.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddScalebB.decTest -- scale a decDouble by powers of 10             --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddShift.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddShift.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddShift.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddShift.decTest -- shift decDouble coefficient left or right       --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddSubtract.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddSubtract.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddSubtract.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddSubtract.decTest -- decDouble subtraction                        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests are for decDoubles only; all arguments are
 -- representable in a decDouble

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddToIntegral.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddToIntegral.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddToIntegral.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddToIntegral.decTest -- round Double to integral value             --
--- Copyright (c) IBM Corporation, 2001, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2001, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests tests the extended specification 'round-to-integral
 -- value-exact' operations (from IEEE 854, later modified in 754r).

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddXor.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddXor.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ddXor.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ddXor.decTest -- digitwise logical XOR for decDoubles              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 precision:   16
 maxExponent: 384

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decDouble.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decDouble.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decDouble.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- decDouble.decTest -- run all decDouble decimal arithmetic tests    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- decDouble tests
 dectest: ddAbs

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decQuad.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decQuad.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decQuad.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- decQuad.decTest -- run all decQuad decimal arithmetic tests        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- decQuad tests
 dectest: dqAbs

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decSingle.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decSingle.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/decSingle.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- decSingle.decTest -- run all decSingle decimal arithmetic tests    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- decSingle tests
 dectest: dsBase

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/divide.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/divide.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/divide.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- divide.decTest -- decimal division                                 --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/divideint.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/divideint.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/divideint.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- divideint.decTest -- decimal integer division                      --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAbs.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAbs.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAbs.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqAbs.decTest -- decQuad absolute value, heeding sNaN              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAdd.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAdd.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAdd.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqAdd.decTest -- decQuad addition                                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests are for decQuads only; all arguments are
 -- representable in a decQuad
@@ -406,6 +406,64 @@
 dqadd435 add  77e-37      10   ->  10.00000000000000000000000000000000 Inexact Rounded
 dqadd436 add  77e-299     10   ->  10.00000000000000000000000000000000 Inexact Rounded
 
+-- fastpath boundaries
+--            1234567890123456789012345678901234
+dqadd501 add '4444444444444444444444444444444444'  '5555555555555555555555555555555555' -> '9999999999999999999999999999999999'
+dqadd502 add '4444444444444444444444444444444444'  '4555555555555555555555555555555555' -> '8999999999999999999999999999999999'
+dqadd503 add '4444444444444444444444444444444444'  '3555555555555555555055555555555555' -> '7999999999999999999499999999999999'
+dqadd504 add '4444444444444444444444444444444444'  '3955555555555555555555555555555555' -> '8399999999999999999999999999999999'
+dqadd505 add '4444444444444444444444444444444444'  '4955555555555555555555555555555555' -> '9399999999999999999999999999999999'
+dqadd506 add '4444444444444444444444444444444444'  '5955555555555555555555555555555555' -> 1.040000000000000000000000000000000E+34 Inexact Rounded
+dqadd511 add '344444444444444444444444444444444'  '555555555555555555555555555555555' -> '899999999999999999999999999999999'
+dqadd512 add '34444444444444444444444444444444'  '55555555555555555555555555555555' -> '89999999999999999999999999999999'
+dqadd513 add '3444444444444444444444444444444'  '5555555555555555555555555555555' -> '8999999999999999999999999999999'
+dqadd514 add '344444444444444444444444444444'  '555555555555555555555555555555' -> '899999999999999999999999999999'
+dqadd515 add '34444444444444444444444444444'  '55555555555555555555555555555' -> '89999999999999999999999999999'
+dqadd516 add '3444444444444444444444444444'  '5555555555555555555555555555' -> '8999999999999999999999999999'
+dqadd517 add '344444444444444444444444444'  '555555555555555555555555555' -> '899999999999999999999999999'
+dqadd518 add '34444444444444444444444444'  '55555555555555555555555555' -> '89999999999999999999999999'
+dqadd519 add '3444444444444444444444444'  '5555555555555555555555555' -> '8999999999999999999999999'
+dqadd520 add '344444444444444444444444'  '555555555555555555555555' -> '899999999999999999999999'
+dqadd521 add '34444444444444444444444'  '55555555555555555555555' -> '89999999999999999999999'
+dqadd522 add '3444444444444444444444'  '5555555555555555555555' -> '8999999999999999999999'
+dqadd523 add '4444444444444444444444'  '3333333333333333333333' -> '7777777777777777777777'
+dqadd524 add '344444444444444444444'  '555555555555555555555' -> '899999999999999999999'
+dqadd525 add '34444444444444444444'  '55555555555555555555' -> '89999999999999999999'
+dqadd526 add '3444444444444444444'  '5555555555555555555' -> '8999999999999999999'
+dqadd527 add '344444444444444444'  '555555555555555555' -> '899999999999999999'
+dqadd528 add '34444444444444444'  '55555555555555555' -> '89999999999999999'
+dqadd529 add '3444444444444444'  '5555555555555555' -> '8999999999999999'
+dqadd530 add '344444444444444'  '555555555555555' -> '899999999999999'
+dqadd531 add '34444444444444'  '55555555555555' -> '89999999999999'
+dqadd532 add '3444444444444'  '5555555555555' -> '8999999999999'
+dqadd533 add '344444444444'  '555555555555' -> '899999999999'
+dqadd534 add '34444444444'  '55555555555' -> '89999999999'
+dqadd535 add '3444444444'  '5555555555' -> '8999999999'
+dqadd536 add '344444444'  '555555555' -> '899999999'
+dqadd537 add '34444444'  '55555555' -> '89999999'
+dqadd538 add '3444444'  '5555555' -> '8999999'
+dqadd539 add '344444'  '555555' -> '899999'
+dqadd540 add '34444'  '55555' -> '89999'
+dqadd541 add '3444'  '5555' -> '8999'
+dqadd542 add '344'  '555' -> '899'
+dqadd543 add '34'  '55' -> '89'
+dqadd544 add '3'  '5' -> '8'
+
+dqadd545 add '3000004000000000000000000000000000'  '3000000000000040000000000000000000' -> '6000004000000040000000000000000000'
+dqadd546 add '3000000400000000000000000000000000'  '4000000000000400000000000000000000' -> '7000000400000400000000000000000000'
+dqadd547 add '3000000040000000000000000000000000'  '5000000000004000000000000000000000' -> '8000000040004000000000000000000000'
+dqadd548 add '4000000004000000000000000000000000'  '3000000000040000000000000000000000' -> '7000000004040000000000000000000000'
+dqadd549 add '4000000000400000000000000000000000'  '4000000000400000000000000000000000' -> '8000000000800000000000000000000000'
+dqadd550 add '4000000000040000000000000000000000'  '5000000004000000000000000000000000' -> '9000000004040000000000000000000000'
+dqadd551 add '5000000000004000000000000000000000'  '3000000040000000000000000000000000' -> '8000000040004000000000000000000000'
+dqadd552 add '5000000000000400000000000000000000'  '4000000400000000000000000000000000' -> '9000000400000400000000000000000000'
+dqadd553 add '5000000000000040000000000000000000'  '5000004000000000000000000000000000' -> 1.000000400000004000000000000000000E+34 Rounded
+-- check propagation
+dqadd554 add '8999999999999999999999999999999999'  '0000000000000000000000000000000001' ->  9000000000000000000000000000000000
+dqadd555 add '0000000000000000000000000000000001'  '8999999999999999999999999999999999' ->  9000000000000000000000000000000000
+dqadd556 add '4444444444444444444444444444444444'  '4555555555555555555555555555555556' ->  9000000000000000000000000000000000
+dqadd557 add '4555555555555555555555555555555556'  '4444444444444444444444444444444444' ->  9000000000000000000000000000000000
+
 -- negative ulps
 dqadd6440 add   1   -77e-32      ->  0.99999999999999999999999999999923
 dqadd6441 add   1   -77e-33      ->  0.999999999999999999999999999999923

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAnd.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAnd.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqAnd.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqAnd.decTest -- digitwise logical AND for decQuads                --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqBase.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqBase.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqBase.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqBase.decTest -- base decQuad <--> string conversions             --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This file tests base conversions from string to a decimal number
 -- and back to a string (in Scientific form)

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCanonical.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCanonical.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCanonical.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCanonical.decTest -- test decQuad canonical results              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This file tests that copy operations leave uncanonical operands
 -- unchanged, and vice versa

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqClass.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqClass.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqClass.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqClass.decTest -- decQuad Class operations                        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- [New 2006.11.27]
 

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompare.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompare.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompare.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCompare.decTest -- decQuad comparison that allows quiet NaNs     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareSig.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareSig.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareSig.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCompareSig.decTest -- decQuad comparison; all NaNs signal        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareTotal.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareTotal.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareTotal.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCompareTotal.decTest -- decQuad comparison using total ordering  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareTotalMag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareTotalMag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCompareTotalMag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCompareTotalMag.decTest -- decQuad comparison; abs. total order  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Note that we cannot assume add/subtract tests cover paths adequately,
 -- here, because the code might be quite different (comparison cannot

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopy.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopy.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopy.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCopy.decTest -- quiet decQuad copy                               --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopyAbs.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopyAbs.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopyAbs.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCopyAbs.decTest -- quiet decQuad copy and set sign to zero       --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopyNegate.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopyNegate.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopyNegate.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCopyNegate.decTest -- quiet decQuad copy and negate              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopySign.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopySign.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqCopySign.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqCopySign.decTest -- quiet decQuad copy with sign from rhs        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqDivide.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqDivide.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqDivide.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqDivide.decTest -- decQuad division                               --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqDivideInt.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqDivideInt.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqDivideInt.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqDivideInt.decTest -- decQuad integer division                    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqEncode.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqEncode.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqEncode.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqEncode.decTest -- decimal sixteen-byte format testcases          --
--- Copyright (c) IBM Corporation, 2000, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2000, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -18,7 +18,7 @@
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
 -- [Previously called decimal128.decTest]
-version: 2.57
+version: 2.58
 
 -- This set of tests is for the sixteen-byte concrete representation.
 -- Its characteristics are:

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqFMA.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqFMA.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqFMA.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqFMA.decTest -- decQuad Fused Multiply Add                        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqInvert.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqInvert.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqInvert.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqInvert.decTest -- digitwise logical INVERT for decQuads          --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqLogB.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqLogB.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqLogB.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqLogB.decTest -- integral 754r adjusted exponent, for decQuads    --
--- Copyright (c) IBM Corporation, 2005, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2005, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMax.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMax.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMax.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqMax.decTest -- decQuad maxnum                                    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMaxMag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMaxMag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMaxMag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqMaxMag.decTest -- decQuad maxnummag                              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMin.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMin.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMin.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqMin.decTest -- decQuad minnum                                    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMinMag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMinMag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMinMag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqMinMag.decTest -- decQuad minnummag                              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMinus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMinus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMinus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqMinus.decTest -- decQuad 0-x                                     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMultiply.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMultiply.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqMultiply.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqMultiply.decTest -- decQuad multiplication                       --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests are for decQuads only; all arguments are
 -- representable in a decQuad

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextMinus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextMinus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextMinus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqNextMinus.decTest -- decQuad next that is less [754r nextdown]   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextPlus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextPlus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextPlus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqNextPlus.decTest -- decQuad next that is greater [754r nextup]   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextToward.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextToward.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqNextToward.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqNextToward.decTest -- decQuad next toward rhs [754r nextafter]   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqOr.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqOr.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqOr.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqOr.decTest -- digitwise logical OR for decQuads                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqPlus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqPlus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqPlus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqPlus.decTest -- decQuad 0+x                                      --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqQuantize.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqQuantize.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqQuantize.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqQuantize.decTest -- decQuad quantize operation                   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Most of the tests here assume a "regular pattern", where the
 -- sign and coefficient are +1.
@@ -455,25 +455,38 @@
 dqqua515 quantize  -0E+1 1e-1 -> -0.0
 dqqua516 quantize  -0E+1  1e0 -> -0
 dqqua517 quantize  -0E+1 1e+1 -> -0E+1
+-- #519 here once a problem
+dqqua518 quantize  0    0E-3  -> 0.000
+dqqua519 quantize  0    0E-33 -> 0E-33
+dqqua520 quantize  0.00000000000000000000000000000000   0E-33 -> 0E-33
+dqqua521 quantize  0.000000000000000000000000000000000  0E-33 -> 0E-33
+
+-- Some non-zeros with lots of padding on the right
+dqqua523 quantize   1   0E-33 -> 1.000000000000000000000000000000000
+dqqua524 quantize  12   0E-32 -> 12.00000000000000000000000000000000
+dqqua525 quantize 123   0E-31 -> 123.0000000000000000000000000000000
+dqqua526 quantize 123   0E-32 -> NaN Invalid_operation
+dqqua527 quantize 123.4 0E-31 -> 123.4000000000000000000000000000000
+dqqua528 quantize 123.4 0E-32 -> NaN Invalid_operation
 
 -- Suspicious RHS values
-dqqua520 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
-dqqua521 quantize 123.456    1e359 -> 0E+359 Inexact Rounded
-dqqua522 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
-dqqua523 quantize 123.456    1e359 -> 0E+359 Inexact Rounded
--- next four are "won't fit" overfl
-dqqua526 quantize   1.234   1e-299 -> NaN Invalid_operation
-dqqua527 quantize 123.456   1e-299 -> NaN Invalid_operation
-dqqua528 quantize   1.234   1e-299 -> NaN Invalid_operation
-dqqua529 quantize 123.456   1e-299 -> NaN Invalid_operation
-
-dqqua532 quantize   1.234E+299    1e299 -> 1E+299    Inexact Rounded
-dqqua533 quantize   1.234E+298    1e299 -> 0E+299    Inexact Rounded
-dqqua534 quantize   1.234         1e299 -> 0E+299    Inexact Rounded
-dqqua537 quantize   0            1e-299 -> 0E-299
+dqqua530 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
+dqqua531 quantize 123.456    1e359 -> 0E+359 Inexact Rounded
+dqqua532 quantize   1.234    1e359 -> 0E+359 Inexact Rounded
+dqqua533 quantize 123.456    1e359 -> 0E+359 Inexact Rounded
+-- next four are "won't fit" overflows
+dqqua536 quantize   1.234   1e-299 -> NaN Invalid_operation
+dqqua537 quantize 123.456   1e-299 -> NaN Invalid_operation
+dqqua538 quantize   1.234   1e-299 -> NaN Invalid_operation
+dqqua539 quantize 123.456   1e-299 -> NaN Invalid_operation
+
+dqqua542 quantize   1.234E+299    1e299 -> 1E+299    Inexact Rounded
+dqqua543 quantize   1.234E+298    1e299 -> 0E+299    Inexact Rounded
+dqqua544 quantize   1.234         1e299 -> 0E+299    Inexact Rounded
+dqqua547 quantize   0            1e-299 -> 0E-299
 -- next two are "won't fit" overflows
-dqqua538 quantize   1.234        1e-299 -> NaN Invalid_operation
-dqqua539 quantize   1.234        1e-300 -> NaN Invalid_operation
+dqqua548 quantize   1.234        1e-299 -> NaN Invalid_operation
+dqqua549 quantize   1.234        1e-300 -> NaN Invalid_operation
 -- [more below]
 
 -- Specials
@@ -587,13 +600,13 @@
 dqqua699 quantize  NaN   -sNaN88  -> -NaN88 Invalid_operation
 
 -- subnormals and underflow
-dqqua710 quantize  1.00E-6143    1e-6143  ->   1E-6143    Rounded
+dqqua710 quantize  1.00E-6143   1e-6143  ->   1E-6143   Rounded
 dqqua711 quantize  0.1E-6143    2e-6144  ->   1E-6144   Subnormal
 dqqua712 quantize  0.10E-6143   3e-6144  ->   1E-6144   Subnormal Rounded
 dqqua713 quantize  0.100E-6143  4e-6144  ->   1E-6144   Subnormal Rounded
 dqqua714 quantize  0.01E-6143   5e-6145  ->   1E-6145   Subnormal
 -- next is rounded to Emin
-dqqua715 quantize  0.999E-6143   1e-6143  ->   1E-6143    Inexact Rounded
+dqqua715 quantize  0.999E-6143  1e-6143  ->   1E-6143   Inexact Rounded
 dqqua716 quantize  0.099E-6143 10e-6144  ->   1E-6144   Inexact Rounded Subnormal
 
 dqqua717 quantize  0.009E-6143  1e-6145  ->   1E-6145   Inexact Rounded Subnormal
@@ -649,10 +662,12 @@
 dqqua769 quantize -0.0001E-6143 1e-6146 ->  -0E-6146     Inexact Rounded
 
 -- More from Fung Lee
-dqqua1021 quantize  8.666666666666000E+6144  1.000000000000000E+6144 ->  8.666666666666000000000000000000000E+6144  Clamped
-dqqua1022 quantize -8.666666666666000E+6144  1.000000000000000E+6144 -> -8.666666666666000000000000000000000E+6144  Clamped
-dqqua1027 quantize 8.666666666666000E+323  1E+31    -> NaN Invalid_operation
-dqqua1030 quantize 8.66666666E+3           1E+3     -> 9E+3 Inexact Rounded
+-- the next four would appear to be in error, but they are misleading (the
+-- operands will be clamped to a lower exponent) and so are omitted
+-- dqqua1021 quantize  8.666666666666000E+6144  1.000000000000000E+6144 ->  8.666666666666000000000000000000000E+6144  Clamped
+-- dqqua1022 quantize -8.666666666666000E+6144  1.000000000000000E+6144 -> -8.666666666666000000000000000000000E+6144  Clamped
+-- dqqua1027 quantize 8.666666666666000E+323  1E+31    -> NaN Invalid_operation
+-- dqqua1030 quantize 8.66666666E+3           1E+3     -> 9E+3 Inexact Rounded
 
 -- Int and uInt32 edge values for testing conversions
 dqqua1040 quantize -2147483646     0 -> -2147483646

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqReduce.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqReduce.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqReduce.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqReduce.decTest -- remove trailing zeros from a decQuad           --
--- Copyright (c) IBM Corporation, 2003, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2003, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -18,7 +18,7 @@
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
 
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRemainder.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRemainder.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRemainder.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqRemainder.decTest -- decQuad remainder                           --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRemainderNear.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRemainderNear.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRemainderNear.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqRemainderNear.decTest -- decQuad remainder-near                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRotate.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRotate.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqRotate.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqRotate.decTest -- rotate decQuad coefficient left or right       --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqSameQuantum.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqSameQuantum.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqSameQuantum.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqSameQuantum.decTest -- check decQuad quantums match              --
--- Copyright (c) IBM Corporation, 2001, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2001, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- All operands and results are decQuads.
 extended:    1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqScaleB.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqScaleB.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqScaleB.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqScalebB.decTest -- scale a decQuad by powers of 10               --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqShift.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqShift.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqShift.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqShift.decTest -- shift decQuad coefficient left or right         --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqSubtract.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqSubtract.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqSubtract.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqSubtract.decTest -- decQuad subtraction                          --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests are for decQuads only; all arguments are
 -- representable in a decQuad

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqToIntegral.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqToIntegral.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqToIntegral.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqToIntegral.decTest -- round Quad to integral value               --
--- Copyright (c) IBM Corporation, 2001, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2001, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests tests the extended specification 'round-to-integral
 -- value-exact' operations (from IEEE 854, later modified in 754r).

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqXor.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqXor.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dqXor.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dqXor.decTest -- digitwise logical XOR for decQuads                --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 clamp:       1

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dsBase.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dsBase.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dsBase.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dsBase.decTest -- base decSingle <--> string conversions           --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This file tests base conversions from string to a decimal number
 -- and back to a string (in Scientific form)

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dsEncode.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dsEncode.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/dsEncode.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- dsEncode.decTest -- decimal four-byte format testcases             --
--- Copyright (c) IBM Corporation, 2000, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2000, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -18,7 +18,7 @@
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
 -- [Previously called decimal32.decTest]
-version: 2.57
+version: 2.58
 
 -- This set of tests is for the four-byte concrete representation.
 -- Its characteristics are:

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/exp.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/exp.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/exp.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- exp.decTest -- decimal natural exponentiation                      --
--- Copyright (c) IBM Corporation, 2005, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2005, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Tests of the exponential funtion.  Currently all testcases here
 -- show results which are correctly rounded (within <= 0.5 ulp).

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/fma.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/fma.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/fma.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- fma.decTest -- decimal fused multiply add                          --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/inexact.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/inexact.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/inexact.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- inexact.decTest -- decimal inexact and rounded edge cases          --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/invert.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/invert.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/invert.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- invert.decTest -- digitwise logical INVERT                         --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ln.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ln.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/ln.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- ln.decTest -- decimal natural logarithm                            --
--- Copyright (c) IBM Corporation, 2005, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2005, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   16

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/log10.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/log10.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/log10.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- log10.decTest -- decimal logarithm in base 10                      --
--- Copyright (c) IBM Corporation, 2005, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2005, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This emphasises the testing of notable cases, as they will often
 -- have unusual paths (especially the 10**n results).

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/logb.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/logb.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/logb.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- logb.decTest -- return integral adjusted exponent as per 754r      --
--- Copyright (c) IBM Corporation, 2005, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2005, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This emphasises the testing of notable cases, as they will often
 -- have unusual paths (especially the 10**n results).

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/max.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/max.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/max.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- max.decTest -- decimal maximum                                     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/maxmag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/maxmag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/maxmag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- maxmag.decTest -- decimal maximum by magnitude                     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/min.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/min.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/min.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- min.decTest -- decimal minimum                                     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/minmag.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/minmag.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/minmag.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- minmag.decTest -- decimal minimum by magnitude                     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- we assume that base comparison is tested in compare.decTest, so
 -- these mainly cover special cases and rounding

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/minus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/minus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/minus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- minus.decTest -- decimal negation                                  --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests primarily tests the existence of the operator.
 -- Subtraction, rounding, and more overflows are tested elsewhere.

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/multiply.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/multiply.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/multiply.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- multiply.decTest -- decimal multiplication                         --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nextminus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nextminus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nextminus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- nextminus.decTest -- decimal next that is less [754r nextdown]     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nextplus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nextplus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nextplus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- nextplus.decTest -- decimal next that is greater [754r nextup]     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nexttoward.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nexttoward.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/nexttoward.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- nexttoward.decTest -- decimal next toward rhs [754r nextafter]     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/or.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/or.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/or.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- or.decTest -- digitwise logical OR                                 --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/plus.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/plus.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/plus.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- plus.decTest -- decimal monadic addition                           --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests primarily tests the existence of the operator.
 -- Addition and rounding, and most overflows, are tested elsewhere.

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/power.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/power.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/power.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- power.decTest -- decimal exponentiation [power(x, y)]              --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- In addition to the power operator testcases here, see also the file
 -- powersqrt.decTest which includes all the tests from

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/powersqrt.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/powersqrt.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/powersqrt.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- powersqrt.decTest -- decimal square root, using power              --
--- Copyright (c) IBM Corporation, 2004, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2004, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- These testcases are taken from squareroot.decTest but are
 -- evaluated using the power operator.  The differences in results

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/quantize.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/quantize.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/quantize.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- quantize.decTest -- decimal quantize operation                     --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- Most of the tests here assume a "regular pattern", where the
 -- sign and coefficient are +1.

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/randomBound32.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/randomBound32.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/randomBound32.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- randomBound32.decTest -- decimal testcases -- boundaries near 32   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- These testcases test calculations at precisions 31, 32, and 33, to
 -- exercise the boundaries around 2**5

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/randoms.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/randoms.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/randoms.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- randoms.decTest -- decimal random testcases                        --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 maxexponent: 999999999

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/reduce.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/reduce.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/reduce.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- reduce.decTest -- remove trailing zeros                            --
--- Copyright (c) IBM Corporation, 2003, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2003, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -19,7 +19,7 @@
 ------------------------------------------------------------------------
 -- [This used to be called normalize.]
 
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/remainder.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/remainder.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/remainder.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- remainder.decTest -- decimal remainder                             --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/remainderNear.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/remainderNear.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/remainderNear.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- remainderNear.decTest -- decimal remainder-near (IEEE remainder)   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rescale.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rescale.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rescale.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- rescale.decTest -- decimal rescale operation                       --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- [obsolete]   Quantize.decTest has the improved version
 

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rotate.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rotate.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rotate.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- rotate.decTest -- rotate coefficient left or right                 --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rounding.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rounding.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/rounding.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- rounding.decTest -- decimal rounding modes testcases               --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- These tests require that implementations take account of residues in
 -- order to get correct results for some rounding modes.  Rather than

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/samequantum.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/samequantum.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/samequantum.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- samequantum.decTest -- check quantums match                        --
--- Copyright (c) IBM Corporation, 2001, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2001, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/scaleb.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/scaleb.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/scaleb.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- scaleb.decTest -- scale a number by powers of 10                   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/shift.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/shift.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/shift.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- shift.decTest -- shift coefficient left or right                   --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/squareroot.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/squareroot.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/squareroot.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- squareroot.decTest -- decimal square root                          --
--- Copyright (c) IBM Corporation, 2003, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2003, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9
@@ -3671,6 +3671,8 @@
 precision: 1
 sqtx8626 squareroot 1E+18 -> 1E+9
 sqtx8627 squareroot 1E+19 -> 3E+9 Inexact Rounded
+-- in this next one, intermediate result is 9486832980.505137996...
+-- so rounds down to 9 (not up to 10 which would cause Infinity overflow)
 sqtx8628 squareroot 9E+19 -> 9E+9 Inexact Rounded
 sqtx8629 squareroot 9.1E+19 -> Infinity Overflow Inexact Rounded
 sqtx8630 squareroot 1E+20 -> Infinity Overflow Inexact Rounded
@@ -3770,6 +3772,10 @@
 precision: 1
 sqtx9006 squareroot 11025   -> 1E+2    Inexact Rounded
 
+-- an interesting case
+precision:   7
+sqtx9007 squareroot 1600000e1 -> 4000
+
 -- Out-of-bounds zeros
 precision: 4
 sqtx9010 squareroot 0E-9  -> 0.00000
@@ -3799,6 +3805,20 @@
 sqtx9039 squareroot 0E+21 -> 0E+9 Clamped
 sqtx9040 squareroot 0E+22 -> 0E+9 Clamped
 
+-- if digits > emax maximum real exponent is negative
+maxexponent: 9
+minexponent: -9
+precision: 15
+clamp: 1
+sqtx9045 squareroot  1 -> 1.00000  Clamped
+
+-- High-precision exact and inexact
+maxexponent: 999
+minexponent: -999
+precision: 400
+sqtx9050 squareroot 2 -> 1.414213562373095048801688724209698078569671875376948073176679737990732478462107038850387534327641572735013846230912297024924836055850737212644121497099935831413222665927505592755799950501152782060571470109559971605970274534596862014728517418640889198609552329230484308714321450839762603627995251407989687253396546331808829640620615258352395054745750287759961729835575220337531857011354374603408498847 Inexact Rounded
+sqtx9051 squareroot 1089 -> 33
+sqtx9052 squareroot 10.89 -> 3.3
 
 -- Null test
 sqtx9900 squareroot  # -> NaN Invalid_operation

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/subtract.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/subtract.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/subtract.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- subtract.decTest -- decimal subtraction                            --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/testall.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/testall.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/testall.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- testall.decTest -- run all general decimal arithmetic testcases    --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- core tests (using Extended: 1) --------------------------------------
 dectest: base

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/tointegral.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/tointegral.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/tointegral.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- tointegral.decTest -- round decimal to integral value              --
--- Copyright (c) IBM Corporation, 2001, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2001, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests tests the extended specification 'round-to-integral
 -- value' operation (from IEEE 854, later modified in 754r).

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/tointegralx.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/tointegralx.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/tointegralx.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- tointegralx.decTest -- round decimal to integral value, exact      --
--- Copyright (c) IBM Corporation, 2001, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 2001, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 -- This set of tests tests the extended specification 'round-to-integral
 -- value' operation (from IEEE 854, later modified in 754r).

Modified: python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/xor.decTest
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/xor.decTest	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/decimaltestdata/xor.decTest	Wed Jul 30 22:06:40 2008
@@ -1,6 +1,6 @@
 ------------------------------------------------------------------------
 -- xor.decTest -- digitwise logical XOR                               --
--- Copyright (c) IBM Corporation, 1981, 2007.  All rights reserved.   --
+-- Copyright (c) IBM Corporation, 1981, 2008.  All rights reserved.   --
 ------------------------------------------------------------------------
 -- Please see the document "General Decimal Arithmetic Testcases"     --
 -- at http://www2.hursley.ibm.com/decimal for the description of      --
@@ -17,7 +17,7 @@
 --   IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK         --
 --   mfc at uk.ibm.com                                                   --
 ------------------------------------------------------------------------
-version: 2.57
+version: 2.58
 
 extended:    1
 precision:   9

Modified: python/branches/tlee-ast-optimize/Lib/test/exception_hierarchy.txt
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/exception_hierarchy.txt	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/exception_hierarchy.txt	Wed Jul 30 22:06:40 2008
@@ -3,6 +3,7 @@
  +-- KeyboardInterrupt
  +-- GeneratorExit
  +-- Exception
+      +-- BufferError
       +-- StopIteration
       +-- StandardError
       |    +-- ArithmeticError

Modified: python/branches/tlee-ast-optimize/Lib/test/test_itertools.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_itertools.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_itertools.py	Wed Jul 30 22:06:40 2008
@@ -1234,13 +1234,13 @@
 ...     return izip(a, b)
 
 >>> def grouper(n, iterable, fillvalue=None):
-...     "grouper(3, 'abcdefg', 'x') --> ('a','b','c'), ('d','e','f'), ('g','x','x')"
+...     "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx"
 ...     args = [iter(iterable)] * n
 ...     kwds = dict(fillvalue=fillvalue)
 ...     return izip_longest(*args, **kwds)
 
 >>> def roundrobin(*iterables):
-...     "roundrobin('abc', 'd', 'ef') --> 'a', 'd', 'e', 'b', 'f', 'c'"
+...     "roundrobin('ABC', 'D', 'EF') --> A D E B F C"
 ...     # Recipe credited to George Sakkis
 ...     pending = len(iterables)
 ...     nexts = cycle(iter(it).next for it in iterables)
@@ -1260,10 +1260,8 @@
 ...         yield set(x for m, x in pairs if m&n)
 
 >>> def compress(data, selectors):
-...     "compress('abcdef', [1,0,1,0,1,1]) --> a c e f"
-...     decorated = izip(data, selectors)
-...     filtered =  ifilter(operator.itemgetter(1), decorated)
-...     return imap(operator.itemgetter(0), filtered)
+...     "compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F"
+...     return (d for d, s in izip(data, selectors) if s)
 
 >>> def combinations_with_replacement(iterable, r):
 ...     "combinations_with_replacement('ABC', 3) --> AA AB AC BB BC CC"

Modified: python/branches/tlee-ast-optimize/Lib/test/test_locale.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_locale.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_locale.py	Wed Jul 30 22:06:40 2008
@@ -1,124 +1,293 @@
-from test.test_support import verbose, TestSkipped, TestFailed
+from test.test_support import run_unittest, verbose, TestSkipped
+import unittest
 import locale
 import sys
+import codecs
 
-if sys.platform == 'darwin':
-    raise TestSkipped("Locale support on MacOSX is minimal and cannot be tested")
-oldlocale = locale.setlocale(locale.LC_NUMERIC)
-
-if sys.platform.startswith("win"):
-    tlocs = ("En", "English")
-else:
-    tlocs = ("en_US.UTF-8", "en_US.US-ASCII", "en_US")
 
-for tloc in tlocs:
-    try:
-        locale.setlocale(locale.LC_NUMERIC, tloc)
+enUS_locale = None
+
+def get_enUS_locale():
+    global enUS_locale
+    if sys.platform == 'darwin':
+        raise TestSkipped("Locale support on MacOSX is minimal")
+    if sys.platform.startswith("win"):
+        tlocs = ("En", "English")
+    else:
+        tlocs = ("en_US.UTF-8", "en_US.US-ASCII", "en_US")
+    oldlocale = locale.setlocale(locale.LC_NUMERIC)
+    for tloc in tlocs:
+        try:
+            locale.setlocale(locale.LC_NUMERIC, tloc)
+        except locale.Error:
+            continue
         break
-    except locale.Error:
-        continue
-else:
-    raise ImportError, "test locale not supported (tried %s)"%(', '.join(tlocs))
-
-def testformat(formatstr, value, grouping = 0, output=None, func=locale.format):
-    if verbose:
-        if output:
-            print "%s %% %s =? %s ..." %\
-                (repr(formatstr), repr(value), repr(output)),
-        else:
-            print "%s %% %s works? ..." % (repr(formatstr), repr(value)),
-    result = func(formatstr, value, grouping = grouping)
-    if output and result != output:
-        if verbose:
-            print 'no'
-        print "%s %% %s == %s != %s" %\
-              (repr(formatstr), repr(value), repr(result), repr(output))
     else:
-        if verbose:
-            print "yes"
-
-try:
-    # On Solaris 10, the thousands_sep is the empty string
-    sep = locale.localeconv()['thousands_sep']
-    testformat("%f", 1024, grouping=1, output='1%s024.000000' % sep)
-    testformat("%f", 102, grouping=1, output='102.000000')
-    testformat("%f", -42, grouping=1, output='-42.000000')
-    testformat("%+f", -42, grouping=1, output='-42.000000')
-    testformat("%20.f", -42, grouping=1, output='                 -42')
-    testformat("%+10.f", -4200, grouping=1, output='    -4%s200' % sep)
-    testformat("%-10.f", 4200, grouping=1, output='4%s200     ' % sep)
-    # Invoke getpreferredencoding to make sure it does not cause exceptions,
-    locale.getpreferredencoding()
-
-    # === Test format() with more complex formatting strings
-    # test if grouping is independent from other characters in formatting string
-    testformat("One million is %i", 1000000, grouping=1,
-               output='One million is 1%s000%s000' % (sep, sep),
-               func=locale.format_string)
-    testformat("One  million is %i", 1000000, grouping=1,
-               output='One  million is 1%s000%s000' % (sep, sep),
-               func=locale.format_string)
-    # test dots in formatting string
-    testformat(".%f.", 1000.0, output='.1000.000000.', func=locale.format_string)
-    # test floats
-    testformat("--> %10.2f", 1000.0, grouping=1, output='-->   1%s000.00' % sep,
-               func=locale.format_string)
-    # test asterisk formats
-    testformat("%10.*f", (2, 1000.0), grouping=0, output='   1000.00',
-               func=locale.format_string)
-    testformat("%*.*f", (10, 2, 1000.0), grouping=1, output='  1%s000.00' % sep,
-               func=locale.format_string)
-    # test more-in-one
-    testformat("int %i float %.2f str %s", (1000, 1000.0, 'str'), grouping=1,
-               output='int 1%s000 float 1%s000.00 str str' % (sep, sep),
-               func=locale.format_string)
-
-finally:
+        raise TestSkipped(
+            "Test locale not supported (tried %s)" % (', '.join(tlocs)))
+    enUS_locale = tloc
     locale.setlocale(locale.LC_NUMERIC, oldlocale)
 
 
-# Test BSD Rune locale's bug for isctype functions.
-def teststrop(s, method, output):
-    if verbose:
-        print "%s.%s() =? %s ..." % (repr(s), method, repr(output)),
-    result = getattr(s, method)()
-    if result != output:
+class BaseLocalizedTest(unittest.TestCase):
+    #
+    # Base class for tests using a real locale
+    #
+
+    def setUp(self):
+        self.oldlocale = locale.setlocale(self.locale_type)
+        locale.setlocale(self.locale_type, enUS_locale)
         if verbose:
-            print "no"
-        print "%s.%s() == %s != %s" % (repr(s), method, repr(result),
-                                       repr(output))
-    elif verbose:
-        print "yes"
-
-try:
-    if sys.platform == 'sunos5':
-        # On Solaris, in en_US.UTF-8, \xa0 is a space
-        raise locale.Error
-    oldlocale = locale.setlocale(locale.LC_CTYPE)
-    locale.setlocale(locale.LC_CTYPE, 'en_US.UTF-8')
-except locale.Error:
-    pass
-else:
-    try:
-        teststrop('\x20', 'isspace', True)
-        teststrop('\xa0', 'isspace', False)
-        teststrop('\xa1', 'isspace', False)
-        teststrop('\xc0', 'isalpha', False)
-        teststrop('\xc0', 'isalnum', False)
-        teststrop('\xc0', 'isupper', False)
-        teststrop('\xc0', 'islower', False)
-        teststrop('\xec\xa0\xbc', 'split', ['\xec\xa0\xbc'])
-        teststrop('\xed\x95\xa0', 'strip', '\xed\x95\xa0')
-        teststrop('\xcc\x85', 'lower', '\xcc\x85')
-        teststrop('\xed\x95\xa0', 'upper', '\xed\x95\xa0')
-    finally:
-        locale.setlocale(locale.LC_CTYPE, oldlocale)
+            print "testing with \"%s\"..." % enUS_locale,
+
+    def tearDown(self):
+        locale.setlocale(self.locale_type, self.oldlocale)
 
-if hasattr(locale, "strcoll"):
-    # test crasher from bug #3303
+
+class BaseCookedTest(unittest.TestCase):
+    #
+    # Base class for tests using cooked localeconv() values
+    #
+
+    def setUp(self):
+        locale._override_localeconv = self.cooked_values
+
+    def tearDown(self):
+        locale._override_localeconv = {}
+
+
+class CCookedTest(BaseCookedTest):
+    # A cooked "C" locale
+
+    cooked_values = {
+        'currency_symbol': '',
+        'decimal_point': '.',
+        'frac_digits': 127,
+        'grouping': [],
+        'int_curr_symbol': '',
+        'int_frac_digits': 127,
+        'mon_decimal_point': '',
+        'mon_grouping': [],
+        'mon_thousands_sep': '',
+        'n_cs_precedes': 127,
+        'n_sep_by_space': 127,
+        'n_sign_posn': 127,
+        'negative_sign': '',
+        'p_cs_precedes': 127,
+        'p_sep_by_space': 127,
+        'p_sign_posn': 127,
+        'positive_sign': '',
+        'thousands_sep': ''
+    }
+
+class EnUSCookedTest(BaseCookedTest):
+    # A cooked "en_US" locale
+
+    cooked_values = {
+        'currency_symbol': '$',
+        'decimal_point': '.',
+        'frac_digits': 2,
+        'grouping': [3, 3, 0],
+        'int_curr_symbol': 'USD ',
+        'int_frac_digits': 2,
+        'mon_decimal_point': '.',
+        'mon_grouping': [3, 3, 0],
+        'mon_thousands_sep': ',',
+        'n_cs_precedes': 1,
+        'n_sep_by_space': 0,
+        'n_sign_posn': 1,
+        'negative_sign': '-',
+        'p_cs_precedes': 1,
+        'p_sep_by_space': 0,
+        'p_sign_posn': 1,
+        'positive_sign': '',
+        'thousands_sep': ','
+    }
+
+
+class BaseFormattingTest(object):
+    #
+    # Utility functions for formatting tests
+    #
+
+    def _test_formatfunc(self, format, value, out, func, **format_opts):
+        self.assertEqual(
+            func(format, value, **format_opts), out)
+
+    def _test_format(self, format, value, out, **format_opts):
+        self._test_formatfunc(format, value, out,
+            func=locale.format, **format_opts)
+
+    def _test_format_string(self, format, value, out, **format_opts):
+        self._test_formatfunc(format, value, out,
+            func=locale.format_string, **format_opts)
+
+    def _test_currency(self, value, out, **format_opts):
+        self.assertEqual(locale.currency(value, **format_opts), out)
+
+
+class EnUSNumberFormatting(BaseFormattingTest):
+    # XXX there is a grouping + padding bug when the thousands separator
+    # is empty but the grouping array contains values (e.g. Solaris 10)
+
+    def setUp(self):
+        self.sep = locale.localeconv()['thousands_sep']
+
+    def test_grouping(self):
+        self._test_format("%f", 1024, grouping=1, out='1%s024.000000' % self.sep)
+        self._test_format("%f", 102, grouping=1, out='102.000000')
+        self._test_format("%f", -42, grouping=1, out='-42.000000')
+        self._test_format("%+f", -42, grouping=1, out='-42.000000')
+
+    def test_grouping_and_padding(self):
+        self._test_format("%20.f", -42, grouping=1, out='-42'.rjust(20))
+        if self.sep:
+            self._test_format("%+10.f", -4200, grouping=1,
+                out=('-4%s200' % self.sep).rjust(10))
+            self._test_format("%-10.f", -4200, grouping=1,
+                out=('-4%s200' % self.sep).ljust(10))
+
+    def test_integer_grouping(self):
+        self._test_format("%d", 4200, grouping=True, out='4%s200' % self.sep)
+        self._test_format("%+d", 4200, grouping=True, out='+4%s200' % self.sep)
+        self._test_format("%+d", -4200, grouping=True, out='-4%s200' % self.sep)
+
+    def test_simple(self):
+        self._test_format("%f", 1024, grouping=0, out='1024.000000')
+        self._test_format("%f", 102, grouping=0, out='102.000000')
+        self._test_format("%f", -42, grouping=0, out='-42.000000')
+        self._test_format("%+f", -42, grouping=0, out='-42.000000')
+
+    def test_padding(self):
+        self._test_format("%20.f", -42, grouping=0, out='-42'.rjust(20))
+        self._test_format("%+10.f", -4200, grouping=0, out='-4200'.rjust(10))
+        self._test_format("%-10.f", 4200, grouping=0, out='4200'.ljust(10))
+
+    def test_complex_formatting(self):
+        # Spaces in formatting string
+        self._test_format_string("One million is %i", 1000000, grouping=1,
+            out='One million is 1%s000%s000' % (self.sep, self.sep))
+        self._test_format_string("One  million is %i", 1000000, grouping=1,
+            out='One  million is 1%s000%s000' % (self.sep, self.sep))
+        # Dots in formatting string
+        self._test_format_string(".%f.", 1000.0, out='.1000.000000.')
+        # Padding
+        if self.sep:
+            self._test_format_string("-->  %10.2f", 4200, grouping=1,
+                out='-->  ' + ('4%s200.00' % self.sep).rjust(10))
+        # Asterisk formats
+        self._test_format_string("%10.*f", (2, 1000), grouping=0,
+            out='1000.00'.rjust(10))
+        if self.sep:
+            self._test_format_string("%*.*f", (10, 2, 1000), grouping=1,
+                out=('1%s000.00' % self.sep).rjust(10))
+        # Test more-in-one
+        if self.sep:
+            self._test_format_string("int %i float %.2f str %s",
+                (1000, 1000.0, 'str'), grouping=1,
+                out='int 1%s000 float 1%s000.00 str str' %
+                (self.sep, self.sep))
+
+
+class TestNumberFormatting(BaseLocalizedTest, EnUSNumberFormatting):
+    # Test number formatting with a real English locale.
+
+    locale_type = locale.LC_NUMERIC
+
+    def setUp(self):
+        BaseLocalizedTest.setUp(self)
+        EnUSNumberFormatting.setUp(self)
+
+
+class TestEnUSNumberFormatting(EnUSCookedTest, EnUSNumberFormatting):
+    # Test number formatting with a cooked "en_US" locale.
+
+    def setUp(self):
+        EnUSCookedTest.setUp(self)
+        EnUSNumberFormatting.setUp(self)
+
+    def test_currency(self):
+        self._test_currency(50000, "$50000.00")
+        self._test_currency(50000, "$50,000.00", grouping=True)
+        self._test_currency(50000, "USD 50,000.00",
+            grouping=True, international=True)
+
+
+class TestCNumberFormatting(CCookedTest, BaseFormattingTest):
+    # Test number formatting with a cooked "C" locale.
+
+    def test_grouping(self):
+        self._test_format("%.2f", 12345.67, grouping=True, out='12345.67')
+
+    def test_grouping_and_padding(self):
+        self._test_format("%9.2f", 12345.67, grouping=True, out=' 12345.67')
+
+
+class TestStringMethods(BaseLocalizedTest):
+    locale_type = locale.LC_CTYPE
+
+    if sys.platform != 'sunos5' and not sys.platform.startswith("win"):
+        # Test BSD Rune locale's bug for isctype functions.
+
+        def test_isspace(self):
+            self.assertEqual('\x20'.isspace(), True)
+            self.assertEqual('\xa0'.isspace(), False)
+            self.assertEqual('\xa1'.isspace(), False)
+
+        def test_isalpha(self):
+            self.assertEqual('\xc0'.isalpha(), False)
+
+        def test_isalnum(self):
+            self.assertEqual('\xc0'.isalnum(), False)
+
+        def test_isupper(self):
+            self.assertEqual('\xc0'.isupper(), False)
+
+        def test_islower(self):
+            self.assertEqual('\xc0'.islower(), False)
+
+        def test_lower(self):
+            self.assertEqual('\xcc\x85'.lower(), '\xcc\x85')
+
+        def test_upper(self):
+            self.assertEqual('\xed\x95\xa0'.upper(), '\xed\x95\xa0')
+
+        def test_strip(self):
+            self.assertEqual('\xed\x95\xa0'.strip(), '\xed\x95\xa0')
+
+        def test_split(self):
+            self.assertEqual('\xec\xa0\xbc'.split(), ['\xec\xa0\xbc'])
+
+
+class TestMiscellaneous(unittest.TestCase):
+    def test_getpreferredencoding(self):
+        # Invoke getpreferredencoding to make sure it does not cause exceptions.
+        enc = locale.getpreferredencoding()
+        if enc:
+            # If encoding non-empty, make sure it is valid
+            codecs.lookup(enc)
+
+    if hasattr(locale, "strcoll"):
+        def test_strcoll_3303(self):
+            # test crasher from bug #3303
+            self.assertRaises(TypeError, locale.strcoll, u"a", None)
+
+
+def test_main():
+    tests = [
+        TestMiscellaneous,
+        TestEnUSNumberFormatting,
+        TestCNumberFormatting
+    ]
+    # TestSkipped can't be raised inside unittests, handle it manually instead
     try:
-        locale.strcoll(u"a", None)
-    except TypeError:
-        pass
+        get_enUS_locale()
+    except TestSkipped as e:
+        if verbose:
+            print "Some tests will be disabled: %s" % e
     else:
-        raise TestFailed("TypeError not raised")
+        tests += [TestNumberFormatting, TestStringMethods]
+    run_unittest(*tests)
+
+if __name__ == '__main__':
+    test_main()

Modified: python/branches/tlee-ast-optimize/Lib/test/test_math.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_math.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_math.py	Wed Jul 30 22:06:40 2008
@@ -646,10 +646,10 @@
         self.assert_(math.isnan(math.sqrt(NAN)))
 
     def testSum(self):
-        # math.sum relies on exact rounding for correct operation.
+        # math.fsum relies on exact rounding for correct operation.
         # There's a known problem with IA32 floating-point that causes
         # inexact rounding in some situations, and will cause the
-        # math.sum tests below to fail; see issue #2937.  On non IEEE
+        # math.fsum tests below to fail; see issue #2937.  On non IEEE
         # 754 platforms, and on IEEE 754 platforms that exhibit the
         # problem described in issue #2937, we simply skip the whole
         # test.
@@ -659,129 +659,74 @@
 
         # on IEEE 754 compliant machines, both of the expressions
         # below should round to 10000000000000002.0.
-        if 1e16+2.999 != 1e16+2.9999:
+        if 1e16+2.0 != 1e16+2.9999:
             return
 
-        # Python version of math.sum algorithm, for comparison
+        # Python version of math.fsum, for comparison.  Uses a
+        # different algorithm based on frexp, ldexp and integer
+        # arithmetic.
+        from sys import float_info
+        mant_dig = float_info.mant_dig
+        etiny = float_info.min_exp - mant_dig
+
         def msum(iterable):
-            """Full precision sum of values in iterable.  Returns the value of
-            the sum, rounded to the nearest representable floating-point number
-            using the round-half-to-even rule.
+            """Full precision summation.  Compute sum(iterable) without any
+            intermediate accumulation of error.  Based on the 'lsum' function
+            at http://code.activestate.com/recipes/393090/
 
             """
-            # Stage 1: accumulate partials
-            partials = []
+            tmant, texp = 0, 0
             for x in iterable:
-                i = 0
-                for y in partials:
-                    if abs(x) < abs(y):
-                        x, y = y, x
-                    hi = x + y
-                    lo = y - (hi - x)
-                    if lo:
-                        partials[i] = lo
-                        i += 1
-                    x = hi
-                partials[i:] = [x] if x else []
-
-            # Stage 2: sum partials
-            if not partials:
-                return 0.0
-
-            # sum from the top, stopping as soon as the sum is inexact.
-            total = partials.pop()
-            while partials:
-                x = partials.pop()
-                old_total, total = total, total + x
-                error = x - (total - old_total)
-                if error != 0.0:
-                    # adjust for correct rounding if necessary
-                    if partials and (partials[-1] > 0.0) == (error > 0.0) and \
-                            total + 2*error - total == 2*error:
-                        total += 2*error
-                    break
-            return total
-
-        from sys import float_info
-        maxfloat = float_info.max
-        twopow = 2.**(float_info.max_exp - 1)
+                mant, exp = math.frexp(x)
+                mant, exp = int(math.ldexp(mant, mant_dig)), exp - mant_dig
+                if texp > exp:
+                    tmant <<= texp-exp
+                    texp = exp
+                else:
+                    mant <<= exp-texp
+                tmant += mant
+            # Round tmant * 2**texp to a float.  The original recipe
+            # used float(str(tmant)) * 2.0**texp for this, but that's
+            # a little unsafe because str -> float conversion can't be
+            # relied upon to do correct rounding on all platforms.
+            tail = max(len(bin(abs(tmant)))-2 - mant_dig, etiny - texp)
+            if tail > 0:
+                h = 1 << (tail-1)
+                tmant = tmant // (2*h) + bool(tmant & h and tmant & 3*h-1)
+                texp += tail
+            return math.ldexp(tmant, texp)
 
         test_values = [
             ([], 0.0),
             ([0.0], 0.0),
             ([1e100, 1.0, -1e100, 1e-100, 1e50, -1.0, -1e50], 1e-100),
-            ([1e308, 1e308, -1e308], OverflowError),
-            ([-1e308, 1e308, 1e308], 1e308),
-            ([1e308, -1e308, 1e308], 1e308),
-            ([2.0**1023, 2.0**1023, -2.0**1000], OverflowError),
-            ([twopow, twopow, twopow, twopow, -twopow, -twopow, -twopow],
-             OverflowError),
             ([2.0**53, -0.5, -2.0**-54], 2.0**53-1.0),
             ([2.0**53, 1.0, 2.0**-100], 2.0**53+2.0),
             ([2.0**53+10.0, 1.0, 2.0**-100], 2.0**53+12.0),
-
             ([2.0**53-4.0, 0.5, 2.0**-54], 2.0**53-3.0),
-            ([2.0**1023-2.0**970, -1.0, 2.0**1023], OverflowError),
-            ([maxfloat, maxfloat*2.**-54], maxfloat),
-            ([maxfloat, maxfloat*2.**-53], OverflowError),
-            ([1./n for n in range(1, 1001)], 7.4854708605503451),
-            ([(-1.)**n/n for n in range(1, 1001)], -0.69264743055982025),
+            ([1./n for n in range(1, 1001)],
+             float.fromhex('0x1.df11f45f4e61ap+2')),
+            ([(-1.)**n/n for n in range(1, 1001)],
+             float.fromhex('-0x1.62a2af1bd3624p-1')),
             ([1.7**(i+1)-1.7**i for i in range(1000)] + [-1.7**1000], -1.0),
-            ([INF, -INF, NAN], ValueError),
-            ([NAN, INF, -INF], ValueError),
-            ([INF, NAN, INF], ValueError),
-
-            ([INF, INF], OverflowError),
-            ([INF, -INF], ValueError),
-            ([-INF, 1e308, 1e308, -INF], OverflowError),
-            ([2.0**1023-2.0**970, 0.0, 2.0**1023], OverflowError),
-            ([2.0**1023-2.0**970, 1.0, 2.0**1023], OverflowError),
-            ([2.0**1023, 2.0**1023], OverflowError),
-            ([2.0**1023, 2.0**1023, -1.0], OverflowError),
-            ([twopow, twopow, twopow, twopow, -twopow, -twopow],
-             OverflowError),
-            ([twopow, twopow, twopow, twopow, -twopow, twopow], OverflowError),
-            ([-twopow, -twopow, -twopow, -twopow], OverflowError),
-
-            ([2.**1023, 2.**1023, -2.**971], OverflowError),
-            ([2.**1023, 2.**1023, -2.**970], OverflowError),
-            ([-2.**970,  2.**1023,  2.**1023, -2.**-1074], OverflowError),
-            ([ 2.**1023, 2.**1023, -2.**970,   2.**-1074], OverflowError),
-            ([-2.**1023,  2.**971, -2.**1023], -maxfloat),
-            ([-2.**1023, -2.**1023, 2.**970],   OverflowError),
-            ([-2.**1023,  -2.**1023,  2.**970,  2.**-1074], OverflowError),
-            ([-2.**-1074, -2.**1023, -2.**1023, 2.**970], OverflowError),
-            ([2.**930, -2.**980, 2.**1023, 2.**1023, twopow, -twopow],
-             OverflowError),
-            ([2.**1023, 2.**1023, -1e307], OverflowError),
             ([1e16, 1., 1e-16], 10000000000000002.0),
             ([1e16-2., 1.-2.**-53, -(1e16-2.), -(1.-2.**-53)], 0.0),
-        ]
+            # exercise code for resizing partials array
+            ([2.**n - 2.**(n+50) + 2.**(n+52) for n in range(-1074, 972, 2)] +
+             [-2.**1022],
+             float.fromhex('0x1.5555555555555p+970')),
+            ]
 
-        for i, (vals, s) in enumerate(test_values):
-            if isinstance(s, type) and issubclass(s, Exception):
-                try:
-                    m = math.sum(vals)
-                except s:
-                    pass
-                else:
-                    self.fail("test %d failed: got %r, expected %r "
-                              "for math.sum(%.100r)" %
-                              (i, m, s.__name__, vals))
-            else:
-                try:
-                    self.assertEqual(math.sum(vals), s)
-                except OverflowError:
-                    self.fail("test %d failed: got OverflowError, expected %r "
-                              "for math.sum(%.100r)" % (i, s, vals))
-                except ValueError:
-                    self.fail("test %d failed: got ValueError, expected %r "
-                              "for math.sum(%.100r)" % (i, s, vals))
-
-                # compare with output of msum above, but only when
-                # result isn't an IEEE special or an exception
-                if not math.isinf(s) and not math.isnan(s):
-                    self.assertEqual(msum(vals), s)
+        for i, (vals, expected) in enumerate(test_values):
+            try:
+                actual = math.fsum(vals)
+            except OverflowError:
+                self.fail("test %d failed: got OverflowError, expected %r "
+                          "for math.fsum(%.100r)" % (i, expected, vals))
+            except ValueError:
+                self.fail("test %d failed: got ValueError, expected %r "
+                          "for math.fsum(%.100r)" % (i, expected, vals))
+            self.assertEqual(actual, expected)
 
         from random import random, gauss, shuffle
         for j in xrange(1000):
@@ -794,7 +739,7 @@
             shuffle(vals)
 
             s = msum(vals)
-            self.assertEqual(msum(vals), math.sum(vals))
+            self.assertEqual(msum(vals), math.fsum(vals))
 
 
     def testTan(self):

Modified: python/branches/tlee-ast-optimize/Lib/test/test_random.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_random.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_random.py	Wed Jul 30 22:06:40 2008
@@ -5,7 +5,7 @@
 import time
 import pickle
 import warnings
-from math import log, exp, sqrt, pi, sum as msum
+from math import log, exp, sqrt, pi, fsum as msum
 from test import test_support
 
 class TestBasicOps(unittest.TestCase):

Modified: python/branches/tlee-ast-optimize/Lib/test/test_robotparser.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_robotparser.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_robotparser.py	Wed Jul 30 22:06:40 2008
@@ -134,6 +134,75 @@
 
 RobotTest(7, doc, good, bad)
 
+# From Google: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=40364
+
+# 8.
+doc = """
+User-agent: Googlebot
+Allow: /folder1/myfile.html
+Disallow: /folder1/
+"""
+
+good = ['/folder1/myfile.html']
+bad = ['/folder1/anotherfile.html']
+
+RobotTest(8, doc, good, bad, agent="Googlebot")
+
+# 9.  This file is incorrect because "Googlebot" is a substring of
+#     "Googlebot-Mobile", so test 10 works just like test 9.
+doc = """
+User-agent: Googlebot
+Disallow: /
+
+User-agent: Googlebot-Mobile
+Allow: /
+"""
+
+good = []
+bad = ['/something.jpg']
+
+RobotTest(9, doc, good, bad, agent="Googlebot")
+
+good = []
+bad = ['/something.jpg']
+
+RobotTest(10, doc, good, bad, agent="Googlebot-Mobile")
+
+# 11.  Get the order correct.
+doc = """
+User-agent: Googlebot-Mobile
+Allow: /
+
+User-agent: Googlebot
+Disallow: /
+"""
+
+good = []
+bad = ['/something.jpg']
+
+RobotTest(11, doc, good, bad, agent="Googlebot")
+
+good = ['/something.jpg']
+bad = []
+
+RobotTest(12, doc, good, bad, agent="Googlebot-Mobile")
+
+
+# 13.  Google also got the order wrong in #8.  You need to specify the
+#      URLs from more specific to more general.
+doc = """
+User-agent: Googlebot
+Allow: /folder1/myfile.html
+Disallow: /folder1/
+"""
+
+good = ['/folder1/myfile.html']
+bad = ['/folder1/anotherfile.html']
+
+RobotTest(13, doc, good, bad, agent="googlebot")
+
+
+
 class TestCase(unittest.TestCase):
     def runTest(self):
         test_support.requires('network')

Modified: python/branches/tlee-ast-optimize/Lib/test/test_shelve.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_shelve.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_shelve.py	Wed Jul 30 22:06:40 2008
@@ -8,6 +8,21 @@
 
     fn = "shelftemp" + os.extsep + "db"
 
+    def test_close(self):
+        d1 = {}
+        s = shelve.Shelf(d1, protocol=2, writeback=False)
+        s['key1'] = [1,2,3,4]
+        self.assertEqual(s['key1'], [1,2,3,4])
+        self.assertEqual(len(s), 1)
+        s.close()
+        self.assertRaises(ValueError, len, s)
+        try:
+            s['key1']
+        except ValueError:
+            pass
+        else:
+            self.fail('Closed shelf should not find a key')
+
     def test_ascii_file_shelf(self):
         try:
             s = shelve.open(self.fn, protocol=0)

Modified: python/branches/tlee-ast-optimize/Lib/test/test_unicode.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_unicode.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_unicode.py	Wed Jul 30 22:06:40 2008
@@ -532,6 +532,9 @@
 
         self.assertEqual(unicode('+3ADYAA-', 'utf-7', 'replace'), u'\ufffd')
 
+        # Issue #2242: crash on some Windows/MSVC versions
+        self.assertRaises(UnicodeDecodeError, '+\xc1'.decode, 'utf-7')
+
     def test_codecs_utf8(self):
         self.assertEqual(u''.encode('utf-8'), '')
         self.assertEqual(u'\u20ac'.encode('utf-8'), '\xe2\x82\xac')

Modified: python/branches/tlee-ast-optimize/Lib/test/test_zipfile.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/test/test_zipfile.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/test/test_zipfile.py	Wed Jul 30 22:06:40 2008
@@ -372,6 +372,19 @@
         # remove the test file subdirectories
         shutil.rmtree(os.path.join(os.getcwd(), 'ziptest2dir'))
 
+    def zip_test_writestr_permissions(self, f, compression):
+        # Make sure that writestr creates files with mode 0600,
+        # when it is passed a name rather than a ZipInfo instance.
+
+        self.makeTestArchive(f, compression)
+        zipfp = zipfile.ZipFile(f, "r")
+        zinfo = zipfp.getinfo('strfile')
+        self.assertEqual(zinfo.external_attr, 0600 << 16)
+
+    def test_writestr_permissions(self):
+        for f in (TESTFN2, TemporaryFile(), StringIO()):
+            self.zip_test_writestr_permissions(f, zipfile.ZIP_STORED)
+
     def tearDown(self):
         os.remove(TESTFN)
         os.remove(TESTFN2)

Modified: python/branches/tlee-ast-optimize/Lib/zipfile.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/zipfile.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/zipfile.py	Wed Jul 30 22:06:40 2008
@@ -1064,6 +1064,7 @@
             zinfo = ZipInfo(filename=zinfo_or_arcname,
                             date_time=time.localtime(time.time())[:6])
             zinfo.compress_type = self.compression
+            zinfo.external_attr = 0600 << 16
         else:
             zinfo = zinfo_or_arcname
 

Modified: python/branches/tlee-ast-optimize/Misc/NEWS
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/NEWS	(original)
+++ python/branches/tlee-ast-optimize/Misc/NEWS	Wed Jul 30 22:06:40 2008
@@ -12,6 +12,9 @@
 Core and Builtins
 -----------------
 
+- Issue #1819: function calls with several named parameters are now on
+  average 35% faster (as measured by pybench).
+
 - Issue #2378: An unexpected UnboundLocalError or NameError could appear when
   the python debugger steps into a class statement: the free variables (local
   variables defined in an outer scope) would be deleted from the outer scope.
@@ -26,6 +29,19 @@
 Library
 -------
 
+- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
+  asking for a specific length.
+
+- Issue #3449: Update decimal module to use most recent specification
+  (v. 1.68) and tests (v. 2.58) from IBM.
+
+- Issue 3437: Bug fix in robotparser parsing of Allow: lines.
+
+- Issue 1592:  Improve error reporting when operations are attempted
+  on a closed shelf.
+
+- Deprecate the "ast" parser function aliases.
+
 - Issue #3120: On 64-bit Windows the subprocess module was truncating handles.
 
 - Issue #3303: Fix a crash in locale.strcoll() when calling it with
@@ -39,6 +55,10 @@
 
 - Deprecate the sunaudio module for removal in Python 3.0.
 
+- Issue #3394: zipfile.writestr sets external attributes when passed a
+  file name rather than a ZipInfo instance, so files are extracted with
+  mode 0600 rather than 000 under Unix.
+
 
 What's New in Python 2.6 beta 2?
 ================================

Modified: python/branches/tlee-ast-optimize/Modules/_bisectmodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/_bisectmodule.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/_bisectmodule.c	Wed Jul 30 22:06:40 2008
@@ -5,7 +5,7 @@
 
 #include "Python.h"
 
-static int
+static Py_ssize_t
 internal_bisect_right(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t hi)
 {
 	PyObject *litem;
@@ -41,18 +41,18 @@
 bisect_right(PyObject *self, PyObject *args, PyObject *kw)
 {
 	PyObject *list, *item;
-	int lo = 0;
-	int hi = -1;
-	int index;
+	Py_ssize_t lo = 0;
+	Py_ssize_t hi = -1;
+	Py_ssize_t index;
 	static char *keywords[] = {"a", "x", "lo", "hi", NULL};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|ii:bisect_right",
+	if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|nn:bisect_right",
 		keywords, &list, &item, &lo, &hi))
 		return NULL;
 	index = internal_bisect_right(list, item, lo, hi);
 	if (index < 0)
 		return NULL;
-	return PyInt_FromLong(index);
+	return PyInt_FromSsize_t(index);
 }
 
 PyDoc_STRVAR(bisect_right_doc,
@@ -71,12 +71,12 @@
 insort_right(PyObject *self, PyObject *args, PyObject *kw)
 {
 	PyObject *list, *item, *result;
-	int lo = 0;
-	int hi = -1;
-	int index;
+	Py_ssize_t lo = 0;
+	Py_ssize_t hi = -1;
+	Py_ssize_t index;
 	static char *keywords[] = {"a", "x", "lo", "hi", NULL};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|ii:insort_right",
+	if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|nn:insort_right",
 		keywords, &list, &item, &lo, &hi))
 		return NULL;
 	index = internal_bisect_right(list, item, lo, hi);
@@ -86,7 +86,7 @@
 		if (PyList_Insert(list, index, item) < 0)
 			return NULL;
 	} else {
-		result = PyObject_CallMethod(list, "insert", "iO",
+		result = PyObject_CallMethod(list, "insert", "nO",
 					     index, item);
 		if (result == NULL)
 			return NULL;
@@ -106,11 +106,11 @@
 Optional args lo (default 0) and hi (default len(a)) bound the\n\
 slice of a to be searched.\n");
 
-static int
-internal_bisect_left(PyObject *list, PyObject *item, int lo, int hi)
+static Py_ssize_t
+internal_bisect_left(PyObject *list, PyObject *item, Py_ssize_t lo, Py_ssize_t hi)
 {
 	PyObject *litem;
-	int mid, res;
+	Py_ssize_t mid, res;
 
 	if (lo < 0) {
 		PyErr_SetString(PyExc_ValueError, "lo must be non-negative");
@@ -142,18 +142,18 @@
 bisect_left(PyObject *self, PyObject *args, PyObject *kw)
 {
 	PyObject *list, *item;
-	int lo = 0;
-	int hi = -1;
-	int index;
+	Py_ssize_t lo = 0;
+	Py_ssize_t hi = -1;
+	Py_ssize_t index;
 	static char *keywords[] = {"a", "x", "lo", "hi", NULL};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|ii:bisect_left",
+	if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|nn:bisect_left",
 		keywords, &list, &item, &lo, &hi))
 		return NULL;
 	index = internal_bisect_left(list, item, lo, hi);
 	if (index < 0)
 		return NULL;
-	return PyInt_FromLong(index);
+	return PyInt_FromSsize_t(index);
 }
 
 PyDoc_STRVAR(bisect_left_doc,
@@ -172,12 +172,12 @@
 insort_left(PyObject *self, PyObject *args, PyObject *kw)
 {
 	PyObject *list, *item, *result;
-	int lo = 0;
-	int hi = -1;
-	int index;
+	Py_ssize_t lo = 0;
+	Py_ssize_t hi = -1;
+	Py_ssize_t index;
 	static char *keywords[] = {"a", "x", "lo", "hi", NULL};
 
-	if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|ii:insort_left",
+	if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|nn:insort_left",
 		keywords, &list, &item, &lo, &hi))
 		return NULL;
 	index = internal_bisect_left(list, item, lo, hi);

Modified: python/branches/tlee-ast-optimize/Modules/_collectionsmodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/_collectionsmodule.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/_collectionsmodule.c	Wed Jul 30 22:06:40 2008
@@ -52,20 +52,20 @@
 } block;
 
 #define MAXFREEBLOCKS 10
-static int numfreeblocks = 0;
+static Py_ssize_t numfreeblocks = 0;
 static block *freeblocks[MAXFREEBLOCKS];
 
 static block *
-newblock(block *leftlink, block *rightlink, int len) {
+newblock(block *leftlink, block *rightlink, Py_ssize_t len) {
 	block *b;
-	/* To prevent len from overflowing INT_MAX on 64-bit machines, we
+	/* To prevent len from overflowing PY_SSIZE_T_MAX on 64-bit machines, we
 	 * refuse to allocate new blocks if the current len is dangerously
 	 * close.  There is some extra margin to prevent spurious arithmetic
 	 * overflows at various places.  The following check ensures that
 	 * the blocks allocated to the deque, in the worst case, can only
-	 * have INT_MAX-2 entries in total.
+	 * have PY_SSIZE_T_MAX-2 entries in total.
 	 */
-	if (len >= INT_MAX - 2*BLOCKLEN) {
+	if (len >= PY_SSIZE_T_MAX - 2*BLOCKLEN) {
 		PyErr_SetString(PyExc_OverflowError,
 				"cannot add more blocks to the deque");
 		return NULL;
@@ -100,10 +100,10 @@
 	PyObject_HEAD
 	block *leftblock;
 	block *rightblock;
-	int leftindex;	/* in range(BLOCKLEN) */
-	int rightindex;	/* in range(BLOCKLEN) */
-	int len;
-	int maxlen;
+	Py_ssize_t leftindex;	/* in range(BLOCKLEN) */
+	Py_ssize_t rightindex;	/* in range(BLOCKLEN) */
+	Py_ssize_t len;
+	Py_ssize_t maxlen;
 	long state;	/* incremented whenever the indices move */
 	PyObject *weakreflist; /* List of weak references */
 } dequeobject;
@@ -355,7 +355,7 @@
 static int
 _deque_rotate(dequeobject *deque, Py_ssize_t n)
 {
-	int i, len=deque->len, halflen=(len+1)>>1;
+	Py_ssize_t i, len=deque->len, halflen=(len+1)>>1;
 	PyObject *item, *rv;
 
 	if (len == 0)
@@ -392,9 +392,9 @@
 static PyObject *
 deque_rotate(dequeobject *deque, PyObject *args)
 {
-	int n=1;
+	Py_ssize_t n=1;
 
-	if (!PyArg_ParseTuple(args, "|i:rotate", &n))
+	if (!PyArg_ParseTuple(args, "|n:rotate", &n))
 		return NULL;
 	if (_deque_rotate(deque, n) == 0)
 		Py_RETURN_NONE;
@@ -462,11 +462,11 @@
 }
 
 static PyObject *
-deque_item(dequeobject *deque, int i)
+deque_item(dequeobject *deque, Py_ssize_t i)
 {
 	block *b;
 	PyObject *item;
-	int n, index=i;
+	Py_ssize_t n, index=i;
 
 	if (i < 0 || i >= deque->len) {
 		PyErr_SetString(PyExc_IndexError,
@@ -591,11 +591,11 @@
 {
 	block *b;
 	PyObject *item;
-	int index;
-	int indexlo = deque->leftindex;
+	Py_ssize_t index;
+	Py_ssize_t indexlo = deque->leftindex;
 
 	for (b = deque->leftblock; b != NULL; b = b->rightlink) {
-		const int indexhi = b == deque->rightblock ?
+		const Py_ssize_t indexhi = b == deque->rightblock ?
 					 deque->rightindex :
 				    	 BLOCKLEN - 1;
 
@@ -637,12 +637,12 @@
 		if (deque->maxlen == -1)
 			result = Py_BuildValue("O(O)", Py_TYPE(deque), aslist);
 		else
-			result = Py_BuildValue("O(Oi)", Py_TYPE(deque), aslist, deque->maxlen);
+			result = Py_BuildValue("O(On)", Py_TYPE(deque), aslist, deque->maxlen);
 	} else {
 		if (deque->maxlen == -1)
 			result = Py_BuildValue("O(OO)O", Py_TYPE(deque), aslist, Py_None, dict);
 		else
-			result = Py_BuildValue("O(Oi)O", Py_TYPE(deque), aslist, deque->maxlen, dict);
+			result = Py_BuildValue("O(On)O", Py_TYPE(deque), aslist, deque->maxlen, dict);
 	}
 	Py_XDECREF(dict);
 	Py_DECREF(aslist);
@@ -742,7 +742,8 @@
 deque_richcompare(PyObject *v, PyObject *w, int op)
 {
 	PyObject *it1=NULL, *it2=NULL, *x, *y;
-	int b, vs, ws, cmp=-1;
+	Py_ssize_t vs, ws;
+	int b, cmp=-1;
 
 	if (!PyObject_TypeCheck(v, &deque_type) ||
 	    !PyObject_TypeCheck(w, &deque_type)) {
@@ -821,13 +822,13 @@
 {
 	PyObject *iterable = NULL;
 	PyObject *maxlenobj = NULL;
-	int maxlen = -1;
+	Py_ssize_t maxlen = -1;
 	char *kwlist[] = {"iterable", "maxlen", 0};
 
 	if (!PyArg_ParseTupleAndKeywords(args, kwdargs, "|OO:deque", kwlist, &iterable, &maxlenobj))
 		return -1;
 	if (maxlenobj != NULL && maxlenobj != Py_None) {
-		maxlen = PyInt_AsLong(maxlenobj);
+		maxlen = PyInt_AsSsize_t(maxlenobj);
 		if (maxlen == -1 && PyErr_Occurred())
 			return -1;
 		if (maxlen < 0) {
@@ -943,11 +944,11 @@
 
 typedef struct {
 	PyObject_HEAD
-	int index;
+	Py_ssize_t index;
 	block *b;
 	dequeobject *deque;
 	long state;	/* state when the iterator is created */
-	int counter;    /* number of items remaining for iteration */
+	Py_ssize_t counter;    /* number of items remaining for iteration */
 } dequeiterobject;
 
 static PyTypeObject dequeiter_type;

Modified: python/branches/tlee-ast-optimize/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/_ctypes/_ctypes.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/_ctypes/_ctypes.c	Wed Jul 30 22:06:40 2008
@@ -1863,8 +1863,8 @@
 		return NULL;
 	}
 	if (PyString_Check(proto)) {
-		proto_str = PyBytes_AS_STRING(proto);
-		proto_len = PyBytes_GET_SIZE(proto);
+		proto_str = PyString_AS_STRING(proto);
+		proto_len = PyString_GET_SIZE(proto);
 	} else {
 		PyErr_SetString(PyExc_TypeError,
 			"class must define a '_type_' string attribute");
@@ -2506,6 +2506,7 @@
 	{ NULL },
 };
 
+#if (PY_VERSION_HEX >= 0x02060000)
 static int CData_NewGetBuffer(PyObject *_self, Py_buffer *view, int flags)
 {
 	CDataObject *self = (CDataObject *)_self;
@@ -2530,6 +2531,7 @@
 	view->internal = NULL;
 	return 0;
 }
+#endif
 
 static Py_ssize_t CData_GetSegcount(PyObject *_self, Py_ssize_t *lenp)
 {
@@ -2554,8 +2556,10 @@
 	(writebufferproc)CData_GetBuffer,
 	(segcountproc)CData_GetSegcount,
 	(charbufferproc)NULL,
+#if (PY_VERSION_HEX >= 0x02060000)
 	(getbufferproc)CData_NewGetBuffer,
 	(releasebufferproc)NULL,
+#endif
 };
 
 /*

Modified: python/branches/tlee-ast-optimize/Modules/_ctypes/ctypes.h
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/_ctypes/ctypes.h	(original)
+++ python/branches/tlee-ast-optimize/Modules/_ctypes/ctypes.h	Wed Jul 30 22:06:40 2008
@@ -6,11 +6,19 @@
 #   include <alloca.h>
 #endif
 
+#if (PY_VERSION_HEX < 0x02040000)
+#define PyDict_CheckExact(ob) (Py_TYPE(ob) == &PyDict_Type)
+#endif
+
 #if (PY_VERSION_HEX < 0x02050000)
 typedef int Py_ssize_t;
 #define PyInt_FromSsize_t PyInt_FromLong
 #define PyNumber_AsSsize_t(ob, exc) PyInt_AsLong(ob)
 #define PyIndex_Check(ob) PyInt_Check(ob)
+typedef Py_ssize_t (*readbufferproc)(PyObject *, Py_ssize_t, void **);
+typedef Py_ssize_t (*writebufferproc)(PyObject *, Py_ssize_t, void **);
+typedef Py_ssize_t (*segcountproc)(PyObject *, Py_ssize_t *);
+typedef Py_ssize_t (*charbufferproc)(PyObject *, Py_ssize_t, char **);
 #endif
 
 #if (PY_VERSION_HEX < 0x02060000)
@@ -18,6 +26,8 @@
 #define PyVarObject_HEAD_INIT(type, size) \
 	PyObject_HEAD_INIT(type) size,
 #define PyImport_ImportModuleNoBlock PyImport_ImportModule
+#define PyLong_FromSsize_t PyInt_FromLong
+#define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
 
 

Modified: python/branches/tlee-ast-optimize/Modules/mathmodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/mathmodule.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/mathmodule.c	Wed Jul 30 22:06:40 2008
@@ -341,7 +341,7 @@
    Note 4: A similar implementation is in Modules/cmathmodule.c.
    Be sure to update both when making changes.
 
-   Note 5: The signature of math.sum() differs from __builtin__.sum()
+   Note 5: The signature of math.fsum() differs from __builtin__.sum()
    because the start argument doesn't make sense in the context of
    accurate summation.  Since the partials table is collapsed before
    returning a result, sum(seq2, start=sum(seq1)) may not equal the
@@ -352,7 +352,7 @@
 
 /* Extend the partials array p[] by doubling its size. */
 static int                          /* non-zero on error */
-_sum_realloc(double **p_ptr, Py_ssize_t  n,
+_fsum_realloc(double **p_ptr, Py_ssize_t  n,
              double  *ps,    Py_ssize_t *m_ptr)
 {
 	void *v = NULL;
@@ -370,7 +370,7 @@
 			v = PyMem_Realloc(p, sizeof(double) * m);
 	}
 	if (v == NULL) {        /* size overflow or no memory */
-		PyErr_SetString(PyExc_MemoryError, "math sum partials");
+		PyErr_SetString(PyExc_MemoryError, "math.fsum partials");
 		return 1;
 	}
 	*p_ptr = (double*) v;
@@ -409,18 +409,19 @@
 */
 
 static PyObject*
-math_sum(PyObject *self, PyObject *seq)
+math_fsum(PyObject *self, PyObject *seq)
 {
 	PyObject *item, *iter, *sum = NULL;
 	Py_ssize_t i, j, n = 0, m = NUM_PARTIALS;
 	double x, y, t, ps[NUM_PARTIALS], *p = ps;
+	double xsave, special_sum = 0.0, inf_sum = 0.0;
 	volatile double hi, yr, lo;
 
 	iter = PyObject_GetIter(seq);
 	if (iter == NULL)
 		return NULL;
 
-	PyFPE_START_PROTECT("sum", Py_DECREF(iter); return NULL)
+	PyFPE_START_PROTECT("fsum", Py_DECREF(iter); return NULL)
 
 	for(;;) {           /* for x in iterable */
 		assert(0 <= n && n <= m);
@@ -430,18 +431,19 @@
 		item = PyIter_Next(iter);
 		if (item == NULL) {
 			if (PyErr_Occurred())
-				goto _sum_error;
+				goto _fsum_error;
 			break;
 		}
 		x = PyFloat_AsDouble(item);
 		Py_DECREF(item);
 		if (PyErr_Occurred())
-			goto _sum_error;
+			goto _fsum_error;
 
+		xsave = x;
 		for (i = j = 0; j < n; j++) {       /* for y in partials */
 			y = p[j];
 			if (fabs(x) < fabs(y)) {
-					t = x; x = y; y = t;
+				t = x; x = y; y = t;
 			}
 			hi = x + y;
 			yr = hi - x;
@@ -450,59 +452,73 @@
 				p[i++] = lo;
 			x = hi;
 		}
-		
-		n = i;                              /* ps[i:] = [x] */                   
+
+		n = i;                              /* ps[i:] = [x] */
 		if (x != 0.0) {
-			/* If non-finite, reset partials, effectively
-			   adding subsequent items without roundoff
-			   and yielding correct non-finite results,
-			   provided IEEE 754 rules are observed */
-			if (! Py_IS_FINITE(x))
+			if (! Py_IS_FINITE(x)) {
+				/* a nonfinite x could arise either as
+				   a result of intermediate overflow, or
+				   as a result of a nan or inf in the
+				   summands */
+				if (Py_IS_FINITE(xsave)) {
+					PyErr_SetString(PyExc_OverflowError,
+					      "intermediate overflow in fsum");
+					goto _fsum_error;
+				}
+				if (Py_IS_INFINITY(xsave))
+					inf_sum += xsave;
+				special_sum += xsave;
+				/* reset partials */
 				n = 0;
-			else if (n >= m && _sum_realloc(&p, n, ps, &m))
-				goto _sum_error;
-			p[n++] = x;
+			}
+			else if (n >= m && _fsum_realloc(&p, n, ps, &m))
+				goto _fsum_error;
+			else
+				p[n++] = x;
 		}
 	}
 
+	if (special_sum != 0.0) {
+		if (Py_IS_NAN(inf_sum))
+			PyErr_SetString(PyExc_ValueError,
+					"-inf + inf in fsum");
+		else
+			sum = PyFloat_FromDouble(special_sum);
+		goto _fsum_error;
+	}
+
 	hi = 0.0;
 	if (n > 0) {
 		hi = p[--n];
-		if (Py_IS_FINITE(hi)) {
-			/* sum_exact(ps, hi) from the top, stop when the sum becomes inexact. */
-			while (n > 0) {
-				x = hi;
-				y = p[--n];
-				assert(fabs(y) < fabs(x));
-				hi = x + y;
-				yr = hi - x;
-				lo = y - yr;
-				if (lo != 0.0)
-					break;
-			}
-			/* Make half-even rounding work across multiple partials.  Needed 
-			   so that sum([1e-16, 1, 1e16]) will round-up the last digit to 
-			   two instead of down to zero (the 1e-16 makes the 1 slightly 
-			   closer to two).  With a potential 1 ULP rounding error fixed-up,
-			   math.sum() can guarantee commutativity. */
-			if (n > 0 && ((lo < 0.0 && p[n-1] < 0.0) ||
-			              (lo > 0.0 && p[n-1] > 0.0))) {
-				y = lo * 2.0;
-				x = hi + y;
-				yr = x - hi;
-				if (y == yr)
-					hi = x;
-			}
+		/* sum_exact(ps, hi) from the top, stop when the sum becomes
+		   inexact. */
+		while (n > 0) {
+			x = hi;
+			y = p[--n];
+			assert(fabs(y) < fabs(x));
+			hi = x + y;
+			yr = hi - x;
+			lo = y - yr;
+			if (lo != 0.0)
+				break;
 		}
-		else {  /* raise exception corresponding to a special value */
-			errno = Py_IS_NAN(hi) ? EDOM : ERANGE;
-			if (is_error(hi))
-				goto _sum_error;
+		/* Make half-even rounding work across multiple partials.
+		   Needed so that sum([1e-16, 1, 1e16]) will round-up the last
+		   digit to two instead of down to zero (the 1e-16 makes the 1
+		   slightly closer to two).  With a potential 1 ULP rounding
+		   error fixed-up, math.fsum() can guarantee commutativity. */
+		if (n > 0 && ((lo < 0.0 && p[n-1] < 0.0) ||
+			      (lo > 0.0 && p[n-1] > 0.0))) {
+			y = lo * 2.0;
+			x = hi + y;
+			yr = x - hi;
+			if (y == yr)
+				hi = x;
 		}
 	}
 	sum = PyFloat_FromDouble(hi);
 
-_sum_error:
+_fsum_error:
 	PyFPE_END_PROTECT(hi)
 	Py_DECREF(iter);
 	if (p != ps)
@@ -512,7 +528,7 @@
 
 #undef NUM_PARTIALS
 
-PyDoc_STRVAR(math_sum_doc,
+PyDoc_STRVAR(math_fsum_doc,
 "sum(iterable)\n\n\
 Return an accurate floating point sum of values in the iterable.\n\
 Assumes IEEE-754 floating point arithmetic.");
@@ -1005,6 +1021,7 @@
 	{"floor",	math_floor,	METH_O,		math_floor_doc},
 	{"fmod",	math_fmod,	METH_VARARGS,	math_fmod_doc},
 	{"frexp",	math_frexp,	METH_O,		math_frexp_doc},
+	{"fsum",	math_fsum,	METH_O,		math_fsum_doc},
 	{"hypot",	math_hypot,	METH_VARARGS,	math_hypot_doc},
 	{"isinf",	math_isinf,	METH_O,		math_isinf_doc},
 	{"isnan",	math_isnan,	METH_O,		math_isnan_doc},
@@ -1018,10 +1035,9 @@
 	{"sin",		math_sin,	METH_O,		math_sin_doc},
 	{"sinh",	math_sinh,	METH_O,		math_sinh_doc},
 	{"sqrt",	math_sqrt,	METH_O,		math_sqrt_doc},
-	{"sum",		math_sum,	METH_O,		math_sum_doc},
 	{"tan",		math_tan,	METH_O,		math_tan_doc},
 	{"tanh",	math_tanh,	METH_O,		math_tanh_doc},
- 	{"trunc",	math_trunc,	METH_O,		math_trunc_doc},
+	{"trunc",	math_trunc,	METH_O,		math_trunc_doc},
 	{NULL,		NULL}		/* sentinel */
 };
 

Modified: python/branches/tlee-ast-optimize/Modules/parsermodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/parsermodule.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/parsermodule.c	Wed Jul 30 22:06:40 2008
@@ -324,6 +324,14 @@
     return (res);
 }
 
+static PyObject*
+parser_ast2tuple(PyST_Object *self, PyObject *args, PyObject *kw)
+{
+    if (PyErr_WarnPy3k("ast2tuple is removed in 3.x; use st2tuple", 1) < 0)
+        return NULL;
+    return parser_st2tuple(self, args, kw);
+}
+
 
 /*  parser_st2list(PyObject* self, PyObject* args, PyObject* kw)
  *
@@ -367,6 +375,14 @@
     return (res);
 }
 
+static PyObject*
+parser_ast2list(PyST_Object *self, PyObject *args, PyObject *kw)
+{
+    if (PyErr_WarnPy3k("ast2list is removed in 3.x; use st2list", 1) < 0)
+        return NULL;
+    return parser_st2list(self, args, kw);
+}
+
 
 /*  parser_compilest(PyObject* self, PyObject* args)
  *
@@ -396,6 +412,14 @@
     return (res);
 }
 
+static PyObject*
+parser_compileast(PyST_Object *self, PyObject *args, PyObject *kw)
+{
+    if (PyErr_WarnPy3k("compileast is removed in 3.x; use compilest", 1) < 0)
+        return NULL;
+    return parser_compilest(self, args, kw);
+}
+
 
 /*  PyObject* parser_isexpr(PyObject* self, PyObject* args)
  *  PyObject* parser_issuite(PyObject* self, PyObject* args)
@@ -634,6 +658,14 @@
     return st;
 }
 
+static PyObject*
+parser_tuple2ast(PyST_Object *self, PyObject *args, PyObject *kw)
+{
+    if (PyErr_WarnPy3k("tuple2ast is removed in 3.x; use tuple2st", 1) < 0)
+        return NULL;
+    return parser_tuple2st(self, args, kw);
+}
+
 
 /*  node* build_node_children()
  *
@@ -3203,11 +3235,11 @@
  *  inheritance.
  */
 static PyMethodDef parser_functions[] =  {
-    {"ast2tuple",       (PyCFunction)parser_st2tuple,  PUBLIC_METHOD_TYPE,
+    {"ast2tuple",       (PyCFunction)parser_ast2tuple, PUBLIC_METHOD_TYPE,
         PyDoc_STR("Creates a tuple-tree representation of an ST.")},
-    {"ast2list",        (PyCFunction)parser_st2list,   PUBLIC_METHOD_TYPE,
+    {"ast2list",        (PyCFunction)parser_ast2list,  PUBLIC_METHOD_TYPE,
         PyDoc_STR("Creates a list-tree representation of an ST.")},
-    {"compileast",      (PyCFunction)parser_compilest, PUBLIC_METHOD_TYPE,
+    {"compileast",      (PyCFunction)parser_compileast,PUBLIC_METHOD_TYPE,
         PyDoc_STR("Compiles an ST object into a code object.")},
     {"compilest",      (PyCFunction)parser_compilest,  PUBLIC_METHOD_TYPE,
         PyDoc_STR("Compiles an ST object into a code object.")},
@@ -3219,7 +3251,7 @@
         PyDoc_STR("Determines if an ST object was created from a suite.")},
     {"suite",           (PyCFunction)parser_suite,     PUBLIC_METHOD_TYPE,
         PyDoc_STR("Creates an ST object from a suite.")},
-    {"sequence2ast",    (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
+    {"sequence2ast",    (PyCFunction)parser_tuple2ast, PUBLIC_METHOD_TYPE,
         PyDoc_STR("Creates an ST object from a tree representation.")},
     {"sequence2st",     (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
         PyDoc_STR("Creates an ST object from a tree representation.")},
@@ -3227,7 +3259,7 @@
         PyDoc_STR("Creates a tuple-tree representation of an ST.")},
     {"st2list",         (PyCFunction)parser_st2list,   PUBLIC_METHOD_TYPE,
         PyDoc_STR("Creates a list-tree representation of an ST.")},
-    {"tuple2ast",       (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
+    {"tuple2ast",       (PyCFunction)parser_tuple2ast, PUBLIC_METHOD_TYPE,
         PyDoc_STR("Creates an ST object from a tree representation.")},
     {"tuple2st",        (PyCFunction)parser_tuple2st,  PUBLIC_METHOD_TYPE,
         PyDoc_STR("Creates an ST object from a tree representation.")},

Modified: python/branches/tlee-ast-optimize/Objects/enumobject.c
==============================================================================
--- python/branches/tlee-ast-optimize/Objects/enumobject.c	(original)
+++ python/branches/tlee-ast-optimize/Objects/enumobject.c	Wed Jul 30 22:06:40 2008
@@ -4,10 +4,10 @@
 
 typedef struct {
 	PyObject_HEAD
-	long      en_index;        /* current index of enumeration */
+	Py_ssize_t en_index;	   /* current index of enumeration */
 	PyObject* en_sit;          /* secondary iterator of enumeration */
 	PyObject* en_result;	   /* result tuple  */
-	PyObject* en_longindex;	   /* index for sequences >= LONG_MAX */
+	PyObject* en_longindex;	   /* index for sequences >= PY_SSIZE_T_MAX */
 } enumobject;
 
 static PyObject *
@@ -25,18 +25,19 @@
 	en = (enumobject *)type->tp_alloc(type, 0);
 	if (en == NULL)
 		return NULL;
-	if (start) {
+	if (start != NULL) {
 		start = PyNumber_Index(start);
 		if (start == NULL) {
 			Py_DECREF(en);
 			return NULL;
 		}
-		if (PyLong_Check(start)) {
-			en->en_index = LONG_MAX;
+		assert(PyInt_Check(start) || PyLong_Check(start));
+		en->en_index = PyInt_AsSsize_t(start);
+		if (en->en_index == -1 && PyErr_Occurred()) {
+			PyErr_Clear();
+			en->en_index = PY_SSIZE_T_MAX;
 			en->en_longindex = start;
 		} else {
-			assert(PyInt_Check(start));
-			en->en_index = PyInt_AsLong(start);
 			en->en_longindex = NULL;
 			Py_DECREF(start);
 		}
@@ -85,7 +86,7 @@
 	PyObject *stepped_up;
 
 	if (en->en_longindex == NULL) {
-		en->en_longindex = PyInt_FromLong(LONG_MAX);
+		en->en_longindex = PyInt_FromSsize_t(PY_SSIZE_T_MAX);
 		if (en->en_longindex == NULL)
 			return NULL;
 	}
@@ -130,10 +131,10 @@
 	if (next_item == NULL)
 		return NULL;
 
-	if (en->en_index == LONG_MAX)
+	if (en->en_index == PY_SSIZE_T_MAX)
 		return enum_next_long(en, next_item);
 
-	next_index = PyInt_FromLong(en->en_index);
+	next_index = PyInt_FromSsize_t(en->en_index);
 	if (next_index == NULL) {
 		Py_DECREF(next_item);
 		return NULL;

Modified: python/branches/tlee-ast-optimize/Objects/exceptions.c
==============================================================================
--- python/branches/tlee-ast-optimize/Objects/exceptions.c	(original)
+++ python/branches/tlee-ast-optimize/Objects/exceptions.c	Wed Jul 30 22:06:40 2008
@@ -2045,6 +2045,7 @@
     PRE_INIT(SystemError)
     PRE_INIT(ReferenceError)
     PRE_INIT(MemoryError)
+    PRE_INIT(BufferError)
     PRE_INIT(Warning)
     PRE_INIT(UserWarning)
     PRE_INIT(DeprecationWarning)
@@ -2112,6 +2113,7 @@
     POST_INIT(SystemError)
     POST_INIT(ReferenceError)
     POST_INIT(MemoryError)
+    POST_INIT(BufferError)
     POST_INIT(Warning)
     POST_INIT(UserWarning)
     POST_INIT(DeprecationWarning)

Modified: python/branches/tlee-ast-optimize/Objects/unicodeobject.c
==============================================================================
--- python/branches/tlee-ast-optimize/Objects/unicodeobject.c	(original)
+++ python/branches/tlee-ast-optimize/Objects/unicodeobject.c	Wed Jul 30 22:06:40 2008
@@ -1523,7 +1523,7 @@
     while (s < e) {
         Py_UNICODE ch;
         restart:
-        ch = *s;
+        ch = (unsigned char) *s;
 
         if (inShift) {
             if ((ch == '-') || !B64CHAR(ch)) {

Modified: python/branches/tlee-ast-optimize/Python/ceval.c
==============================================================================
--- python/branches/tlee-ast-optimize/Python/ceval.c	(original)
+++ python/branches/tlee-ast-optimize/Python/ceval.c	Wed Jul 30 22:06:40 2008
@@ -640,9 +640,9 @@
 	processor's own internal branch predication has a high likelihood of
 	success, resulting in a nearly zero-overhead transition to the
 	next opcode.  A successful prediction saves a trip through the eval-loop
-	including its two unpredictable branches, the HAS_ARG test and the 
+	including its two unpredictable branches, the HAS_ARG test and the
 	switch-case.  Combined with the processor's internal branch prediction,
-	a successful PREDICT has the effect of making the two opcodes run as if 
+	a successful PREDICT has the effect of making the two opcodes run as if
 	they were a single new opcode with the bodies combined.
 
     If collecting opcode statistics, your choices are to either keep the
@@ -737,7 +737,7 @@
 			   an argument which depends on the situation.
 			   The global trace function is also called
 			   whenever an exception is detected. */
-			if (call_trace_protected(tstate->c_tracefunc, 
+			if (call_trace_protected(tstate->c_tracefunc,
 						 tstate->c_traceobj,
 						 f, PyTrace_CALL, Py_None)) {
 				/* Trace function raised an error */
@@ -769,10 +769,10 @@
 	   this wasn't always true before 2.3!  PyFrame_New now sets
 	   f->f_lasti to -1 (i.e. the index *before* the first instruction)
 	   and YIELD_VALUE doesn't fiddle with f_lasti any more.  So this
-	   does work.  Promise. 
+	   does work.  Promise.
 
 	   When the PREDICT() macros are enabled, some opcode pairs follow in
-           direct succession without updating f->f_lasti.  A successful 
+           direct succession without updating f->f_lasti.  A successful
            prediction effectively links the two codes together as if they
            were a single new opcode; accordingly,f->f_lasti will point to
            the first code in the pair (for instance, GET_ITER followed by
@@ -2210,7 +2210,7 @@
                            because it prevents detection of a control-break in tight loops like
                            "while 1: pass".  Compile with this option turned-on when you need
                            the speed-up and do not need break checking inside tight loops (ones
-                           that contain only instructions ending with goto fast_next_opcode). 
+                           that contain only instructions ending with goto fast_next_opcode).
                         */
 			goto fast_next_opcode;
 #else
@@ -2779,6 +2779,7 @@
 			}
 		}
 		for (i = 0; i < kwcount; i++) {
+			PyObject **co_varnames;
 			PyObject *keyword = kws[2*i];
 			PyObject *value = kws[2*i + 1];
 			int j;
@@ -2788,14 +2789,21 @@
 				    PyString_AsString(co->co_name));
 				goto fail;
 			}
-			/* XXX slow -- speed up using dictionary? */
+			/* Speed hack: do raw pointer compares. As names are
+			   normally interned this should almost always hit. */
+			co_varnames = PySequence_Fast_ITEMS(co->co_varnames);
 			for (j = 0; j < co->co_argcount; j++) {
-				PyObject *nm = PyTuple_GET_ITEM(
-					co->co_varnames, j);
+				PyObject *nm = co_varnames[j];
+				if (nm == keyword)
+					goto kw_found;
+			}
+			/* Slow fallback, just in case */
+			for (j = 0; j < co->co_argcount; j++) {
+				PyObject *nm = co_varnames[j];
 				int cmp = PyObject_RichCompareBool(
 					keyword, nm, Py_EQ);
 				if (cmp > 0)
-					break;
+					goto kw_found;
 				else if (cmp < 0)
 					goto fail;
 			}
@@ -2812,20 +2820,20 @@
 					goto fail;
 				}
 				PyDict_SetItem(kwdict, keyword, value);
+				continue;
 			}
-			else {
-				if (GETLOCAL(j) != NULL) {
-					PyErr_Format(PyExc_TypeError,
-					     "%.200s() got multiple "
-					     "values for keyword "
-					     "argument '%.400s'",
-					     PyString_AsString(co->co_name),
-					     PyString_AsString(keyword));
-					goto fail;
-				}
-				Py_INCREF(value);
-				SETLOCAL(j, value);
+kw_found:
+			if (GETLOCAL(j) != NULL) {
+				PyErr_Format(PyExc_TypeError,
+						"%.200s() got multiple "
+						"values for keyword "
+						"argument '%.400s'",
+						PyString_AsString(co->co_name),
+						PyString_AsString(keyword));
+				goto fail;
 			}
+			Py_INCREF(value);
+			SETLOCAL(j, value);
 		}
 		if (argcount < co->co_argcount) {
 			int m = co->co_argcount - defcount;

Modified: python/branches/tlee-ast-optimize/Tools/pybench/Calls.py
==============================================================================
--- python/branches/tlee-ast-optimize/Tools/pybench/Calls.py	(original)
+++ python/branches/tlee-ast-optimize/Tools/pybench/Calls.py	Wed Jul 30 22:06:40 2008
@@ -109,6 +109,64 @@
 
 ###
 
+class ComplexPythonFunctionCalls(Test):
+
+    version = 2.0
+    operations = 4*5
+    rounds = 100000
+
+    def test(self):
+
+        # define functions
+        def f(a,b,c,d=1,e=2,f=3):
+            return f
+
+        args = 1,2
+        kwargs = dict(c=3,d=4,e=5)
+
+        # do calls
+        for i in xrange(self.rounds):
+            f(a=i,b=i,c=i)
+            f(f=i,e=i,d=i,c=2,b=i,a=3)
+            f(1,b=i,**kwargs)
+            f(*args,**kwargs)
+
+            f(a=i,b=i,c=i)
+            f(f=i,e=i,d=i,c=2,b=i,a=3)
+            f(1,b=i,**kwargs)
+            f(*args,**kwargs)
+
+            f(a=i,b=i,c=i)
+            f(f=i,e=i,d=i,c=2,b=i,a=3)
+            f(1,b=i,**kwargs)
+            f(*args,**kwargs)
+
+            f(a=i,b=i,c=i)
+            f(f=i,e=i,d=i,c=2,b=i,a=3)
+            f(1,b=i,**kwargs)
+            f(*args,**kwargs)
+
+            f(a=i,b=i,c=i)
+            f(f=i,e=i,d=i,c=2,b=i,a=3)
+            f(1,b=i,**kwargs)
+            f(*args,**kwargs)
+
+
+    def calibrate(self):
+
+        # define functions
+        def f(a,b,c,d=1,e=2,f=3):
+            return f
+
+        args = 1,2
+        kwargs = dict(c=3,d=4,e=5)
+
+        # do calls
+        for i in xrange(self.rounds):
+            pass
+
+###
+
 class BuiltinFunctionCalls(Test):
 
     version = 2.0


More information about the Python-checkins mailing list