summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
Commit message (Collapse)AuthorAgeFilesLines
* fix mem leak (localmap in optimize)Guido van Rossum1995-01-201-0/+1
|
* Two independent chages:Guido van Rossum1995-01-071-27/+156
| | | | | (a) support import NAME.NAME...NAME; (b) support doc strings in modules, classes and function definitions
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | | bltinmodule.c: fixed coerce() nightmare in ternary pow(). modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject(). pythonrun.c: move flushline() into and around print_error().
* Lots of changes, most minor (fatal() instead of abort(), use ofGuido van Rossum1995-01-021-4/+4
| | | | | | err_fetch/err_restore and so on). But... NOTE: import.c has been rewritten and all the DL stuff is now in the new file importdl.c.
* set name to <lambda> instead of None for lambdasGuido van Rossum1994-11-101-7/+2
|
* * Python/compile.c (com_argdefs, com_arglist): avoid referencingGuido van Rossum1994-08-291-156/+303
| | | | CHILD(n,i) for i >= NCH(n)
* change syntactical position of lambdef (was an atom, now is a test)Guido van Rossum1993-11-301-25/+28
|
* * import.c (get_module): pass .py filename to parse_file, not .pyc filename!Guido van Rossum1993-11-301-41/+47
| | | | | | | | | | | * funcobject.c (func_repr): don't call getstringvalue(None) for anonymous functions. * bltinmodule.c: removed lambda (which is now a built-in function); removed implied lambda for string arg to filter/map/reduce. * Grammar, graminit.[ch], compile.[ch]: replaced lambda as built-in function by lambda as grammar entity: instead of "lambda('x: x+1')" you write "lambda x: x+1". * Xtmodule.c (checkargdict): return 0, not NULL, for error.
* * posixmodule.c: added set{uid,gid}.Guido van Rossum1993-11-101-1/+1
| | | | | | * {tuple,list,mapping,array}object.c: call printobject with 0 for flags * compile.c (parsestr): use quote instead of '\'' at one crucial point * arraymodule.c (array_getattr): Added __members__ attribute
* Added compare operations for functions and code objects.Guido van Rossum1993-11-051-1/+31
| | | | (Also hash, but it doesn't work yet.)
* * compile.[ch]: support for lambda()Guido van Rossum1993-10-261-10/+43
| | | | | | | | | | * PROTO.h, mymalloc.h: added #ifdefs for TURBOC and GNUC. * allobjects.h: added #include "rangeobject.h" * Grammar: added lambda_input; relaxed syntax for exec. * bltinmodule.c: added bagof, map, reduce, lambda, xrange. * tupleobject.[ch]: added resizetuple(). * rangeobject.[ch]: new object type to speed up range operations (not convinced this is needed!!!)
* Changes to accept double-quoted strings on input.Guido van Rossum1993-10-261-2/+4
|
* * bltinmodule.c: removed exec() built-in function.Guido van Rossum1993-10-181-1/+25
| | | | | | | * Grammar: add exec statement; allow testlist in expr statement. * ceval.c, compile.c, opcode.h: support exec statement; avoid optimizing locals when it is used * fileobject.{c,h}: add getfilename() internal function.
* * Makefile: added all: and default: targets.Guido van Rossum1993-07-051-2/+1
| | | | | | | | | | | | * many files: made some functions static; removed "extern int errno;". * frozenmain.c: fixed bugs introduced on 24 June... * flmodule.c: remove 1.5 bw compat hacks, add new functions in 2.2a (and some old functions that were omitted). * timemodule.c: added MSDOS floatsleep version . * pgenmain.c: changed exit() to goaway() and added defn of goaway(). * intrcheck.c: add hack (to UNIX only) so interrupting 3 times will exit from a hanging program. The second interrupt prints a message explaining this to the user.
* Access checks now work, at least for instance data (not for methodsGuido van Rossum1993-05-201-3/+3
| | | | | | | yet). The class is now passed to eval_code and stored in the current frame. It is also stored in instance method objects. An "unbound" instance method is now returned when a function is retrieved through "classname.funcname", which when called passes the class to eval_code.
* Several changes in one:Guido van Rossum1993-05-191-55/+82
| | | | | | | | | | | | | | | | (1) dictionaries/mappings now have attributes values() and items() as well as keys(); at the C level, use the new function mappinggetnext() to iterate over a dictionary. (2) "class C(): ..." is now illegal; you must write "class C: ...". (3) Class objects now know their own name (finally!); and minor improvements to the way how classes, functions and methods are represented as strings. (4) Added an "access" statement and semantics. (This is still experimental -- as long as you don't use the keyword 'access' nothing should be changed.)
* Changes to speed up local variables enormously, by avoiding dictionaryGuido van Rossum1993-03-301-49/+86
| | | | | | lookup (opcode.h, ceval.[ch], compile.c, frameobject.[ch], pythonrun.c, import.c). The .pyc MAGIC number is changed again. Added get_menu_text to flmodule.
* * Changed all copyright messages to include 1993.Guido van Rossum1993-03-291-12/+31
| | | | | | | | | | | | | | | | | * Stubs for faster implementation of local variables (not yet finished) * Added function name to code object. Print it for code and function objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version number has changed accordingly) * Print address of self for built-in methods * New internal functions getattro and setattro (getattr/setattr with string object arg) * Replaced "dictobject" with more powerful "mappingobject" * New per-type functio tp_hash to implement arbitrary object hashing, and hashobject() to interface to it * Added built-in functions hash(v) and hasattr(v, 'name') * classobject: made some functions static that accidentally weren't; added __hash__ special instance method to implement hash() * Added proper comparison for built-in methods and functions
* Give code objects a more useful representation.Guido van Rossum1992-09-031-1/+18
|
* Only * can be used for varargs argument listsGuido van Rossum1992-04-051-4/+8
|
* fix what lint foundGuido van Rossum1992-03-271-16/+8
|
* Totally get rid of silly '\E' escape.Guido van Rossum1992-03-121-3/+0
|
* Raise SyntaxError for syntax errors detected in this phase.Guido van Rossum1992-01-261-12/+12
|
* Use strtoul() for oct/hex constants.Guido van Rossum1992-01-191-3/+11
| | | | Accept * as well as + in varargs arg list.
* Added varargs code.Guido van Rossum1992-01-141-9/+28
|
* add READONLY to member list.Guido van Rossum1992-01-121-4/+4
|
* Minor changes.Guido van Rossum1991-12-311-5/+10
|
* Changed some RuntimeErrors.Guido van Rossum1991-12-161-3/+4
|
* New argument passing.Guido van Rossum1991-12-161-14/+17
|
* Implement 'global' and new class syntax.Guido van Rossum1991-12-101-15/+92
|
* Added shift and mask ops.Guido van Rossum1991-10-241-33/+126
|
* Comment out 'abort()' call.Guido van Rossum1991-10-201-6/+7
| | | | Changed comparison operators.
* Use dmore dict2lookup.Guido van Rossum1991-08-161-3/+6
|
* New syntax: semicolons, continue statement.Guido van Rossum1991-07-271-21/+123
| | | | | For the latter we must keep track of the current block's type. (We can't continue through a try statement, sigh.()
* Check for identical types before comparing objects to see if theyGuido van Rossum1991-07-011-1/+1
| | | | | are the same -- 0 and 0.0 compare equal but should be considered different here!
* Changed and exported newcodeobject() interface, for ".pyc" files.Guido van Rossum1991-06-041-10/+9
|
* Don't optimize <string> and <stdin> codeGuido van Rossum1991-05-141-1/+1
|
* Added long integer support.Guido van Rossum1991-05-051-0/+4
|
* BUGFIX! Instructions are unsigned bytes.Guido van Rossum1991-04-161-4/+4
|
* Added error checking for numeric constants; added local/global variableGuido van Rossum1991-04-041-4/+112
| | | | optimization.
* Create code string with initial size of 1000 instead of 0.Guido van Rossum1991-04-031-1/+1
|
* Added copyright notice.Guido van Rossum1991-02-191-0/+24
|
* Fix bug in input(); add comments to cases in compile().Guido van Rossum1991-01-211-7/+6
|
* "Compiling" versionGuido van Rossum1990-12-201-67/+130
|
* Compile class definitions.Guido van Rossum1990-11-181-27/+176
| | | | | | Document and fix code generation for try statements. Use two bytes for all arguments. Avoid duplicate entries in lists of constants and names.
* Initial revisionGuido van Rossum1990-11-181-0/+1537