Martin v. Löwis
ab0f947a21
Remove .cvsignore files, as they live in svn:ignore
...
properties now.
2005-10-30 22:01:41 +00:00
Neil Schemenauer
982e8d671c
Refactor code for translating "power" nodes.
2005-10-25 09:16:05 +00:00
Neil Schemenauer
c5dd10aa1d
Write a separate ast_for_testlist_gexp() function instead of overloading
...
ast_for_testlist(). Also, write a ast_for_class_bases() function and in
the process fix a memory leak. Add some assertions.
2005-10-25 07:54:54 +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
62c2fac9a0
Do not pollute name block_ty, prefix with _Py_
2005-10-24 00:30:44 +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
Neal Norwitz
12ebfd79f8
Use PyErr_NoMemory() instead of rolling our own.
...
Get rid of "int i" unused warnings from Python-ast.c which we are generating.
2005-10-23 19:22:48 +00:00
Neil Schemenauer
dad06a159e
Remove unnecessary local variable.
2005-10-23 18:52:36 +00:00
Neil Schemenauer
2dfcef5c57
Fix check_unoptimized() function. The only optimized namespaces are
...
in function blocks. This elimiates spurious warnings about "import *" and
related statements at the class level.
2005-10-23 18:50: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
147b75931d
Add an assert.
2005-10-23 03:38:19 +00:00
Neil Schemenauer
ccd19218bc
Use <lamba> as the function name for lambdas (matches old compiler).
2005-10-21 18:09:19 +00:00
Jeremy Hylton
ec97a28b60
Fix a bunch of imports to use code.h instead of compile.h.
...
Remove duplicate declarations from compile.h
2005-10-21 14:58:06 +00:00
Armin Rigo
3144130217
ANSI-C-ify the placement of local var declarations.
2005-10-21 12:57:31 +00:00
Michael W. Hudson
aee2e2829d
the ast-branch changed the stack discipline of MAKE_CLOSURE, so we need to
...
bump MAGIC.
2005-10-21 11:32:20 +00:00
Neal Norwitz
37c0844b35
Fix SF bug #1167751 , Argument genexp corner case
...
Incorrect code was generated for:
foo(a = i for i in range(10))
This should have generated a SyntaxError. Fix the Grammar so
it raises a SyntaxError and test it.
I'm uncertain whether this should be backported. It makes
something that was Syntactically valid invalid. However,
the code would either be completely broken or do the wrong thing.
2005-10-21 06:24:02 +00:00
Neal Norwitz
57071ce545
Oops, "=" is not a comparison operator
2005-10-21 05:15:07 +00:00
Neal Norwitz
5f5153e871
Fix some mods that got dropped from the AST merge
2005-10-21 04:28:38 +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
Neal Norwitz
708e51a6b1
Fix SF bug #976608 , Unhelpful error message when mtime of a module is -1
...
Will backport.
2005-10-03 04:48:15 +00:00
Neal Norwitz
11bd119226
SF bug #887946 , segfault if redirecting directory
...
Also provide a warning if a directory is passed on the command line.
Add minimal command line test.
Will backport.
2005-10-03 00:54:56 +00:00
Neal Norwitz
40d3781416
- Fix segfault with invalid coding.
...
- SF Bug #772896 , unknown encoding results in MemoryError, which is not helpful
I will only backport the segfault fix. I'll let Anthony decide if he wants
the other changes backported. I will do the backport if asked.
2005-10-02 01:48:49 +00:00
Michael W. Hudson
ce7da6c5e9
Forward port bugfix:
...
[ 1307978 ] Unsatisfied symbols: _PyGILState_NoteThreadState (code)
(note that this only happens in a threads-disabled build).
2005-09-30 08:20:24 +00:00
Raymond Hettinger
6b27cda643
Convert iterator __len__() methods to a private API.
2005-09-24 21:23:05 +00:00
Armin Rigo
1c2d7e5363
clean-up tracing of C functions. In particular, don't call the trace func
...
with an exception currently set!
2005-09-20 18:34:01 +00:00
Armin Rigo
71d7e704b8
Removed a check "if (args != NULL)" which is always True and makes no sense.
2005-09-20 18:13:03 +00:00
Armin Rigo
a6eb56cf46
Don't call memset() before checking that the ptr is not NULL.
2005-09-20 18:07:47 +00:00
Georg Brandl
6953772d90
patch [ 1119423 ] python -c readlink()s and stat()s '-c'
2005-09-15 13:00:34 +00:00
Georg Brandl
77c85e63b4
bug [ 868706 ] Calling builtin function 'eval' from C causes seg fault.
2005-09-15 10:46:13 +00:00
Georg Brandl
6dd14619bb
Complete format code support in getargs.c::skipitem(), which is called when
...
evaluating keyword arguments.
2005-09-14 19:29:53 +00:00
Guido van Rossum
8ee3e5aa93
- Changes donated by Elemental Security to make it work on AIX 5.3
...
with IBM's 64-bit compiler (SF patch #1284289 ). This also closes SF
bug #105470 : test_pwd fails on 64bit system (Opteron).
2005-09-14 18:09:42 +00:00
Guido van Rossum
539c662f10
- Changes donated by Elemental Security to make it work on HP-UX 11 on
...
Itanium2 with HP's 64-bit compiler (SF patch #1225212 ).
2005-09-14 17:49:54 +00:00
Georg Brandl
0c55f2946b
Patch #1290454 : Fix reload() error message when parent module is not in
...
sys.modules.
2005-09-14 06:56:20 +00:00
Georg Brandl
99d7e4e8eb
Whitespace normalization.
2005-08-31 22:21:15 +00:00
Georg Brandl
02c42871cf
Disallow keyword arguments for type constructors that don't use them.
...
(fixes bug #1119418 )
2005-08-26 06:42:30 +00:00
Martin v. Löwis
d35edda682
Forward UnicodeDecodeError into SyntaxError for source encoding errors.
...
Will backport to 2.4.
2005-08-24 08:39:24 +00:00
Raymond Hettinger
a710b331da
SF bug #1242657 : list(obj) can swallow KeyboardInterrupt
...
Fix over-aggressive PyErr_Clear(). The same code fragment appears in
various guises in list.extend(), map(), filter(), zip(), and internally
in PySequence_Tuple().
2005-08-21 11:03:59 +00:00
Raymond Hettinger
beb3101b05
Add a C API for sets and frozensets.
2005-08-16 03:47:52 +00:00
Barry Warsaw
e2eca0b709
Port from the Python 2.4 branch, patches for SF bug # 900092,
...
hotshot.stats.load.
2005-08-15 18:14:19 +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
Raymond Hettinger
d794666048
* Improve code for the empty frozenset singleton:
...
- Handle both frozenset() and frozenset([]).
- Do not use singleton for frozenset subclasses.
- Finalize the singleton.
- Add test cases.
* Factor-out set_update_internal() from set_update(). Simplifies the
code for several internal callers.
* Factor constant expressions out of loop in set_merge_internal().
* Minor comment touch-ups.
2005-08-01 21:39:29 +00:00
Georg Brandl
e35b657efd
Fix cleanup DECREF logic in builtin_filter function.
2005-07-19 22:20:20 +00:00
Georg Brandl
9a3240e8e6
bug 1234979 addition
2005-07-09 15:26:33 +00:00
Georg Brandl
af410b510d
bug [ 1234979 ] Lock.acquire treats only 1 as True
2005-07-08 22:26:13 +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