[issue46841] Inline bytecode caches

2022-03-08 Thread Mark Shannon
Mark Shannon added the comment: New changeset 5498a61c7c25db6f9e76032aa9c5153d79e09889 by Brandt Bucher in branch 'main': bpo-46841: Don't use an oparg counter for `STORE_SUBSCR` (GH-31742) https://github.com/python/cpython/commit/5498a61c7c25db6f9e76032aa

[issue46896] add support for watching writes to selected dictionaries

2022-03-10 Thread Mark Shannon
Mark Shannon added the comment: There are three kinds of changes that we might want to watch (that I can think of right now): 1. Any change. Rather coarse and potentially expensive. Used by Cinder. 2. A new key being added (or a change to the keys version as a proxy). Useful for detect

[issue46841] Inline bytecode caches

2022-03-11 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29915 pull_request: https://github.com/python/cpython/pull/31817 ___ Python tracker <https://bugs.python.org/issue46

[issue46896] add support for watching writes to selected dictionaries

2022-03-11 Thread Mark Shannon
Mark Shannon added the comment: You might not like global variables, they may not show up much in benchmarks, but people do use them. I suspect a lot of jupyter notebooks have quite a few global variables. There should not be much of a slowdown for this code when watching `CONST`: CONST

[issue46896] add support for watching writes to selected dictionaries

2022-03-11 Thread Mark Shannon
Mark Shannon added the comment: Another use of this is to add watch points in debuggers. To that end, it would better if the callback were a Python object. The overhead is relatively small if using the vectorcall protocol. If the call overhead matters that much, there is something wrong as

[issue46944] Use FASTCALL calling convention in generator.throw

2022-03-11 Thread Mark Shannon
Mark Shannon added the comment: New changeset 304197b3820309e3ed695ff3e6a71461881a1728 by Kumar Aditya in branch 'main': bpo-46944: use FASTCALL calling convention in generator.throw (GH-31723) https://github.com/python/cpython/commit/304197b3820309e3ed695ff3e6a714

[issue46841] Inline bytecode caches

2022-03-15 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +29996 pull_request: https://github.com/python/cpython/pull/31901 ___ Python tracker <https://bugs.python.org/issue46

[issue45923] Improve performance of sys.settracing based tools.

2022-03-15 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +30001 pull_request: https://github.com/python/cpython/pull/31908 ___ Python tracker <https://bugs.python.org/issue45

[issue46896] add support for watching writes to selected dictionaries

2022-03-15 Thread Mark Shannon
Mark Shannon added the comment: Let me give you an example. #module eggs eggs_var = 0 # a variable, maybe a counter or similar EGGS_CONST # a constant #module spam import eggs spam_var # Another variable def foo(): use(eggs.EGGS_CONST) - We will want to treat

[issue46817] Add a line-start table to the code object.

2022-03-15 Thread Mark Shannon
Mark Shannon added the comment: sys.settrace line events cannot use the co_lines table. They need additional state, as we don't want to trace the same line twice (unless there is a backwards jump). Using the start of a entry in `co_lines` doesn't work when some entries have no l

[issue45923] Improve performance of sys.settracing based tools.

2022-03-15 Thread Mark Shannon
Mark Shannon added the comment: New changeset 099f75614100e88ed90b68d20a51a8d9c22f81a7 by Mark Shannon in branch 'main': bpo-45923: Decouple suspension of tracing from tracing flag. (GH-31908) https://github.com/python/cpython/commit/099f75614100e88ed90b68d20a51a8

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-03-16 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +30025 pull_request: https://github.com/python/cpython/pull/31933 ___ Python tracker <https://bugs.python.org/issue46

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-03-17 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue47045] Remove the RESUME instruction

2022-03-17 Thread Mark Shannon
New submission from Mark Shannon : The RESUME instruction was added to make resumption points explicit in the bytecode. This makes it easier to implement tracing, quickening, and interrupt checks as there is an explicit place to perform these checks. Unfortunately, it also has considerable

[issue47046] Add `f_state` attribute to FrameObjects.

