Serhiy Storchaka
3f22811fef
bpo-32892: Use ast.Constant instead of specific constant AST types. (GH-9445)
2018-09-27 17:42:37 +03:00
Ammar Askar
025eb98dc0
bpo-34683: Make SyntaxError column offsets consistently 1-indexed (gh-9338)
...
Also point to start of tokens in parsing errors.
Fixes bpo-34683
2018-09-24 14:12:49 -07:00
Serhiy Storchaka
7bdf28265a
bpo-32455: Add jump parameter to dis.stack_effect(). (GH-6610)
...
Add C API function PyCompile_OpcodeStackEffectWithJump().
2018-09-18 09:54:26 +03:00
Serhiy Storchaka
da8d72c953
bpo-12458: Fix line numbers for multiline expressions. (GH-8774)
2018-09-17 15:17:29 +03:00
Benjamin Peterson
e502451781
closes bpo-34646: Remove PyAPI_* macros from declarations. (GH-9218)
2018-09-12 12:06:42 -07:00
Serhiy Storchaka
143ce5c6db
bpo-33691: Add _PyAST_GetDocString(). (GH-7236)
2018-05-30 10:56:16 +03:00
Serhiy Storchaka
73cbe7a01a
bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197)
...
Remove the docstring attribute of AST types and restore docstring
expression as a first stmt in their body.
Co-authored-by: INADA Naoki <methane@users.noreply.github.com >
2018-05-29 12:04:55 +03:00
Serhiy Storchaka
64fddc423f
bpo-33475: Fix and improve converting annotations to strings. (GH-6774)
2018-05-16 23:17:48 -04:00
Zsolt Dollenstein
e239650660
bpo-33363: raise SyntaxError for async for/with outside async functions ( #6616 )
2018-04-27 11:58:56 -04:00
Serhiy Storchaka
57faf34887
bpo-33334: Support NOP and EXTENDED_ARG in dis.stack_effect(). ( #6566 )
...
Added tests to ensure that all defined opcodes are supported.
2018-04-25 22:04:06 +03:00
Serhiy Storchaka
d70c2a6894
bpo-33298: Wrap only constants with _PyCode_ConstantKey() in the compiler. (GH-6512)
2018-04-20 16:01:25 +03:00
Serhiy Storchaka
b7e1eff843
bpo-33299: Return an object itself for some types in _PyCode_ConstantKey(). (GH-6513)
2018-04-19 08:28:04 +03:00
Zackery Spytz
f303639e3a
bpo-33270: Intern names for all anonymous code objects ( #6472 )
2018-04-16 01:12:29 +03:00
Serhiy Storchaka
aa8e51f5eb
bpo-33132: Fix more reference counting issues in the compiler. (GH-6323)
2018-04-01 00:29:37 +03:00
Serhiy Storchaka
a95d98607e
bpo-33132: Fix reference counting issues in the compiler. (GH-6209)
2018-03-24 22:42:35 +02:00
Serhiy Storchaka
702f8f3611
bpo-33041: Rework compiling an "async for" loop. ( #6142 )
...
* Added new opcode END_ASYNC_FOR.
* Setting global StopAsyncIteration no longer breaks "async for" loops.
* Jumping into an "async for" loop is now disabled.
* Jumping out of an "async for" loop no longer corrupts the stack.
* Simplify the compiler.
2018-03-23 14:34:35 +02:00
Serhiy Storchaka
fe2bbb1869
bpo-32489: Allow 'continue' in 'finally' clause. (GH-5822)
2018-03-18 09:56:52 +02:00
Serhiy Storchaka
67ee07795b
bpo-33041: Add missed error checks when compile "async for" ( #6053 )
...
and remove redundant code.
2018-03-10 18:49:26 +02:00
Serhiy Storchaka
24d3201eb7
bpo-33041: Fixed bytecode generation for "async for" with a complex target. ( #6052 )
...
A StopAsyncIteration raised on assigning or unpacking will be now propagated
instead of stopping the iteration.
2018-03-10 18:22:34 +02:00
Serhiy Storchaka
520b7ae27e
bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. (GH-5006)
...
Co-authored-by: Mark Shannon <mark@hotpy.org >
Co-authored-by: Antoine Pitrou <antoine@python.org >
2018-02-22 23:33:30 +02:00
Mark Shannon
332cd5ee4f
bpo-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181)
2018-01-29 16:41:04 -08:00
Guido van Rossum
95e4d58913
String annotations [PEP 563] ( #4390 )
...
* Document `from __future__ import annotations`
* Provide plumbing and tests for `from __future__ import annotations`
* Implement unparsing the AST back to string form
This is required for PEP 563 and as such only implements a part of the
unparsing process that covers expressions.
2018-01-26 08:20:18 -08:00
Serhiy Storchaka
782d6fe443
bpo-31113: Get rid of recursion in the compiler for normal control flow. ( #3015 )
2018-01-11 20:20:13 +02:00
Serhiy Storchaka
d4864c61e3
bpo-24340: Fix estimation of the code stack size. ( #5076 )
2018-01-09 21:54:52 +02:00
Serhiy Storchaka
02b9ef2775
bpo-32439: Clean up the code for compiling comparison expressions. ( #5029 )
2017-12-30 09:47:42 +02:00