summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* Part 2/2 of SF patch #416704: More robust freeze, by Toby Dickenson.Guido van Rossum2001-10-183-11/+59
| | | | | | | | | | | | | (With slight cosmetic improvements to shorten lines and a grammar fix to a docstring.) This addes -X and -E options to freeze. From the docstring: -X module Like -x, except the module can never be imported by the frozen binary. -E: Freeze will fail if any modules can't be found (that were not excluded using -x or -X).
* Test utility to look for bad stacksize calculations.Jeremy Hylton2001-10-171-0/+43
|
* Update outdated text about how to fix the font.Guido van Rossum2001-10-081-4/+5
|
* Replace all instances of err.strerror with err.Jeremy Hylton2001-10-081-6/+6
| | | | | | | The strerror attribute contained only partial information about the exception and produced some very confusing error messages. By passing err (the exception object itself) and letting it convert itself to a string, the error messages are better.
* Changed the reindenter to strip only trailing spaces and tabs from lines,Tim Peters2001-10-041-3/+16
| | | | | not other control characters string.rstrip() got rid of. This caters to the \f thingies Barry likes putting in Python source files.
* Removed files no longer needed.Fred Drake2001-09-283-663/+0
|
* Generalize file.writelines() to allow iterable objects.Tim Peters2001-09-231-2/+1
|
* Fix restore (difflib.restore() became a generator too).Tim Peters2001-09-221-1/+2
|
* Make difflib.ndiff() and difflib.Differ.compare() generators. ThisTim Peters2001-09-221-3/+2
| | | | | restores the 2.1 ability of Tools/scripts/ndiff.py to start producing output before the entire comparison is complete.
* Update description of Tools/compilerJeremy Hylton2001-09-201-3/+2
|
* Remove setup.py, unnecessary since compiler package is the stdJeremy Hylton2001-09-202-14/+2
| | | | | | library. Update README.
* Moved to Tools/compiler along with astgen.pyJeremy Hylton2001-09-201-87/+0
|
* The compiler package is now part of the standard library.Jeremy Hylton2001-09-2012-5811/+0
| | | | Remove all these files. All except astgen.py are moved to Lib/compiler.
* Track changes to compiler APIJeremy Hylton2001-09-172-9/+15
|
* API change:Jeremy Hylton2001-09-173-10/+109
| | | | | | | | | | | | | | | | | | compile() becomes replacement for builtin compile() compileFile() generates a .pyc from a .py both are exported in __init__ compiler.parse() gets optional second argument to specify compilation mode, e.g. single, eval, exec Add AbstractCompileMode as parent class and Module, Expression, and Interactive as concrete subclasses. Each corresponds to a compilation mode. THe AbstractCompileMode instances in turn delegate to CodeGeneration subclasses specialized for their particular functions -- ModuleCodeGenerator, ExpressionCodeGeneration, InteractiveCodeGenerator.
* Re-created after change to astgen to calculate hardest_arg correctlyJeremy Hylton2001-09-171-577/+603
|
* Fix calculation of hardest_arg.Jeremy Hylton2001-09-172-6/+6
| | | | | | | | | The argument properties are ordered from easiest to hardest. The harder the arg, the more complicated that code that must be generated to return it from getChildren() and/or getChildNodes(). The old calculation routine was bogus, because it always set hardest_arg to the hardness of the last argument. Now use max() to always set it to the hardness of the hardest argument.
* Last set of change to get regression tests to passJeremy Hylton2001-09-173-5/+10
| | | | | | | | | | | Remove the only test in the syntax module. It ends up that the transformer must handle this error case. In the transformer, check for a list compression in com_assign_list() by looking for a list_for node where a comma is expected. In pycodegen.compile() re-raise the SyntaxError rather than catching it and exiting
* Add -p option to invoke Python profilerJeremy Hylton2001-09-171-5/+11
|
* Only print attributes that start with co_.Jeremy Hylton2001-09-171-1/+6
| | | | | If passed a .py file as an argument, try to find its accompanying .pyc.
* Handle more syntax errors.Jeremy Hylton2001-09-172-29/+77
| | | | | | | | Invoke compiler.syntax.check() after building AST. If a SyntaxError occurs, print the error and exit without generating a .pyc file. Refactor code to use compiler.misc.set_filename() rather than passing filename argument around to each CodeGenerator instance.
* Add utility to set filename attribute on all nodesJeremy Hylton2001-09-171-0/+9
|
* support true divisionJeremy Hylton2001-09-171-1/+3
|
* Improve handling of docstrings. I had feared this was a case ofTim Peters2001-09-161-5/+10
| | | | | | introspection incompatibility, but in fact it's just that calltips always gave up on a docstring that started with a newline (but didn't realize they were giving up <wink>).
* Add code generator for yield stmtJeremy Hylton2001-09-141-0/+5
|
* del no longer necessary now that new module is goneJeremy Hylton2001-09-141-2/+0
|
* Various sundry changes for 2.2 compatibilityJeremy Hylton2001-09-142-137/+94
| | | | | | | | | | | | | | | Remove the option to have nested scopes or old LGB scopes. This has a large impact on the code base, by removing the need for two variants of each CodeGenerator. Add a get_module() method to CodeGenerator objects, used to get the future features for the current module. Set CO_GENERATOR, CO_GENERATOR_ALLOWED, and CO_FUTURE_DIVISION flags as appropriate. Attempt to fix the value of nlocals in newCodeObject(), assuming that nlocals is 0 if CO_NEWLOCALS is not defined.
* The object-being sliced in an assignment to a slice is referenced, notJeremy Hylton2001-09-141-2/+2
| | | | | | | bound. When a Yield() node is visited, assign to the generator attribute of the scope, not the visitor.
* the new new doesn't define CO_xxx as the old new didJeremy Hylton2001-09-141-1/+9
|
* the names attribute of Global is not a nodeJeremy Hylton2001-09-143-3/+3
|
* Fix for bug #442374 - Modulefinder registry support brokenMark Hammond2001-09-051-13/+36
|
* Only output the buffer size error label if it is used.Jack Jansen2001-09-052-3/+7
| | | | Shuts up another couple of gcc warnings.
* Don't use a default "int" return type, gcc gives a warning about it.Jack Jansen2001-09-041-1/+1
|
* - Reverse the meaning of the -m option: warnings about multiple /Guido van Rossum2001-09-041-35/+85
| | | | | | | | | | | | | | operators per line or statement are now on by default, and -m turns these warnings off. - Change the way multiple / operators are reported; a regular recommendation is always emitted after the warning. - Report ambiguous warnings (both int|long and float|complex used for the same operator). - Update the doc string again to clarify all this and describe the possible messages more precisely.
* Whitespace normalization.Tim Peters2001-09-041-4/+4
|
* PEP 238 documented -Qwarn as warning only for classic int or longGuido van Rossum2001-09-041-1/+1
| | | | | division, and this makes sense. Add -Qwarnall to warn for all classic divisions, as required by the fixdiv.py tool.
* Rename the -D option to -Q, to avoid a Jython option name conflict.Guido van Rossum2001-09-041-1/+1
|
* Implement what the docstring said: multiple slashes per line areGuido van Rossum2001-09-021-15/+26
| | | | | treated the same as single ones by default. Added -m option to issue a warning for this case instead.
* Added more text to the docstring, updated the way the exit status isGuido van Rossum2001-09-021-31/+113
| | | | | | | percolated out, and some general cleanup. The output is still the same, except it now prints "Index: <file>" instead of "Processing: <file>", so that the output can be used as input for patch (but only the diff-style parts of it).
* A grep-like tool that looks for division operators.Guido van Rossum2001-09-021-0/+89
|
* The beginnings of a script to help finding / operators that may needGuido van Rossum2001-09-011-0/+237
| | | | | to be change to //. The code is pretty gross so far, and I promise I'll work on this more, but I have to go eat now! :-)
* Fix _convert_NAME() so that it doesn't store locals for class bodies.Jeremy Hylton2001-08-303-15/+15
| | | | | | | | | Fix list comp code generation -- emit GET_ITER instead of Const(0) after the list. Add CO_GENERATOR flag to generators. Get CO_xxx flags from the new module
* spurious popJeremy Hylton2001-08-301-1/+0
|
* Track the block stack more reasonably in order to handle continue inJeremy Hylton2001-08-291-13/+45
| | | | | | | | try/except or try/finally. Previous versions had only track SETUP_LOOP blocks and ignored the exception part. This meant that it allowed continue inside a try/except but generated buggy code. Now it does the right thing.
* Improve stack depth computation for try/except and try/finallyJeremy Hylton2001-08-291-1/+4
| | | | Add CONTINUE_LOOP to the list of unconditional transfers
* Add __getitem__() handler for use by visitContinue()Jeremy Hylton2001-08-291-0/+2
|
* Generate SET_LINENO for list and tuple literals when the open parenJeremy Hylton2001-08-291-1/+3
| | | | | | | starts a new line. Also fix undetected typo in visitDict() -- uncovered by recent change to add lineno attrs to atoms.
* 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.