summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Make sure that atoms (Tuple, List, etc.) have lineno attributesJeremy Hylton2001-08-291-2/+4
|
* Fix off-by-one errors in code to find depth of stack.Jeremy Hylton2001-08-291-3/+3
| | | | | XXX The code is still widely inaccurate, but most (all?) of the time it's an overestimate.
* Undo change from list to dict for handling varnames, consts, etc.Jeremy Hylton2001-08-291-49/+22
| | | | | | | | | | As the doc string for _lookupName() explains: This routine uses a list instead of a dictionary, because a dictionary can't store two different keys if the keys have the same value but different types, e.g. 2 and 2L. The compiler must treat these two separately, so it does an explicit type comparison before comparing the values.
* Change default() to use getChildNodes() instead of getChildren()Jeremy Hylton2001-08-291-3/+2
|
* Support // and //=Jeremy Hylton2001-08-291-1/+6
| | | | | | | Generate SET_LINENO for del statements. Define klass=1 for PyFlowGraph constructor for a class statement. A class has no varnames.
* Add support for // and //=.Jeremy Hylton2001-08-291-5/+16
| | | | | | | | Avoid if/elif/elif/else tests where the final else is supposed to handle exactly one case instead of all other cases. When the list of operators is extended, the catchall else treats all new operators as the last operator in the set of tests. Instead, raise an exception if an unexpected operator occurs.
* Add generator detection to symbol table.Jeremy Hylton2001-08-291-9/+35
| | | | | Fix bug in handling of statements like "l[x:y] = 2". The visitor was treating this as assignments to l, x, and y!
* Modify name conversion to be (hopefully) a bit more efficient.Jeremy Hylton2001-08-291-17/+52
| | | | | | | | Use a dictionary instead of a list to map objects to their offsets in a const/name tuple of a code object. XXX The conversion is perhaps incomplete, in that we shouldn't have to do the list2dict to start.
* Revise implementations of getChildren() and getChildNodes().Jeremy Hylton2001-08-295-218/+926
| | | | | | | | | | | | | | | | Add support for floor division (// and //=) The implementation of getChildren() and getChildNodes() is intended to be faster, because it avoids calling flatten() on every return value. But it's not clear that it is a lot faster, because constructing a tuple with just the right values ends up being slow. (Too many attribute lookups probably.) The ast.txt file is much more complicated, with funny characters at the ends of names (*, &, !) to indicate the types of each child node. The astgen script is also much more complex, making me wonder if it's still useful.
* Don't include doc string of class in its code childJeremy Hylton2001-08-291-0/+5
|
* Make sure the JUMP_ABSOLUTE and POP_BLOCK at the end of a for loop areJeremy Hylton2001-08-281-1/+1
| | | | contiguous.
* XXX_NAME ops should affect varnamesJeremy Hylton2001-08-281-1/+4
| | | | | | varnames should list all the local variables (with arguments first). The XXX_NAME ops typically occur at the module level and assignment ops should create locals.
* Generate FOR_ITER-based loops instead of old FOR_LOOP-based loopsJeremy Hylton2001-08-281-5/+9
|
* Handle private namesJeremy Hylton2001-08-273-20/+50
| | | | | | | | | | | | | | | | | | | (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()
* emit SET_LINENO for augmented assignmentsJeremy Hylton2001-08-271-0/+4
|
* Many changes -- bug fixes and sundry improvementsJeremy Hylton2001-08-271-33/+30
| | | | | | | | | | | | | | | | Make nested scopes enabled by default Add is_constant_false() helper so that compiled code and symbols are consistent with builtin compiler's handling of "if 0:" Fix doc string handling to be consistent with recent change that eliminates the doc string from the Module's node attribute. Add fix to print handling from Evan & Shane. Track change to visitor api by making "verbose" explicit. Comment out setting CO_NESTED flag (it's unnecessary in 2.2).
* Fix for sibling nodes that define the same free variableJeremy Hylton2001-08-271-6/+10
| | | | | | | | Evan Simpson's fix. And his explanation: If you defined two nested functions in a row that refer to the same non-global variable, the second one will be generated as though the variable were global.
* Add lookup_name() to optimize use of stack framesJeremy Hylton2001-08-271-5/+21
| | | | | | | | | | | | The use of com_node() introduces a lot of extra stack frames, enough to cause a stack overflow compiling test.test_parser with the standard interpreter recursionlimit. The com_node() is a convenience function that hides the dispatch details, but comes at a very high cost. It is more efficient to dispatch directly in the callers. In these cases, use lookup_node() and call the dispatched node directly. Also handle yield_stmt in a way that will work with Python 2.1 (suggested by Shane Hathaway)
* Two changes to visitor API:Jeremy Hylton2001-08-271-20/+23
| | | | | | | Remove _preorder as alias for dispatch and call dispatch directly. Add an extra optional argument to walk() XXX Also comment out some code that does debugging prints.
* Why didn't I think of Fred off the top of my head?Jeremy Hylton2001-08-271-0/+1
|
* Add everyone I can think of off the top of my headJeremy Hylton2001-08-271-0/+7
|
* Revise regrtest to compile entire standard library.Jeremy Hylton2001-08-271-9/+28
| | | | | | | | | The tests are run from a copy of the library directory, where everything has been compiled by the compiler package. Add a raw_input() call at the end of the script, so that I can check the output before the temp directory with the compiled code is removed.
* Add -c option to continue if one file has a SyntaxErrorJeremy Hylton2001-08-271-2/+15
|
* Fixes by Thomas Heller:Jack Jansen2001-08-275-12/+13
| | | | | | - make the selftests work again (they were apparently not used since very early in bgen's development), with some minor cleanup by me - make emacs python mode happier
* Bump to version 1.3. Also document the new behavior of the chip widgets.Barry Warsaw2001-08-231-8/+17
|
* Bump to version 1.3Barry Warsaw2001-08-231-1/+1
|
* Implement some suggestions by Laura Creighton.Barry Warsaw2001-08-231-6/+28
| | | | | | | | | | | | | | | | | | | | | | | ChipWidget.__init__(): Added a message area just below the color name. Both the message and name widgets are now FLAT, DISABLED Entry widgets instead of Labels. This allows users to copy-n-paste the color names or color specs. Also, the contents of both widgets are now driven by StringVars. set_color(): This only sets the chip color; it does not set the name widgets. set_name(): New method which only sets the name widget contents. set_message(): New method which only sets the message widget contents. ChipViewer.update_yourself(): Set the color, name, and message for each chip as follows: the first line always contains the color spec in #rrggbb format. The second line will contain the color name, but slightly differently for each widget. For the Selected widget, if the color exactly matches the Nearest color, the name is shown, otherwise the message field will be empty. The name field of the Nearest widget will always contain the color name.
* Add a little introductory text.Jeremy Hylton2001-08-181-15/+93
| | | | | | | | | Change several sections to subsections (part of the manual -> howto transformation). Flesh out discussion of assignment nodes (and delete statements). Add an example of manipulating AST objects at a >>> prompt
* Generate correct reprs for Mul, Add, etc.Jeremy Hylton2001-08-183-20/+12
|
* Track removal of doc string from Module().nodes[0]Jeremy Hylton2001-08-181-7/+2
|
* Add Yield() nodeJeremy Hylton2001-08-181-0/+12
|
* Add Yield() statement handlerJeremy Hylton2001-08-181-1/+11
| | | | Fix Module() handler to avoid including the doc string in the AST
* Remove spurious space before a period.Fred Drake2001-08-151-1/+1
|
* Use the "howto" document class rather than the "manual" class.Fred Drake2001-08-151-85/+81
| | | | | | | | Remove the module index; there aren't enough modules documented yet for this to make sense. Add a couple more index entries, fixed a few typos, and adjusted a few more things for consistency.
* Properly mark attribute names in the table.Fred Drake2001-08-151-117/+117
|
* Change the generated markup so that attribute names are properly marked.Fred Drake2001-08-151-1/+1
|
* Fix small markup consistency nits.Fred Drake2001-08-151-7/+8
|
* Fix typo in module docstring.Tim Peters2001-08-151-1/+1
|
* update simple explanation of parseFile()Jeremy Hylton2001-08-141-1/+1
|
* First day's progress on documentationJeremy Hylton2001-08-143-0/+588
|
* Fix typo in astgen scriptJeremy Hylton2001-08-143-3/+3
|
* Regenerated from new ast.txt and new astgen.pyJeremy Hylton2001-08-141-12/+23
|
* Add getChildNodes() method to NodeJeremy Hylton2001-08-142-0/+4
|
* Add Yield nodeJeremy Hylton2001-08-142-0/+2
|
* Update e-mail addressAndrew M. Kuchling2001-08-131-1/+1
|
* + A msg on c.l.py reminded me that docstrings can be implicitly catenated.Tim Peters2001-08-131-28/+48
| | | | | | | Cater to that. + Major speed boost via not reading more of files than necessary. This was no slouch before; now it screams. + Improve msg when giving up on a goofy future statement.
* SF patch #445412 extract ndiff functionality to difflib, fromTim Peters2001-08-121-226/+15
| | | | David Goodger.
* Tool to delete (or just rewrite parts of) obsolete future statements.Tim Peters2001-08-121-0/+256
|
* Finally fix SF bug #441172, using a variant of patch ##443626:Guido van Rossum2001-08-111-0/+6
| | | | | | canceling an edit operation would not revert the value of the field. The fix takes care to destroy the Entry object, as suggested in the patch.
* When representing #includes as imports, do from MOD import *.Martin v. Löwis2001-08-091-1/+1
|