| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
further optimization of com_node makes the most difference.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
embedded code objects (e.g. functions) rather than the generated code
object. This change means that the compiler generates code for
everything at the end, rather then generating code for each function
as it finds it. Implementation note: _convert_LOAD_CONST in
pyassem.py must be change to call getCode().
Other changes follow. Several changes creates extra edges between
basic blocks to reflect control flow for loops and exceptions. These
missing edges had gone unnoticed because they do not affect the
current compilation process.
pyassem.py:
Add _enable_debug() and _disable_debug() methods that print
instructions and blocks to stdout as they are generated.
Add edges between blocks for instructions like SETUP_LOOP,
FOR_LOOP, etc.
Add pruneNext to get rid of bogus edges remaining after
unconditional transfer ops (e.g. JUMP_FORWARD)
Change repr of Block to omit block length.
pycodegen.py:
Make sure a new block is started after FOR_LOOP, etc.
Change assert implementation to use RAISE_VARARGS 1 when there is
no user-specified failure output.
misc.py:
Implement __contains__ and copy for Set.
|
|
|
|
|
|
|
| |
the function's body.
If assert is used without an error message, make the AST node None
rather than Name('None').
|
|
|
|
|
|
|
| |
ranges) -- but thanks to the 2.0 compression scheme, this doesn't add
a single byte to the resulting binaries (!)
Closes bug #117524
|
| |
|
|
|
|
|
|
|
|
|
| |
When a method is called with no regular arguments and * args, defer
the first arg is subclass check until after the * args have been
expanded.
N.B. The CALL_FUNCTION implementation is getting really hairy; should
review it to see if it can be simplified.
|
|
|
|
|
|
|
|
| |
-- fixed negative lookbehind to work correctly at the beginning
of the target string (bug #117242)
-- improved syntax check; you can no longer refer to a group
inside itself (bug #110866)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reformatting -- long lines, "[ ]" -> "[]", a few indentation nits.
Replace calls to Node function (which constructed ast nodes) with
calls to actual constructors imported from ast module.
Optimize com_node (most frequently used method) for the common case --
the appropriate method is found in _dispatch.
Fix com_augassign to use class object's rather than node names
(rendered invalid by recent changes to ast)
Remove expensive tests for sequence-ness in com_stmt and
com_append_stmt. These tests should never fail; if they do, something
is really broken and exception will be raised elsewhere.
Fix com_stmt and com_append_stmt to use isinstance rather than
testing's type slot of ast node (this slot disappeared with recent
changes to ast).
|
| |
|
|
|
|
|
| |
and store in local; 2) define _preorder to be dispatch (rather than
method that called dispatch).
|
|
|
|
| |
Changed the landmark to tclIndex, which should occur in both.
|
|
|
|
|
|
| |
Changes to error messages to increase consistency & clarity.
This (mostly) closes SourceForge patch #101839.
|
|
|
|
|
|
|
|
| |
at the end. This fixes a problem where
python Lib/test/test_import.py
failed while "make test" succeeded.
|
| |
|
|
|
|
| |
now, so can't find number).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
and be clear that you need to clean it up when done.
|
| |
|
|
|
|
| |
This closes SourceForge bug #117490.
|
|
|
|
| |
than tuples.
|
|
|
|
|
|
| |
Fix a minor stylistic nit.
This closes SourceForge bug #117032.
|
| |
|
|
|
|
|
| |
oddball platforms (where, e.g., math.exp(+huge) still fails to raise
OverflowError) don't fail the std test suite when run normally.
|
| |
|
|
|
|
|
|
| |
Betlehem, verified by Peter Funk. Fixes preservation of language
search order lost due to use of dictionary keys instead of a list.
Closes SF bug #116964.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
an 'other_libraries()' parameter.
|
|
|
|
| |
we actually installed modules to a directory in sys.path.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1.5.2. The compiler generates code for the version of the interpreter
it is run under.
ast.py:
Print and Printnl add dest attr for extended print
new node AugAssign for augmented assignments
new nodes ListComp, ListCompFor, and ListCompIf for list
comprehensions
pyassem.py:
add work around for string-Unicode comparison raising UnicodeError
on comparison of two objects in code object's const table
pycodegen.py:
define VERSION, the Python major version number
get magic number using imp.get_magic() instead of hard coding
implement list comprehensions, extended print, and augmented
assignment; augmented assignment uses Delegator classes (see
doc string)
fix import and tuple unpacking for 1.5.2
transformer.py:
various changes to support new 2.0 grammar and old 1.5 grammar
add debug_tree helper than converts and symbol and token numbers
to their names
|
| |
|
|
|
|
| |
Added SAX2DOM class.
|
| |
|
|
|
|
|
|
| |
First, only report garbage that the GC cannot free. Second, only report
the number of objects found, not their repr(). People can dig deeper on
their own if they find a leak.
|
|
|
|
|
|
| |
transformer.py: return '*', None from com_import_as_name
pycodegen.py: special case for name == '*'
pyassem.py: fix stack counting for IMPORT_ opcodes
|
|
|
|
| |
msg/headers are empty and the entire response is treated as the body.
|
|
|
|
|
| |
This should close SF bug (patch)
http://sourceforge.net/patch/?func=detailpatch&patch_id=101844&group_id=5470
|