2022-03-17 Thread Mark Shannon
New submission from Mark Shannon : When tracing, the event supplied is insufficient to determine what is actually happening. E.g. A "call" event could be a call to a function or resuming a generator or coroutine. Adding a state field to the FrameObject would allow these c

[issue47045] Remove the RESUME instruction

2022-03-17 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +30052 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31963 ___ Python tracker <https://bugs.python.org/issu

[issue46841] Inline bytecode caches

2022-03-21 Thread Mark Shannon
Mark Shannon added the comment: New changeset 2bde6827ea4f136297b2d882480b981ff26262b6 by Brandt Bucher in branch 'main': bpo-46841: Quicken code in-place (GH-31888) https://github.com/python/cpython/commit/2bde6827ea4f136297b2d882480b98

[issue45563] inspect.getframeinfo() doesn't handle frames without lineno

2022-03-22 Thread Mark Shannon
Mark Shannon added the comment: You are on own if you create code objects by calling `types.CodeType`. The docs could be a lot clearer about that, though. -- ___ Python tracker <https://bugs.python.org/issue45

[issue47085] missing frame.f_lineno on JUMP_ABSOLUTE

2022-03-22 Thread Mark Shannon
Mark Shannon added the comment: The `JUMP_ABSOLUTE` doesn't have a line number, as it doesn't correspond to any source. The jump back to the top could follow either the `if i >= 0:` or the `pass`, so cannot have a line number. Don't expect every bytecode to map directly

[issue47045] Remove the RESUME instruction

2022-03-22 Thread Mark Shannon
Mark Shannon added the comment: New changeset 49daf6dba8178c5ae5d4d65408b20566d39c36a8 by Mark Shannon in branch 'main': bpo-47045: Remove `f_state` field (GH-31963) https://github.com/python/cpython/commit/49daf6dba8178c5ae5d4d65408b205

[issue46724] Odd Bytecode Generation in 3.10

2022-03-22 Thread Mark Shannon
Mark Shannon added the comment: I think this is fixed (for 3.11 at least) by https://github.com/python/cpython/pull/31888 -- ___ Python tracker <https://bugs.python.org/issue46

[issue47092] [C API] Add PyFrame_GetVar(frame, name) function

2022-03-22 Thread Mark Shannon
Mark Shannon added the comment: I'm looking into adding two new APIs. One to round out the getters for FrameObject and one to introspect the internal frame stack. It would probably make more sense to add this capability to the frame stack API, as it would avoid creating the frame obje

[issue42917] Block stack size for frame objects should be dynamically sizable

2022-03-22 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +30145 pull_request: https://github.com/python/cpython/pull/32055 ___ Python tracker <https://bugs.python.org/issue42

[issue42197] Disable automatic update of frame locals during tracing

2022-03-22 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +30147 pull_request: https://github.com/python/cpython/pull/32055 ___ Python tracker <https://bugs.python.org/issue42

[issue42917] Block stack size for frame objects should be dynamically sizable

2022-03-25 Thread Mark Shannon
Mark Shannon added the comment: With the introduction of zero cost exceptions, there is no block stack. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42197] Disable automatic update of frame locals during tracing

2022-03-25 Thread Mark Shannon
Mark Shannon added the comment: New changeset d7163bb35d1ed46bde9affcd4eb267dfd0b703dd by Mark Shannon in branch 'main': bpo-42197: Don't create `f_locals` dictionary unless we actually need it. (GH-32055) https://github.com/python/cpython/commit/d7163bb35d1ed46bde9affcd4

[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-03-25 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +30190 pull_request: https://github.com/python/cpython/pull/32114 ___ Python tracker <https://bugs.python.org/issue40

[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-25 Thread Mark Shannon
Mark Shannon added the comment: New changeset cca43b7d64f47ea921d0f7a347ae1a839c5463c3 by Dennis Sweeney in branch 'main': bpo-47053: Reduce deoptimization in BINARY_OP_INPLACE_ADD_UNICODE (GH-31318) https://github.com/python/cpython/commit/cca43b7d64f47ea921d0f7a347ae1a

[issue47164] [C API] Add private "CAST" macros to clean up casts in C code

2022-03-30 Thread Mark Shannon
Mark Shannon added the comment: I think that adding macros makes readability worse. The macro is only more readable if you already know what it does. If you don't, then you need to look up the macro, and understand the cast in the macro (which is harder than understanding the original

[issue47164] [C API] Add private "CAST" macros to clean up casts in C code

2022-03-30 Thread Mark Shannon
Mark Shannon added the comment: The problem in the example you give is the need for the cast in the first place. If `func` were a `PyCFunctionObject *` instead of a `PyObject *`, then there would be no cast. Making the casts explicit serves as a reminder that a type check is needed

[issue47120] Make all jump opcodes relative

2022-03-31 Thread Mark Shannon
Mark Shannon added the comment: New changeset a00518d9ad9a8f408a9699191019d75dd8406c32 by Irit Katriel in branch 'main': bpo-47120: Replace the JUMP_ABSOLUTE opcode by the relative JUMP_BACKWARD (GH-32115) https://github.com/python/cpython/commit/a00518d9ad9a8f408a9699191019d7

[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-03-31 Thread Mark Shannon
Mark Shannon added the comment: New changeset 74b95d86e0f14603f878c4df3133bc8a93f8f80a by Mark Shannon in branch 'main': bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114) https://github.com/python/cpython/commit/74b95d86e0f14603f878c4df3133bc

[issue47009] Streamline list.append for the common case

2022-04-01 Thread Mark Shannon
Mark Shannon added the comment: New changeset a0ea7a116ce52a178c02d42b684089758bd7f355 by Dennis Sweeney in branch 'main': bpo-47009: Streamline list.append for the common case (GH-31864) https://github.com/python/cpython/commit/a0ea7a116ce52a178c02d42b684089758bd7f355 -

[issue46841] Inline bytecode caches

2022-04-01 Thread Mark Shannon
Mark Shannon added the comment: New changeset bd2e47c8830d1b2869f2b4345945a5e0c3b4e3fb by Brandt Bucher in branch 'main': bpo-46841: Avoid unnecessary allocations in code object comparisons (GH-3) https://github.com/python/cpython/commit/bd2e47c8830d1b2869f2b4345945a5

[issue46841] Inline bytecode caches

2022-04-01 Thread Mark Shannon
Mark Shannon added the comment: New changeset ae9de82e321581e1906c6ef2a7ad83ab30ae3325 by Brandt Bucher in branch 'main': bpo-46841: Use a `bytes` object for `_co_code_adaptive` (GH-32205) https://github.com/python/cpython/commit/ae9de82e321581e1906c6ef2a7ad83

[issue47186] split JUMP_IF_NOT_EXC/EG_MATCH into CHECK_EXC/EG_MATCH + jump

2022-04-01 Thread Mark Shannon
Mark Shannon added the comment: New changeset 04e07c258f4f2ac85e25355242a113f98a706f04 by Irit Katriel in branch 'main': bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231) https://github.com/python/cpython/commit/04e07c258f4f2ac85e25355242a113

[issue47172] Make virtual opcodes in the compiler negative and is_jump() identify only proper jumps

2022-04-01 Thread Mark Shannon
Mark Shannon added the comment: New changeset 997ba5d126f5040d5b7536f73bc89049e9f9421d by Irit Katriel in branch 'main': bpo-47172: Compiler enhancements (GH-32200) https://github.com/python/cpython/commit/997ba5d126f5040d5b7536f73bc89049e9f9421d -- nosy: +Ma

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-04 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +30363 pull_request: https://github.com/python/cpython/pull/32301 ___ Python tracker <https://bugs.python.org/issue44

[issue47215] Add "unstable" frame stack api

2022-04-04 Thread Mark Shannon
New submission from Mark Shannon : We need to provide an API to create, swap and free frame stacks for greenlets. Since this is primarily for greenlets (and any other stackful coroutines libraries that want to use it) it will be "unstable". In this case, by "unstable" I

[issue47215] Add "unstable" frame stack api

2022-04-04 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +30366 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32303 ___ Python tracker <https://bugs.python.org/issu

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-04 Thread Mark Shannon
Mark Shannon added the comment: New changeset 8a349eb30b54bab9a7146fc10e3379c3cacaa19e by Mark Shannon in branch 'main': Revert "bpo-44800: Document internal frame naming conventions (GH-32281)" (#32301) https://github.com/python/cpython/commit/8a349eb30b54bab9a714

[issue45317] Document the removal the usage of the C stack in Python to Python calls

2022-04-04 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +30367 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32304 ___ Python tracker <https://bugs.python.org/issu

[issue47009] Streamline list.append for the common case

2022-04-05 Thread Mark Shannon
Mark Shannon added the comment: New changeset 6c6e0408a663c1f53dad403f54a18d444da39cb7 by Dennis Sweeney in branch 'main': bpo-47009: Let PRECALL_NO_KW_LIST_APPEND do its own POP_TOP (GH-32239) https://github.com/python/cpython/commit/6c6e0408a663c1f53dad403f54a18d

[issue47248] Possible slowdown of regex searching in 3.11

2022-04-07 Thread Mark Shannon
New submission from Mark Shannon : The 3 regular expression benchmarks in the pyperformance suite, regex_v8, regex_effbot and regex_dna show slowdowns between 3% and 10%. Looking at the stats, nothing seems wrong with specialization or the memory optimizations. Which strongly suggests a

[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-04-08 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +30439 pull_request: https://github.com/python/cpython/pull/32413 ___ Python tracker <https://bugs.python.org/issue40

[issue47046] Add `f_state` attribute to FrameObjects.

2022-04-08 Thread Mark Shannon
Mark Shannon added the comment: Don't you need to know if a "call" event is a call or the resumption of a generator? -- ___ Python tracker <https://bugs.pyt

[issue21120] PyArena type is used in headers from the limited API

2019-09-09 Thread Mark Shannon
Mark Shannon added the comment: This seems like the correct thing to do. Since the AST changes from version to version, I don't see how these files could reasonably be part of the limited API. -- nosy: +Mark.Shannon ___ Python tracker &

[issue21120] PyArena type is used in headers from the limited API

2019-09-12 Thread Mark Shannon
Mark Shannon added the comment: New changeset 421a72af4deaec96a49a79951b9c2546a2faa13d by Mark Shannon (Zackery Spytz) in branch 'master': bpo-21120: Exclude Python-ast.h, ast.h and asdl.h from the limited API (#14634) https://github.com/python/cpyt

[issue21120] PyArena type is used in headers from the limited API

2019-09-12 Thread Mark Shannon
Change by Mark Shannon : -- stage: patch review -> resolved ___ Python tracker <https://bugs.python.org/issue21120> ___ ___ Python-bugs-list mailing list Un

[issue21120] PyArena type is used in headers from the limited API

2019-09-12 Thread Mark Shannon
Change by Mark Shannon : -- status: open -> closed ___ Python tracker <https://bugs.python.org/issue21120> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38135] Depth first search in compile.c creates wrong BB order for certain CFG.

2019-09-12 Thread Mark Shannon
New submission from Mark Shannon : Consider a flow graph of four nodes, A, B, C, D where the A, B, C are "next" successors of each other (in order) and C branches to B and B branches to D. Note that there is no "next" link to the D block. The correct order is A, B, C, D bu

[issue38135] Depth first search in compile.c creates wrong BB order for certain CFG.

2019-09-12 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue38135> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38135] Depth first search in compile.c creates wrong BB order for certain CFG.

2019-09-12 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +15664 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16042 ___ Python tracker <https://bugs.python.org/issu

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2019-09-12 Thread Mark Shannon
Mark Shannon added the comment: I expect to fix this is as part of the general improvements I am making to the bytecode, interpreter and compiler. So it should be fixed for 3.9 but not for 3.8 -- ___ Python tracker <https://bugs.python.

[issue26219] implement per-opcode cache in ceval

2019-10-07 Thread Mark Shannon
Mark Shannon added the comment: "What's new in Python 3.8" says that this change speeds up the LOAD_GLOBAL opcode by 40%. That seems meaningless as a program cannot have LOAD_GLOBAL in isolation so any test would have other bytecodes as well. What's the evidence for

[issue26219] implement per-opcode cache in ceval

2019-10-07 Thread Mark Shannon
Mark Shannon added the comment: Given that def foo(): int; str; bytes; float; int; str; bytes; float can be trivially be rewritten as def foo(): pass I think that benchmark is meaningless. I really don't think we should be making claims like "40% speedup" for such contrive

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-04 Thread Mark Shannon
Mark Shannon added the comment: I'm strongly opposed to this change. PEP 523 does not specify what the semantics of changing the interpreter frame evaluator actually is: Is the VM obliged to call the new interpreter? What happens if the custom evaluator leaves the VM in a inconsistent

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-04 Thread Mark Shannon
Mark Shannon added the comment: Fabio, OOI what are you trying achieve by changing the frame evaluator? -- ___ Python tracker <https://bugs.python.org/issue38

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-07 Thread Mark Shannon
Mark Shannon added the comment: Victor, I don't think this is a regression. `PyThreadState` is an internal opaque data structure, which means we are free to change it. That the `eval_frame` is hard to access is a feature not a bug, as it discourages misuse and enables us to remove it e

[issue39316] settrace skips lines when chaining methods without arguments

2021-03-14 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +23619 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24859 ___ Python tracker <https://bugs.python.org/issu

[issue39316] settrace skips lines when chaining methods without arguments

2021-03-14 Thread Mark Shannon
Mark Shannon added the comment: New changeset d48848c83e0f3e41b65c8f741f3fb6dbce5b9c29 by Mark Shannon in branch 'master': bpo-39316: Make sure that attribute accesses and stores, including method calls, conform to PEP 626. (GH-24859) https://github.com/python/cpyt

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2021-03-14 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23620 pull_request: https://github.com/python/cpython/pull/24860 ___ Python tracker <https://bugs.python.org/issue42

[issue43497] SyntaxWarning for "assertion is always true, perhaps remove parentheses?" does not work with constants

2021-03-16 Thread Mark Shannon
Mark Shannon added the comment: New changeset a8ef4572a6b28bcfc0b10b34fa4204954b9dd761 by tsukasa-au in branch 'master': bpo-43497: Emit SyntaxWarnings for assertions with tuple constants. (GH-24867) https://github.com/python/cpython/commit/a8ef4572a6b28bcfc0b10b34fa4204

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2021-03-16 Thread Mark Shannon
Mark Shannon added the comment: No. We should add it. -- ___ Python tracker <https://bugs.python.org/issue42246> ___ ___ Python-bugs-list mailing list Unsub

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2021-03-16 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23654 pull_request: https://github.com/python/cpython/pull/24892 ___ Python tracker <https://bugs.python.org/issue42

[issue42246] Implement PEP 626 -- Precise line numbers for debugging

2021-03-17 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23665 pull_request: https://github.com/python/cpython/pull/24902 ___ Python tracker <https://bugs.python.org/issue42

[issue43563] Use dedicated opcodes to speed up calls/attribute lookups with super() as receiver

2021-03-20 Thread Mark Shannon
Mark Shannon added the comment: Why? Do you have any evidence that the overhead of super() is significant in real programs, or that the proposed change actually speeds up anything beyond your micro-benchmark? -- nosy: +Mark.Shannon ___ Python

[issue43563] Use dedicated opcodes to speed up calls/attribute lookups with super() as receiver

2021-03-22 Thread Mark Shannon
Mark Shannon added the comment: Numbers please. What is "non-negligible cost of allocation/initialization" mean as a fraction of runtime? What sort of speed up are you seeing on whole programs? -- ___ Python tracker <https://bu

[issue26300] "unpacked" bytecode

2021-03-29 Thread Mark Shannon
Mark Shannon added the comment: PEP 511 was rejected. The "peephole" optimizer now operates on the internal IR, not the bytecode. -- nosy: +Mark.Shannon resolution: -> out of date stage: -> resolved status: open -> closed ___

[issue27129] Wordcode, part 2

2021-03-29 Thread Mark Shannon
Mark Shannon added the comment: frame.f_lasti and traceback.tb_lasti are best left as byte offsets. There is no guarantee that we won't go back to variable length instructions. For example, a "LONG_JUMP" instruction which is 4 bytes long and takes a 3 byte offset might well

[issue27129] Wordcode, part 2

2021-03-29 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23819 pull_request: https://github.com/python/cpython/pull/25069 ___ Python tracker <https://bugs.python.org/issue27

[issue43682] Make function wrapped by staticmethod callable

2021-03-31 Thread Mark Shannon
Mark Shannon added the comment: I don't understand what the problem is. _pyio.open is a function not a static method. >>> import _pyio >>> _pyio.open -- nosy: +Mark.Shannon title: Make static methods created by @staticmethod callable -> Make functio

[issue43682] Make static methods created by @staticmethod callable

2021-03-31 Thread Mark Shannon
Mark Shannon added the comment: Isn't the problem that Python functions are (non-overriding) descriptors, but builtin-functions are not descriptors? Changing static methods is not going to fix that. How about adding wrappers to make Python functions behave like builtin functions and

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-03-31 Thread Mark Shannon
New submission from Mark Shannon : Every time we send, or throw, to a generator, the C code in genobject.c needs to check what state the generator is in. This is inefficient and couples the generator code, which should just be a thin wrapper around the interpreter, to the internals of the

[issue42823] Incorrect frame.f_lineno when frame.f_trace is set

2021-03-31 Thread Mark Shannon
Mark Shannon added the comment: Ned, can I close this? -- ___ Python tracker <https://bugs.python.org/issue42823> ___ ___ Python-bugs-list mailing list Unsub

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-03-31 Thread Mark Shannon
Change by Mark Shannon : -- assignee: -> Mark.Shannon stage: -> needs patch type: -> performance ___ Python tracker <https://bugs.python.or

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2021-03-31 Thread Mark Shannon
Mark Shannon added the comment: The bytecode instruction set has changed a lot since 3.6, so I think a backport would be impractical. 3.6 is in security fix only mode, so you'd need to take this up with Red Hat. -- ___ Python tracker &

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-04-01 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +23884 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25137 ___ Python tracker <https://bugs.python.org/issu

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-04-01 Thread Mark Shannon
New submission from Mark Shannon : In the interpreter and compiler, the "fast" locals array and cells array are treated separately. By merging them in the compiler, the interpreter can be simplified a bit. -- assignee: Mark.Shannon components: Interpreter Core messages: 3

[issue27129] Wordcode, part 2

2021-04-01 Thread Mark Shannon
Mark Shannon added the comment: New changeset fcb55c0037baab6f98f91ee38ce84b6f874f034a by Mark Shannon in branch 'master': bpo-27129: Use instruction offsets, not byte offsets, in bytecode and internally. (GH-25069) https://github.com/python/cpyt

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-04-01 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23885 pull_request: https://github.com/python/cpython/pull/25138 ___ Python tracker <https://bugs.python.org/issue43

[issue27129] Wordcode, part 2

2021-04-01 Thread Mark Shannon
Mark Shannon added the comment: That assertion is correct, and hasn't changed. Do you have a traceback? The buildbot just shows the assertion message with no context. -- ___ Python tracker <https://bugs.python.org/is

[issue43693] Logically merge cell and locals array. They are already contiguous in memory

2021-04-02 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +23899 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25152 ___ Python tracker <https://bugs.python.org/issu

[issue43710] Access violations in C extension modules on Python 3.9.3

2021-04-03 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +23907 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25160 ___ Python tracker <https://bugs.python.org/issu

[issue27129] Wordcode, part 2

2021-04-04 Thread Mark Shannon
Mark Shannon added the comment: New changeset c368ce74d2c9bcbf1ec320466819c2d4768252f7 by Dennis Sweeney in branch 'master': bpo-27129: Update magic numbers and bootstrapping for GH-25069 (GH-25172) https://github.com/python/cpython/commit/c368ce74d2c9bcbf1ec320466819c2

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-04-06 Thread Mark Shannon
Mark Shannon added the comment: New changeset b37181e69209746adc2119c471599a1ea5faa6c8 by Mark Shannon in branch 'master': bpo-43683: Handle generator entry in bytecode (GH-25138) https://github.com/python/cpython/commit/b37181e69209746adc2119c471599a

[issue43683] Handle generator (and coroutine) state in the bytecode.

2021-04-06 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +23961 pull_request: https://github.com/python/cpython/pull/25224 ___ Python tracker <https://bugs.python.org/issue43

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-04-07 Thread Mark Shannon
Mark Shannon added the comment: For any sane design of tagged pointers, `x == y` (in C) will work fine. `is` is not well defined except for a small set of values, so the docs for `Py_Is` would have to so vague as to be worthless, IMO. -- nosy: +Mark.Shannon

[issue40228] Make setting line number in frame more robust.

2021-04-07 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue40228> ___ ___ Python-bugs-list

[issue39537] Change line number table format

2021-04-07 Thread Mark Shannon
Mark Shannon added the comment: PEP 626 fixed this -- ___ Python tracker <https://bugs.python.org/issue39537> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39537] Change line number table format

2021-04-07 Thread Mark Shannon
Change by Mark Shannon : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-04-07 Thread Mark Shannon
New submission from Mark Shannon : The DISPATCH() macro has two failings. 1. Its check for tracing involves too much pointer chaser. 2. The logic assumes that computed-gotos is the "fast path" which makes switch dispatch, and therefore Python on Windows unnecess

[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-04-07 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +23984 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25244 ___ Python tracker <https://bugs.python.org/issu

[issue43495] Missing frame block push in compiler_async_comprehension_generator()

2021-04-07 Thread Mark Shannon
Mark Shannon added the comment: New changeset 7a7ba3d343d360a03a34bc3901628f9f40a58307 by tomKPZ in branch 'master': bpo-43495 : Push missing frame block in compile.c (GH-24865) https://github.com/python/cpython/commit/7a7ba3d343d360a03a34bc3901628f9f40a58307 -- nosy: +Ma

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-04-07 Thread Mark Shannon
Mark Shannon added the comment: I implemented it ages ago :) https://github.com/python/cpython/pull/24417 I need to be better at closing issues. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Pytho

[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-04-08 Thread Mark Shannon
Mark Shannon added the comment: New changeset 28d28e053db6b69d91c2dfd579207cd8ccbc39e7 by Mark Shannon in branch 'master': bpo-43760: Streamline dispatch sequence for machines without computed gotos. (GH-25244) https://github.com/python/cpyt

[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-04-08 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +24013 pull_request: https://github.com/python/cpython/pull/25276 ___ Python tracker <https://bugs.python.org/issue43

[issue43682] Make static methods created by @staticmethod callable

2021-04-12 Thread Mark Shannon
Mark Shannon added the comment: This is a significant change to the language. There should be a PEP, or at the very least a discussion on Python Dev. There may well be a very good reason why static methods have not been made callable before that you have overlooked. Changing static methods

[issue43682] Make static methods created by @staticmethod callable

2021-04-12 Thread Mark Shannon
Mark Shannon added the comment: Are you asking why breaking backwards compatibility is an issue? Or how it breaks backwards compatibility? pydoc could be changed to produce the proposed output, it doesn't need this change. We don't know what this change will break, but we do know

[issue43760] The DISPATCH() macro is not as efficient as it could be.

2021-04-13 Thread Mark Shannon
Mark Shannon added the comment: New changeset 9e7b2076fb4380987ad0262c4c0ca900b06475ad by Mark Shannon in branch 'master': bpo-43760: Speed up check for tracing in interpreter dispatch (#25276) https://github.com/python/cpython/commit/9e7b2076fb4380987ad0262c4c0ca9

<    1   2   3   4   5   6   7   8   9   10   >