Commit Graph

11 Commits

Author SHA1 Message Date
Neal Norwitz ca460d9722 with and as are now keywords. There are some generated files I can't recreate. 2006-09-06 06:28:06 +00:00
Jeremy Hylton 271d59343b Move peephole optimizer to separate file. (Forgot .h in previous checkin.) 2006-08-21 16:20:29 +00:00
Richard Jones 7c88dcc5ab Merge from rjones-funccall branch.
Applied patch zombie-frames-2.diff from sf patch 876206 with updates for
Python 2.5 and also modified to retain the free_list to avoid the 67%
slow-down in pybench recursion test. 5% speed up in function call pybench.
2006-05-23 10:37:38 +00:00
Jeremy Hylton a4ebc135ac Refactor: Move code that uses co_lnotab from ceval to codeobject 2006-04-18 14:47:00 +00:00
Neal Norwitz cbce280d4f Don't abbreviate ABS, use long name ABSOLUTE. 2006-04-03 06:26:32 +00:00
Thomas Wouters 34aa7ba114 from __future__ import with_statement addon for 'with', mostly written by
Neal.
2006-02-28 19:02:24 +00:00
Thomas Wouters f7f438ba3b SF patch #1438387, PEP 328: relative and absolute imports.
- IMPORT_NAME takes an extra argument from the stack: the relativeness of
   the import. Only passed to __import__ when it's not -1.

 - __import__() takes an optional 5th argument for the same thing; it
   __defaults to -1 (old semantics: try relative, then absolute)

 - 'from . import name' imports name (be it module or regular attribute)
   from the current module's *package*. Likewise, 'from .module import name'
   will import name from a sibling to the current module.

 - Importing from outside a package is not allowed; 'from . import sys' in a
   toplevel module will not work, nor will 'from .. import sys' in a
   (single-level) package.

 - 'from __future__ import absolute_import' will turn on the new semantics
   for import and from-import: imports will be absolute, except for
   from-import with dots.

Includes tests for regular imports and importhooks, parser changes and a
NEWS item, but no compiler-package changes or documentation changes.
2006-02-28 16:09:29 +00:00
Neal Norwitz ab51f5f24d Per discussion on python-dev, remove CO_GENERATOR_ALLOWED. Leave comment about not removing yet. 2006-02-25 15:43:10 +00:00
Neal Norwitz 0090a4c10d Generators have been permanent for a while. This comment is no longer applicable. 2006-02-19 18:49:30 +00:00
Neal Norwitz 58a7985465 Use the newer names for APIs after the AST merge 2005-10-21 04:23:36 +00:00
Jeremy Hylton 3e0055f8c6 Merge ast-branch to head
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.

The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00