Skip to content

bpo-29524: Add Objects/call.c file#12

Merged
vstinner merged 1 commit intopython:masterfrom
vstinner:call_file
Feb 12, 2017
Merged

bpo-29524: Add Objects/call.c file#12
vstinner merged 1 commit intopython:masterfrom
vstinner:call_file

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Feb 11, 2017

  • Move all functions to call objects in a new Objects/call.c file.
  • Rename fast_function() to _PyFunction_FastCallKeywords().
  • Copy null_error() from Objects/abstract.c
  • Inline type_error() in call.c to not have to copy it, it was only called once.
  • Export _PyEval_EvalCodeWithName() since it is now called from call.c.

http://bugs.python.org/issue29524

* Move all functions to call objects in a new Objects/call.c file.
* Rename fast_function() to _PyFunction_FastCallKeywords().
* Copy null_error() from Objects/abstract.c
* Inline type_error() in call.c to not have to copy it, it was only
  called once.
* Export _PyEval_EvalCodeWithName() since it is now called
  from call.c.
@vstinner vstinner added the performance Performance or resource usage label Feb 11, 2017
Comment thread Python/ceval.c
inlines the most primitive frame setup code from
PyEval_EvalCodeEx(), which vastly reduces the checks that must be
done before evaluating the frame.
*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment block should be moved to function_code_fastcall().

@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented Feb 11, 2017 via email

Copy link
Copy Markdown
Member

@methane methane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just checked all code is moved as-is.
I agree the comment block is not so important.

@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented Feb 12, 2017 via email

@vstinner vstinner merged commit c22bfaa into python:master Feb 12, 2017
@vstinner vstinner deleted the call_file branch June 15, 2017 23:02
@jdemeyer
Copy link
Copy Markdown
Contributor

Follow-up at #7909

paulmon added a commit to paulmon/cpython that referenced this pull request Jan 10, 2019
Windows arm32 - fix failing tests or skip
emmatyping referenced this pull request in emmatyping/cpython Mar 16, 2020
isidentical referenced this pull request in isidentical/cpython Jun 29, 2021
* Handle lines with multi-byte unicode characters properly

