summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/misc.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 55270-55324 via svnmerge fromGuido van Rossum2007-05-141-73/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55271 | fred.drake | 2007-05-11 10:14:47 -0700 (Fri, 11 May 2007) | 3 lines remove jpeg, panel libraries for SGI; there is more IRIX stuff left over, I guess that should be removed too, but will leave for someone who is sure ........ r55280 | fred.drake | 2007-05-11 19:11:37 -0700 (Fri, 11 May 2007) | 1 line remove mention of file that has been removed ........ r55301 | brett.cannon | 2007-05-13 17:38:05 -0700 (Sun, 13 May 2007) | 4 lines Remove rexec and Bastion from the stdlib. This also eliminates the need for f_restricted on frames. This in turn negates the need for PyEval_GetRestricted() and PyFrame_IsRestricted(). ........ r55303 | brett.cannon | 2007-05-13 19:22:22 -0700 (Sun, 13 May 2007) | 2 lines Remove the md5 and sha modules. ........ r55305 | george.yoshida | 2007-05-13 19:45:55 -0700 (Sun, 13 May 2007) | 2 lines fix markup ........ r55306 | neal.norwitz | 2007-05-13 19:47:57 -0700 (Sun, 13 May 2007) | 1 line Get the doc building again after some removals. ........ r55307 | neal.norwitz | 2007-05-13 19:50:45 -0700 (Sun, 13 May 2007) | 1 line Get test_pyclbr passing again after getstatus was removed from commands. This "test case" was weird since it was just importing a seemingly random module. Remove the import ........ r55322 | brett.cannon | 2007-05-14 14:09:20 -0700 (Mon, 14 May 2007) | 3 lines Remove the compiler package. Will eventually need a mechanism to byte compile an AST. ........
* - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone;Guido van Rossum2007-02-111-1/+1
| | | | | | | | | | and .keys(), .items(), .values() return dict views. The dict views aren't fully functional yet; in particular, they can't be compared to sets yet. but they are useful as "iterator wells". There are still 27 failing unit tests; I expect that many of these have fairly trivial fixes, but there are so many, I could use help.
* Stomp out more hsa_key() calls.Guido van Rossum2006-08-191-2/+2
|
* No need for types, use isinstanceNeal Norwitz2005-11-251-2/+1
|
* Whitespace normalization.Tim Peters2001-10-181-1/+0
|
* Add utility to set filename attribute on all nodesJeremy Hylton2001-09-171-0/+9
|
* Add __getitem__() handler for use by visitContinue()Jeremy Hylton2001-08-291-0/+2
|
* Handle private namesJeremy Hylton2001-08-271-0/+23
| | | | | | | | | | | | | | | | | | | (Hard to believe these were never handled before) Add misc.mangle() that mangles based on the rules in compile.c. XXX Need to test the corner cases Update CodeGenerator with a class_name attribute bound to None. If a particular instance is created within a class scope, the instance's class_name is bound to that class's name. Add mangle() method to CodeGenerator that mangles if the class_name has a class_name in it. Modify the FunctionCodeGenerator family to handle an extra argument-- the class_name. Wrap all name ops and attrnames in calls to self.mangle()
* Change the graph structure to contain the code generator object forJeremy Hylton2000-11-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* change name of Set method: items -> elements (avoids confusion withJeremy Hylton2000-03-161-1/+1
| | | | dict)
* satisfy the tabnanny (thanks to MH for noticing the problem)Jeremy Hylton2000-02-211-8/+8
|
* add flatten helper functionJeremy Hylton2000-02-161-0/+11
|
* add an __len__ to Set and StackJeremy Hylton2000-02-101-0/+4
|
* add remove method to setJeremy Hylton2000-02-101-0/+2
|
* checking in initial weekend's workJeremy Hylton2000-02-041-0/+18
compile.py: ASTVisitor framework plus bits of a code generator that should be bug-for-buf compatible with compile.c misc.py: Set and Stack helpers test.py: a bit of simple sample code that compile.py will work on