summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
Commit message (Collapse)AuthorAgeFilesLines
* Marc-Andre Lemburg:Guido van Rossum2000-05-011-1/+1
| | | | | | | Support for the new -U command line option option: with the option enabled the Python compiler interprets all "..." strings as u"..." (same with r"..." and ur"...").
* Charles G Waldman:Guido van Rossum2000-04-281-36/+49
| | | | | | | | Follow a suggestion in an /*XXX*/ comment [in com_add()] to speed up compilation by using supplemental dictionaries to keep track of names and constants, eliminating quadratic behavior. With this patch in place, the time to import a 5000-line file with lots of constants [at the global level] is reduced from 20 seconds to under 3 on my system.
* M.-A. Lemburg <mal@lemburg.com>:Fred Drake2000-04-131-2/+23
| | | | | Fixed problem with Unicode string concatenation: u = (u"abc" u"abc") previously dumped core.
* Patch by Vladimir Marangozov to include the function name whenGuido van Rossum2000-04-101-2/+6
| | | | | | | comparing code objects. This give sless surprising results in -Optimized code. It also sorts code objects by name, now. [I changed the patch to hash() slightly to touch fewer lines.]
* Vladimir Marangozov: This fixes the line number in the stringGuido van Rossum2000-04-071-4/+2
| | | | | representation of code objects when optimization is on (python -O). It was always reported as -1 instead of the real lineno.
* remove reference (vestigal) to CALL_FUNCTION_STARJeremy Hylton2000-03-291-1/+1
|
* slightly modified version of Greg Ewing's extended call syntax patchJeremy Hylton2000-03-281-2/+23
| | | | | | | | | | | | | | | | | | | | | | | executive summary: Instead of typing 'apply(f, args, kwargs)' you can type 'f(*arg, **kwargs)'. Some file-by-file details follow. Grammar/Grammar: simplify varargslist, replacing '*' '*' with '**' add * & ** options to arglist Include/opcode.h & Lib/dis.py: define three new opcodes CALL_FUNCTION_VAR CALL_FUNCTION_KW CALL_FUNCTION_VAR_KW Python/ceval.c: extend TypeError "keyword parameter redefined" message to include the name of the offending keyword reindent CALL_FUNCTION using four spaces add handling of sequences and dictionaries using extend calls fix function import_from to use PyErr_Format
* Marc-Andre Lemburg: support for Unicode string literals (u"...", ur"...").Guido van Rossum2000-03-101-3/+22
|
* The cleanup code in com-init() at label fail_0000 should removeGuido van Rossum1999-12-201-1/+1
| | | | c_varnames, not c_lnotab.
* Tim Peters writes:Guido van Rossum1999-09-151-1/+1
| | | | | | | | For a long time I've seen absurd tracebacks under -O (e.g., negative line numbers), but very rarely. Since I was looking at tracebacks anyway, thought I'd track it down. Turns out to be Guido's only predictable blind spot <wink -- "char" is signed on some non-GvR systems>. Patch follows.
* 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
|