summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
Commit message (Collapse)AuthorAgeFilesLines
* Implement -OO; "unsafe" optimization that removes docstrings.Guido van Rossum1999-01-281-0/+3
| | | | Marc-Andre Lemburg.
* Remove prototypes for PyOS_strto[u]l -- Chris Herborth.Guido van Rossum1998-12-101-3/+0
|
* Add more SET_LINENO instructions in long argument listsGuido van Rossum1998-12-101-1/+7
|
* Changes to support other object types besides stringsGuido van Rossum1998-10-071-6/+17
| | | | | as the code string of code objects, as long as they support the (readonly) buffer interface. By Greg Stein.
* Eh, better error message for the previous change. It now saysGuido van Rossum1998-10-021-1/+1
| | | | "non-default argument follows default argument".
* Treat def f(a, b=1, c): ... as an error (missing default for c)Guido van Rossum1998-10-021-7/+4
| | | | instead of silently supplying a default of None fore c.
* Comment out the print statement about underflow. (This only seems toGuido van Rossum1998-08-251-2/+2
| | | | | | | | happen when you use a non-keyword argument after a keyword argument, and in this case you also get a syntax error. I fully suspect that the underflow is caused by the code that stops generating code when it detects the syntax error, but I can't find the culprit right now. I know, I know.)
* Since PyDict_GetItem() can't raise an exception any more, there's noGuido van Rossum1998-05-141-1/+0
| | | | need to call PyErr_Clear() when it returns NULL.
* Make first raise argument optionalGuido van Rossum1998-04-091-6/+10
|
* Don't use sscanf(s, "%x", &c) to parse \xX... escapes; hardcode it.Guido van Rossum1997-10-201-3/+10
|
* Fixed for WITHOUT_COMPLEX compilation (Jack)Guido van Rossum1997-10-081-1/+2
|
* Cprrect stuoid tyops -- was comparing variabes with themselves becauseGuido van Rossum1997-08-291-3/+3
| | | | of co/cp mixup.
* Plug a leak in code_dealloc() (and reordered the deallocs to match theGuido van Rossum1997-07-251-3/+2
| | | | | | order of the variables in the declarations). Also removed an entry in the TODO list that's done.
* Fix bug reported by Just: anonymous arguments used for tuples shouldGuido van Rossum1997-07-101-1/+3
| | | | | | have a unique name, otherwise they get squished by locals2fast (or fast2locals, I dunno) when the debugger is invoked before they have been transferred to real locals.
* PyObject_Compare can raise an exception now.Guido van Rossum1997-05-231-1/+2
|
* Indent the #error directives so a classic K&R cpp doesn't see them.Guido van Rossum1997-05-201-3/+3
|
* Get rid of obsolete support for access statement.Guido van Rossum1997-05-091-67/+0
|
* Instead of importing graminit.h whenever one of the three grammar 'root'Guido van Rossum1997-05-071-0/+14
| | | | symbols is needed, define these in Python.h with a Py_ prefix.
* Quickly renamed the remaining files -- this directory is done.Guido van Rossum1997-04-291-312/+331
|
* Tweaks to keep the Microsoft compiler quier.Guido van Rossum1997-04-091-1/+4
|
* Support for alternative string quotes (a"xx", b"xx", c"xx", ...).Guido van Rossum1997-04-061-3/+6
| | | | In interactive mode, do generate code for single-string statements.
* Added assert statement.Guido van Rossum1997-04-021-0/+45
|
* New form of PyFPE_END_PROTECT macro.Guido van Rossum1997-03-141-2/+2
|
* Fix dumb bug calling parsestrplus with wrong node as argument.Guido van Rossum1997-03-111-1/+3
| | | | | Add prototypes for parsestr() and parsestrplus() (unrelated, but seemed to make sense.)
* Added support for ``if __debug__:'' -- if -O is given, this form isGuido van Rossum1997-03-111-2/+90
| | | | | | | | | | | recognized by the code generator and code generation for the test and the subsequent suite is suppressed. One must write *exactly* ``if __debug__:'' or ``elif __debug__:'' -- no parentheses or operators must be present, or the optimization is not carried through. Whitespace doesn't matter. Other uses of __debug__ will find __debug__ defined as 0 or 1 in the __builtin__ module.
* Add global Py_OptimizeFlag. SET_LINENO is omitted again unless this isGuido van Rossum1997-03-031-4/+7
| | | | nonzero.
* Changes for Lee Busby's SIGFPE patch set.Guido van Rossum1997-02-141-2/+9
| | | | | New file pyfpe.c and exception FloatingPointError. Surround some f.p. operations with PyFPE macro brackets.
* Instead of emitting SET_LINENO instructions, generate a line numberGuido van Rossum1997-01-241-6/+102
| | | | | | table which is incorporated in the code object. This way, the runtime overhead to keep track of line numbers is only incurred when an exception has to be reported.
* Remove unused variable.Guido van Rossum1997-01-181-1/+0
|
* Intern all names and varnames in newcodeobject(), plus those stringGuido van Rossum1997-01-181-7/+22
| | | | | literals that look like identifiers. Also intern all strings used as names during the compilation.
* Add co_stacksize field to codeobject structure, and stacksize argumentGuido van Rossum1997-01-171-62/+253
| | | | | | | | | | | | to PyCode_New() argument list. Move MAXBLOCKS constant to conpile.h. Added accurate calculation of the actual stack size needed by the generated code. Also commented out all fprintf statements (except for a new one to diagnose stack underflow, and one in #ifdef'ed out code), and added some new TO DO suggestions (now that the stacksize is taken of the TO DO list).
* Check for duplicate keyword arguments at compile time.Guido van Rossum1997-01-061-12/+20
|
* Keep gcc -Wall happy.Guido van Rossum1996-12-051-2/+1
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Ellipses -> Ellipsis rename (the dictionary really says that it shouldGuido van Rossum1996-10-111-1/+1
| | | | | | | | be Ellipsis!). Bumped the API version because a linker-visible symbol is affected. Old C code will still compile -- there's a b/w compat macro. Similarly, old Python code will still run, builtin exports both Ellipses and Ellipsis.
* Added line number to most compile-time error messages.Guido van Rossum1996-09-171-88/+90
|
* Afterthough: leave both leading underscores in,Guido van Rossum1996-08-241-5/+5
| | | | so __spam becomes _ClassName__spam.
* Oops need to mangle global statement separatelyGuido van Rossum1996-08-241-0/+7
|
* Name mangling, what the heck!Guido van Rossum1996-08-241-3/+80
|
* Disable support for access statementGuido van Rossum1996-08-121-2/+4
|
* Removed unused var; added error check for ``lambda: x=1''.Guido van Rossum1996-08-081-1/+5
|
* Changes for slice and ellipsesGuido van Rossum1996-07-301-64/+113
|
* Py_complex; and WITHOUT_COMPLEX added to getargs.cGuido van Rossum1996-07-211-2/+2
|
* only use 'j' for imaginary constantsGuido van Rossum1996-01-261-1/+1
|
* Removed unused varJack Jansen1996-01-251-1/+0
|
* changes for complex and power (**) operatorGuido van Rossum1996-01-121-30/+98
|
* disable code generation for access statementGuido van Rossum1995-10-081-0/+2
|
* Removed unused variablesJack Jansen1995-10-031-1/+0
|
* fix bug with missing default for last arg (discovered by Tommy Burnette)Guido van Rossum1995-09-181-2/+3
|
* keyword arguments and faster callsGuido van Rossum1995-07-181-206/+280
|