* Use Py_XDECREF instead of Py_DECREF

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
jaraco pushed a commit that referenced this pull request Dec 2, 2022
kumaraditya303 pushed a commit that referenced this pull request Oct 14, 2024
…cycles (#12… (#125476)

Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#124959)"

This reverts commit d5dbbf4.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 14, 2024
…PyFuture refcycles (pythonGH-12… (pythonGH-125476)

Revert "pythongh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (pythonGH-124959)"

This reverts commit d5dbbf4.
(cherry picked from commit e99650b)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
1st1 pushed a commit that referenced this pull request Oct 14, 2024
…p and _PyFuture refcycles ... (#125486)

* Revert "gh-125472: Revert "gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#12… (#125476)"

This reverts commit e99650b.

* fix incompatability with gh-124392
dg-pb pushed a commit to dg-pb/cpython that referenced this pull request Oct 21, 2025
Eclips4 added a commit to Eclips4/cpython that referenced this pull request Nov 16, 2025
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 24, 2026
…DE.md

Bundle of two theologian-authored doc amendments per supervisor
dispositions:

CLAUDE.md (+2L) — Pre-Edit WT Integrity 'undiagnosed-recurring'
honest framing per pythia python#105 (3) + supervisor 02:13:12Z + theologian
02:13:54Z. Acknowledges 5+ prior incidents closed at SYMPTOM layer
without root-cause attribution; this 4-step discipline codifies
reactive HALT, not automated detection. Detection still depends on
agent noticing mid-edit. Recurrence-prevention claim does not exceed
what text mechanizes; automated detection feasibility (file-watcher /
git-hook) is fixup PIR territory and remains open.

docs/tier8-class-b-cport-migrate-arm-spec.md (+93/-20) — pythia python#104
amendments per theologian 01:38:08Z + supervisor 01:38:26Z + 01:37:05Z:
  §1.1 container-shape transferability caveat (vector-pilot ≠ hash/
       stack/allocator-shape pattern transferability)
  §5 python#11 NEW: bridge-count-delta acceptance (each pilot must NET-
       SUBTRACT bridges OR honestly add with W45 fixture coverage)
  §5 python#12 NEW: Phase B FORCING-FUNCTION (Tier 8 SECOND-PILOT block_map_
       Step A BLOCKED until exception_table_ Phase B commit lands)

Bundle scope: doc-only, no §3.5 BUILD MODE (no builder*.{cpp,h,c}
touched). Atomic per supervisor 02:13:12Z + 01:38:26Z dispositions.

Push 28 advances the Tier 8 Phase A resume deadline tracker per
theologian 02:13:54Z + supervisor 02:13:12Z (push 28 OR session-end
whichever first). If Alex disposition + fixup PIR not received by
deadline, theologian amends Phase 3 closure summary fa8dfef to
remove Tier 8 pilot citation + re-opens pythia python#103 escape question.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 24, 2026
Per Tier 8 spec §5 python#5 + theologian 04:48:17Z + supervisor 04:48:47Z.
Completes the exception_table_ pilot started in Phase A (6945b96)
by deleting the transient C++ compatibility layer.

DELETED:
  HIRBuilder::parseExceptionTable shim (builder.cpp:1243-1245 area
    + builder.h decl)
  HIRBuilder::findExceptionHandler shim (builder.cpp:1247-1258 area
    + builder.h decl)

REWIRED:
  builder.cpp:1197 (translate setup) → inline call
    hir_builder_state_parse_exception_table_c(&state_, this)
  builder.cpp:2865 (emit_call_method_exception_handler_inline_c) →
    inline call hir_builder_state_find_exception_handler_c +
    phx_exception_table_at conversion preserves caller-contract

HIRBuilder no longer has any accessor methods for exception_table_phx;
all access via bridges (parse_exception_table_c +
find_exception_handler_c + phx_exception_table_at). §5 python#5 acceptance
criterion fully satisfied. ZERO new bridges (uses existing C bodies
+ inline phx_exception_table_at helper).

Numstat (vs HEAD f33bde6):
  Python/jit/hir/builder.cpp +22 -27  (-5 NET)
  Python/jit/hir/builder.h   +5  -10  (-5 NET)
TOTAL: NET -10L, bridge-count delta 0, fixture delta 0.

Per Tier 8 spec §5 python#11 acceptance: ZERO bridge additions ✓.
Per Tier 8 spec §5 python#12 forcing-function: this commit IS the Phase B
landing; block_map_ Phase A Step A NOW UNBLOCKED for next session.

EXPANDED PRE-COMMIT GATE per supervisor 01:17:23Z (testkeeper
04:57:42Z):
  Stage 1 compile: BUILD_EXIT=0
  Stage 2 §3.5 BUILD MODE: 4/4 PASS, post-restore clean, staged
    content INTACT (§3.5 fix b83f084 VINDICATED — cpp/h mtimes
    identical pre/post all 3 stages)
  Stage 3 per-bench gate: GEO 1.26x, all 4 floor criteria PASS
    (worst single-bench gen_simple 0.70x > 0.5x absolute floor)

Phase 3 + Tier 8 (Phase A + B) cumulative: +257 + 37 - 10 = +284L.
exception_table_ pilot COMPLETE — first Class B container fully
migrated to pure-C with no C++-side accessor residue.

Authorization: theologian 04:48:17Z cross-check + supervisor
04:48:47Z Step B GO + librarian 04:51:37Z broader sister-script
audit CLEAN.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 24, 2026
Closes pythia python#119 (a) PhxBlockMap hash-clustering coverage gap deferred
from Phase A push 39 (theologian 11:20:24Z + supervisor 11:20:43Z DEFER:
separate from Phase B for clean revert boundary; sequence-isolated per
shepard 11:11:59Z).

Gap: the previous block_map_resize_chain (10 if-return arms,
~25 block_starts) trips PhxBlockMap_resize at insert python#12 but does not
exercise the 5 sequential resizes (16->32->64->128->256->512) that
re._parser:Tokenizer.__next at 294 blocks drives in production
(D2 measurement 2026-04-24).

Fix: add block_map_n294_chain — 110-arm if-return chain (~330 block_starts)
generated via exec to keep the source compact. force_compile must succeed
across n=0/54/109/200 (3 in-range hits + 1 default-arm miss); proves
Knuth multiplicative h=key*2654435761u clusters acceptably at production-
scale BCOffset density.

NO production code change. Pure test/fixture extension. Pre-commit
discipline satisfied via testkeeper bash -n syntax lint + diff-scope
confirmation (testkeeper 11:33:43Z): no C/C++ source touched, Phase B
binary 4145fe3 remains current.

Auth chain: theologian patch-shape APPROVE 11:33:03Z; testkeeper pre-
commit lint PASS 11:33:43Z.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance or resource usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants