summaryrefslogtreecommitdiff
path: root/Python/ceval.c
Commit message (Collapse)AuthorAgeFilesLines
* Better error message if stride used on normal sequence objectGuido van Rossum1996-07-301-2/+10
|
* Changes for slice and ellipsesGuido van Rossum1996-07-301-13/+67
|
* Renamed static pow() to powerop() to avoid name conflict in some compilers.Guido van Rossum1996-06-191-4/+4
|
* Removed some done "to do" items.Guido van Rossum1996-05-241-9/+3
| | | | Changed #ifdef DEBUG slightly.
* removed sime redundant header includes and decls.Guido van Rossum1996-05-231-8/+0
|
* changes for complex and power (**) operatorGuido van Rossum1996-01-121-0/+38
|
* don't return from main loop when error occursGuido van Rossum1995-12-101-1/+2
|
* spell TraceBack with capital BGuido van Rossum1995-09-181-1/+1
|
* empty kw dict is ok for builtinsGuido van Rossum1995-08-041-1/+6
|
* fix bogus DECREF in finally clauseGuido van Rossum1995-07-281-0/+1
|
* changes for keyword args to built-in functions and classesGuido van Rossum1995-07-261-19/+43
|
* keyword arguments and faster callsGuido van Rossum1995-07-181-364/+459
|
* 3rd arg for raise; INCOMPLETE keyword parameter passing (currently ↵Guido van Rossum1995-07-071-30/+151
| | | | f(kw=value) is seen as f('kw', value))
* fix dusty debugging macrosGuido van Rossum1995-03-291-1/+1
|
* remove unused code for tp_callGuido van Rossum1995-03-221-13/+1
|
* various tuple related optimizations; remove unused b/w compat code from ceval.cGuido van Rossum1995-03-091-74/+26
|
* fix bug in try-finally with class exceptions; declare different func ↵Guido van Rossum1995-02-171-6/+7
| | | | pointers for different uses
* call __import__() with 4 args instead of 1Guido van Rossum1995-02-141-1/+51
|
* use Py_CHARMASKGuido van Rossum1995-02-101-1/+2
|
* DECREF result of run_stringGuido van Rossum1995-02-071-2/+3
|
* remove unused variableGuido van Rossum1995-01-301-1/+0
|
* allow classes as exceptionsGuido van Rossum1995-01-261-4/+26
|
* add missing INCREF in RAISE_EXCEPTIONGuido van Rossum1995-01-201-1/+2
|
* different init for __builtins__Guido van Rossum1995-01-171-2/+2
|
* use getbuiltins() everywhere, it defaults to getbuiltidict()Guido van Rossum1995-01-121-1/+2
|
* __builtins__ mods (and sys_checkinterval for ceval.c)Guido van Rossum1995-01-091-21/+25
|
* Use new instancebinop interfaceGuido van Rossum1995-01-071-18/+18
|
* 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-44/+62
| | | | | | 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.
* replace abort() calls by fatal()Guido van Rossum1994-11-101-14/+6
|
* * Python/ceval.c, Include/ceval.h: promote MakePendingCalls toGuido van Rossum1994-09-291-4/+33
| | | | | | | | | | global: Py_MakePendingCalls. Also guard against recursive calls * Include/classobject.h, Objects/classobject.c, Python/{ceval.c,bltinmodule.c}: entirely redone operator overloading. The rules for class instances are now much more relaxed than for other built-in types (whose coerce must still return two objects of the same type)
* * Python/ceval.c (eval_code): added registry of pending functionsGuido van Rossum1994-09-141-1/+91
| | | | | (to be used by functions that are called asynchronously, like UNIX signal handlers or Mac I/O completion routines)
* call_object: print message before abort()Guido van Rossum1994-08-301-157/+144
|
* * mpzmodule.c: cast some methods to the proper type.Guido van Rossum1993-12-171-1/+0
| | | | | | | * traceback.c (tb_print): use sys.tracebacklimit as a maximum number of traceback entries to print (default 1000). * ceval.c (printtraceback): Don't print stack trace header -- this is now done by tb_print().
* * mpzmodule.c: removed redundant mpz_print function.Guido van Rossum1993-11-051-6/+7
| | | | | | | | | | | | | | * object.[ch], bltinmodule.c, fileobject.c: changed str() to call strobject() which calls an object's __str__ method if it has one. strobject() is also called by writeobject() when PRINT_RAW is passed. * ceval.c: rationalize code for PRINT_ITEM (no change in function!) * funcobject.c, codeobject.c: added compare and hash functionality. Functions with identical code objects and the same global dictionary are equal. Code objects are equal when their code, constants list and names list are identical (i.e. the filename and code name don't count). (hash doesn't work yet since the constants are in a list and lists can't be hashed -- suppose this should really be done with a tuple now we have resizetuple!)
* * ceval.c, longobject.c, methodobject.c, listnode.c, arraymodule.c,Guido van Rossum1993-11-011-0/+1
| | | | | | pythonrun.c: added static forward declarations * pythonrun.h, ceval.h, longobject.h, node.h: removed declarations of static routines
* Several optimizations and speed improvements.Sjoerd Mullender1993-10-221-7/+5
| | | | cstubs: Use Matrix type instead of float[4][4].
* * bltinmodule.c: removed exec() built-in function.Guido van Rossum1993-10-181-0/+78
| | | | | | | * 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-1/+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.
* * pythonmain.c: -k option, usage message, more environment flags.Guido van Rossum1993-06-241-0/+8
| | | | | | | | | | | (the latter also in frozenmain.c) * ceval.c: global 'killprint' flag raises exception when printing an expression statement's value (useful for finding stray output) * timemodule.c: add asctime() and ctime(). Change julian date to 1-based origin (as intended and documented). * Removed unused DO_TIMES stuff from timemodule.c. Added 'epoch' and 'day0' globals (year where time.time() == 0 and day of the week the epoch started).
* * Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.Guido van Rossum1993-06-171-0/+2
| | | | | | | | | | Added $(SYSDEF) to its build rule in Makefile. * cgensupport.[ch], modsupport.[ch]: removed some old stuff. Also changed files that still used it... And made several things static that weren't but should have been... And other minor cleanups... * listobject.[ch]: add external interfaces {set,get}listslice * socketmodule.c: fix bugs in new send() argument parsing. * sunaudiodevmodule.c: added flush() and close().
* * classobject.c: in instance_getattr, don't make a method out of aGuido van Rossum1993-05-251-19/+31
| | | | | | | | | | function found as instance data. * socketmodule.c: added 'flags' argument sendto/recvfrom, rewrite argument parsing in send/recv. * More changes related to access (terminology change: owner instead of class; allow any object as owner; local/global variables are owned by their dictionary, only class/instance data is owned by the class; "from...import *" now only imports objects with public access; etc.)
* * Lots of small changes related to access.Guido van Rossum1993-05-211-8/+49
| | | | | | | * Added "access *: ...", made access work for class methods. * Introduced subclass check: make sure that when calling ClassName.methodname(instance, ...), the instance is an instance of ClassName or of a subclass thereof (this might break some old code!)
* Access checks now work, at least for instance data (not for methodsGuido van Rossum1993-05-201-52/+75
| | | | | | | 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-62/+151
| | | | | | | | | | | | | | | | (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.)
* * pythonrun.c: Print exception type+arg *after* stack trace instead ofGuido van Rossum1993-05-121-24/+0
| | | | | | | before it. * ceval.c, object.c: moved testbool() to object.c (now extern visible) * stringobject.c: fix bugs in and rationalize string resize in formatstring() * tokenizer.[ch]: fix non-working code for lines longer than BUFSIZ
* (I suggest a recompile after getting this, the ceval.c bugfix may be crucial!)Guido van Rossum1993-04-151-5/+14
| | | | | | | * Makefile: removed superfluous AR=ar, fixed misleading comment. * ceval.c: fixed debugging code; save/restore errors in locals_2_fast. * intrcheck.c: for SunOS etc., turn off syscall resumption. * regexpr.h: bump number of registers to 100.
* * Microscopic corrections to make things compile on the Cray APP.Guido van Rossum1993-04-071-2/+1
| | | | | * Removed one use of $> in Makefile and warned about others. Added configurable lines in Makefile to change CC and AR.
* * Fixed some subtleties with fastlocals. You can no longer accessGuido van Rossum1993-03-301-9/+44
| | | | | | | | | | | | | | | | | | f_fastlocals in a traceback object (this is a core dump hazard if there are <nil> entries), but instead eval_code() merges the fast locals back into the locals dictionary if it looks like the local variables will be retained. Also, the merge routines save exceptions since this is sometimes needed (alas!). * Added id() to bltinmodule.c, which returns an object's address (identity). Useful to walk arbitrary data structures containing cycles. * Added compile() to bltinmodule.c and compile_string() to pythonrun.[ch]: support to exec/eval arbitrary code objects. The code that defaults globals and locals is moved from run_node in pythonrun.c (which is now identical to eval_node) to eval_code in ceval.c. [XXX For elegance a clean-up session is necessary.]
* Changes to speed up local variables enormously, by avoiding dictionaryGuido van Rossum1993-03-301-11/+125
| | | | | | 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.