Commit Graph

82 Commits

Author SHA1 Message Date
Guido van Rossum 79f25d9a7b Quickly renamed the remaining files -- this directory is done. 1997-04-29 20:08:16 +00:00
Guido van Rossum 644a12b00c Tweaks to keep the Microsoft compiler quier. 1997-04-09 19:24:53 +00:00
Guido van Rossum 5f5e817e00 Support for alternative string quotes (a"xx", b"xx", c"xx", ...).
In interactive mode, do generate code for single-string statements.
1997-04-06 03:41:40 +00:00
Guido van Rossum 228d7f3f67 Added assert statement. 1997-04-02 05:24:36 +00:00
Guido van Rossum 45b83915f8 New form of PyFPE_END_PROTECT macro. 1997-03-14 04:32:50 +00:00
Guido van Rossum 6af0c00ab6 Fix dumb bug calling parsestrplus with wrong node as argument.
Add prototypes for parsestr() and parsestrplus() (unrelated, but
seemed to make sense.)
1997-03-11 21:25:55 +00:00
Guido van Rossum 7c53111d5b Added support for ``if __debug__:'' -- if -O is given, this form is
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.
1997-03-11 18:42:21 +00:00
Guido van Rossum 8e793d925c Add global Py_OptimizeFlag. SET_LINENO is omitted again unless this is
nonzero.
1997-03-03 19:13:14 +00:00
Guido van Rossum 0ae748d3c4 Changes for Lee Busby's SIGFPE patch set.
New file pyfpe.c and exception FloatingPointError.
Surround some f.p. operations with PyFPE macro brackets.
1997-02-14 22:58:07 +00:00
Guido van Rossum da4eb5c3b5 Instead of emitting SET_LINENO instructions, generate a line number
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.
1997-01-24 03:43:35 +00:00
Guido van Rossum 7eb883a18e Remove unused variable. 1997-01-18 20:04:05 +00:00
Guido van Rossum 7b89b6a660 Intern all names and varnames in newcodeobject(), plus those string
literals that look like identifiers.  Also intern all strings used as
names during the compilation.
1997-01-18 08:02:57 +00:00
Guido van Rossum 8b993a98db Add co_stacksize field to codeobject structure, and stacksize argument
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).
1997-01-17 21:04:03 +00:00
Guido van Rossum 635abd24f0 Check for duplicate keyword arguments at compile time. 1997-01-06 22:56:52 +00:00
Guido van Rossum 80bb9655f0 Keep gcc -Wall happy. 1996-12-05 23:27:02 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum e449af7da9 Ellipses -> Ellipsis rename (the dictionary really says that it should
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.
1996-10-11 16:25:41 +00:00
Guido van Rossum 452a9833c9 Added line number to most compile-time error messages. 1996-09-17 14:32:04 +00:00
Guido van Rossum d8a6d1c2e7 Afterthough: leave both leading underscores in,
so __spam becomes _ClassName__spam.
1996-08-24 07:54:27 +00:00
Guido van Rossum fe2236f3c8 Oops need to mangle global statement separately 1996-08-24 07:29:04 +00:00
Guido van Rossum 8ff077b094 Name mangling, what the heck! 1996-08-24 06:21:31 +00:00
Guido van Rossum 0dfcf753ad Disable support for access statement 1996-08-12 22:00:53 +00:00
Guido van Rossum 15cc9a0a76 Removed unused var; added error check for ``lambda: x=1''. 1996-08-08 18:51:04 +00:00
Guido van Rossum 8861b74445 Changes for slice and ellipses 1996-07-30 16:49:37 +00:00
Guido van Rossum 530956d247 Py_complex; and WITHOUT_COMPLEX added to getargs.c 1996-07-21 02:27:43 +00:00
Guido van Rossum 15ad9a6e52 only use 'j' for imaginary constants 1996-01-26 20:53:56 +00:00
Jack Jansen 1e7b2aa5d6 Removed unused var 1996-01-25 16:11:19 +00:00
Guido van Rossum 50564e8dae changes for complex and power (**) operator 1996-01-12 01:13:16 +00:00
Guido van Rossum 53f4524a92 disable code generation for access statement 1995-10-08 00:42:46 +00:00
Jack Jansen 95ffa23597 Removed unused variables 1995-10-03 14:38:41 +00:00
Guido van Rossum a1e7e62893 fix bug with missing default for last arg (discovered by Tommy Burnette) 1995-09-18 21:44:04 +00:00
Guido van Rossum 681d79aaf3 keyword arguments and faster calls 1995-07-18 14:51:37 +00:00
Guido van Rossum f10570b9eb 3rd arg for raise; INCOMPLETE keyword parameter passing (currently f(kw=value) is seen as f('kw', value)) 1995-07-07 22:53:21 +00:00
Guido van Rossum d9dfaf5a3b fix typo (== for =) in assignment 1995-02-17 15:04:57 +00:00
Guido van Rossum 7f7f274839 use Py_CHARMASK 1995-02-10 17:01:56 +00:00
Guido van Rossum 164d4ff0e5 added missing case to get_docstring 1995-01-26 00:40:09 +00:00
Guido van Rossum 3952cb0725 fix mem leak (localmap in optimize) 1995-01-20 16:56:41 +00:00
Guido van Rossum 1f4fa50176 Two independent chages:
(a) support import NAME.NAME...NAME;
(b) support doc strings in modules, classes and function definitions
1995-01-07 12:41:23 +00:00
Guido van Rossum 6d023c98b0 Added 1995 to copyright message.
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().
1995-01-04 19:12:13 +00:00
Guido van Rossum 1ae940a587 Lots of changes, most minor (fatal() instead of abort(), use of
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.
1995-01-02 19:04:15 +00:00
Guido van Rossum 363ac7d5b6 set name to <lambda> instead of None for lambdas 1994-11-10 22:40:34 +00:00
Guido van Rossum 4ca6c9db81 * Python/compile.c (com_argdefs, com_arglist): avoid referencing
CHILD(n,i) for i >= NCH(n)
1994-08-29 12:16:12 +00:00
Guido van Rossum 57531fea90 change syntactical position of lambdef (was an atom, now is a test) 1993-11-30 14:57:42 +00:00
Guido van Rossum 590baa4a7a * import.c (get_module): pass .py filename to parse_file, not .pyc filename!
* 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.
1993-11-30 13:40:46 +00:00
Guido van Rossum a3d78fb268 * posixmodule.c: added set{uid,gid}.
* {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
1993-11-10 09:23:53 +00:00
Guido van Rossum 2e8f8a398e Added compare operations for functions and code objects.
(Also hash, but it doesn't work yet.)
1993-11-05 10:20:10 +00:00
Guido van Rossum 12d12c5faf * compile.[ch]: support for lambda()
* 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!!!)
1993-10-26 17:58:25 +00:00
Guido van Rossum 8054fad890 Changes to accept double-quoted strings on input. 1993-10-26 15:19:44 +00:00
Guido van Rossum db3165e655 * bltinmodule.c: removed exec() built-in function.
* 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.
1993-10-18 17:06:59 +00:00
Guido van Rossum f1dc566328 * Makefile: added all: and default: targets.
* 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.
1993-07-05 10:31:29 +00:00