Commit Graph

373 Commits

Author SHA1 Message Date
Neal Norwitz
28b32ac6bc Simplify logic for handling import * 2005-12-06 07:41:30 +00:00
Neal Norwitz
3715c3e576 Fix a few more ref leaks. Backport candidate 2005-11-24 22:09:18 +00:00
Neal Norwitz
7bcabc60a3 Fix a few more memory leaks
Document more info about the benefits of configuring without
pymalloc when running valgrind
2005-11-20 23:58:38 +00:00
Neal Norwitz
4737b2348b Last batch of ref leaks in new AST code.
Also converted a bunch of assert(0) to SystemError's.

There are still printfs, etc that need to be cleaned up.
2005-11-19 23:58:29 +00:00
Nick Coghlan
944d3eb154 Correctly handle identifiers for anonymous scopes and align genexpr name with symtable.c 2005-11-16 12:46:55 +00:00
Neal Norwitz
b6fc9df8fc Fix a lot of memory and ref leaks in error paths.
(Call symtable_exit_block or compiler_exit_scope as appropriate)

Use PyMem_Free on c_future since it was allocated with PyMem_Malloc
2005-11-13 18:50:34 +00:00
Neal Norwitz
2744c6cc35 make internal method static 2005-11-13 01:08:38 +00:00
Neil Schemenauer
c396d9edd6 Ensure that compiler_exit_scope() is called as necessary to free memory
allocated by compiler_enter_scope().  Change return type for
compiler_exit_scope() to be void.
2005-10-25 06:30:14 +00:00
Neal Norwitz
f1d50684c6 Fix problem handling EXTENDED_ARGs from SF bug # 1333982 2005-10-23 23:00:41 +00:00
Neal Norwitz
7d37f2ff40 cleanup a bit and reuse instrsize (instruction size). working towards fixing problems with EXTENDED_ARG 2005-10-23 22:40:47 +00:00
Neil Schemenauer
dad06a159e Remove unnecessary local variable. 2005-10-23 18:52:36 +00:00
Neil Schemenauer
8b528b28f1 Fix private name mangling. The symtable also must do mangles so that
the scope of names can be correctly determined.
2005-10-23 18:37:42 +00:00
Neil Schemenauer
3a44aaa30f Use PyTuple_Pack instead of Py_BuildValue. 2005-10-23 17:21:54 +00:00
Neil Schemenauer
d403c45386 Fix arigo's funky LOAD_NAME bug: implicit globals inside classes have
historically been looked up using LOAD_NAME, not LOAD_GLOBAL.
looked up by LOAD_NAME, not
2005-10-23 04:24:49 +00:00
Neil Schemenauer
ac699efad8 Don't stop generating code for import statements after the first "import as"
part.  Fixes one bug from #1333982.
2005-10-23 03:45:42 +00:00
Neil Schemenauer
ccd19218bc Use <lamba> as the function name for lambdas (matches old compiler). 2005-10-21 18:09:19 +00:00
Armin Rigo
3144130217 ANSI-C-ify the placement of local var declarations. 2005-10-21 12:57:31 +00:00
Jeremy Hylton
3e0055f8c6 Merge ast-branch to head
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.

The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Tim Peters
ea9dcdc062 com_yield_expr(): Squash new compiler wng about unreferenced local. 2005-08-03 18:33:05 +00:00
Phillip J. Eby
0d6615fd29 PEP 342 implementation. Per Guido's comments, the generator throw()
method still needs to support string exceptions, and allow None for the
third argument.  Documentation updates are needed, too.
2005-08-02 00:46:46 +00:00
Brett Cannon
c9371d4a1b Fix signedness of various char variables to stop causing a warning under gcc 4. 2005-06-25 08:23:41 +00:00
Brett Cannon
409d8f2ebd Allow classes to be defined with empty parentheses. This means that
``class C(): pass`` is no longer a syntax error.
2005-03-05 06:47:57 +00:00
Brett Cannon
5dc8ced4a8 Silence a gcc warning about putting in parentheses around && expressions mixed
with || expressions.  Also clarifies intend of 'if' conditional.
2005-03-03 07:01:48 +00:00
Raymond Hettinger
e63a078635 Preserve sign of -0.0 when result is run through marshal. 2005-02-23 13:37:55 +00:00
Raymond Hettinger
07359a7fed Document how the pattern recognizer keeps all of its references in bounds.
Add a test in case the underlying assumptions ever change (i.e. the
compiler starts generating code blocks that are not punctuated by
RETURN_VALUE).
2005-02-21 20:03:14 +00:00