Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
327314a
Add Regions and Cowns
xFrednet Jul 17, 2025
2ba7e56
Regions: Write-barriers in bytecodes and better logging (#98)
xFrednet Apr 4, 2026
c823407
Regions: Write-barriers in bytecodes and better logging (2)
xFrednet Apr 28, 2026
300f9cf
Regions: Atomic RC for Cowns and freeze escape hatches on creation (#…
xFrednet May 6, 2026
9a3fe67
GC: Unify documentation of GC flags
kulisak12 Jan 29, 2026
dd31edc
GC: Remove outdated comment
kulisak12 Feb 2, 2026
fc4f3db
GC: Rename functions to not clash with regions
kulisak12 Feb 3, 2026
2a94c85
Regions GC: Add gc.collect_region
kulisak12 Feb 4, 2026
a8bbe0e
Regions GC: Implement basic GC for regions
kulisak12 Feb 5, 2026
620c21c
Regions GC: Unit tests
kulisak12 Feb 11, 2026
0bfb472
Regions GC: Cown switching
kulisak12 Feb 18, 2026
b646fe2
Regions GC: Accept an acquired cown or bridge
kulisak12 Apr 21, 2026
b1ef3c7
Regions GC: Deal with cleaning
kulisak12 Apr 22, 2026
4750a2b
Regions GC: Avoid recursion and traversal problems
kulisak12 Apr 24, 2026
7f1fdab
Regions GC: GIL release
kulisak12 Apr 24, 2026
a430c2c
Cowns: Simplify GC functions
kulisak12 May 4, 2026
80fe748
Regions GC: Scheduling on release
kulisak12 May 4, 2026
04243bb
Regions GC: Increase budget when moving an object
kulisak12 May 20, 2026
22db1e5
Regions GC: Write barriers
kulisak12 Jun 12, 2026
5452c8e
Regions: Add `is_owned` and `get_bridge` functions
xFrednet Jun 13, 2026
665bc9d
Regions: Correct write barriers in dict
xFrednet Jun 18, 2026
d541323
Regions GC: Changes after review
kulisak12 Jun 27, 2026
3632600
Merge pull request #105 from kulisak12/regions-gc
xFrednet Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 1 addition & 85 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,51 +151,11 @@ jobs:
run: make smelly
- name: Check limited ABI symbols
run: make check-limited-abi
continue-on-error: true
- name: Check for unsupported C global variables
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
run: make check-c-globals

build-windows:
name: >-
Windows
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
needs: build-context
if: fromJSON(needs.build-context.outputs.run-windows-tests)
strategy:
fail-fast: false
matrix:
arch:
- x64
- Win32
- arm64
free-threading:
- false
# TODO(Immutable): Enable free-threading build when it is made to work.
# - true
# exclude:
# # Skip Win32 on free-threaded builds
# - { arch: Win32, free-threading: true }
uses: ./.github/workflows/reusable-windows.yml
with:
arch: ${{ matrix.arch }}
free-threading: ${{ matrix.free-threading }}

build-windows-msi:
# ${{ '' } is a hack to nest jobs under the same sidebar category.
name: Windows MSI${{ '' }} # zizmor: ignore[obfuscation]
needs: build-context
if: fromJSON(needs.build-context.outputs.run-windows-msi)
strategy:
fail-fast: false
matrix:
arch:
- x86
- x64
- arm64
uses: ./.github/workflows/reusable-windows-msi.yml
with:
arch: ${{ matrix.arch }}

build-macos:
name: >-
macOS
Expand Down Expand Up @@ -397,36 +357,6 @@ jobs:
- name: SSL tests
run: ./python Lib/test/ssltests.py

build-android:
name: Android (${{ matrix.arch }})
needs: build-context
if: needs.build-context.outputs.run-tests == 'true'
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64
runs-on: macos-14
- arch: x86_64
runs-on: ubuntu-24.04

runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build and test
run: ./Android/android.py ci --fast-ci ${{ matrix.arch }}-linux-android

build-wasi:
name: 'WASI'
needs: build-context
if: needs.build-context.outputs.run-tests == 'true'
uses: ./.github/workflows/reusable-wasi.yml
with:
config_hash: ${{ needs.build-context.outputs.config-hash }}

test-hypothesis:
name: "Hypothesis tests on Ubuntu"
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -722,14 +652,10 @@ jobs:
- check-docs
- check-autoconf-regen
- check-generated-files
- build-windows
- build-windows-msi
- build-macos
- build-ubuntu
- build-ubuntu-ssltests-awslc
- build-ubuntu-ssltests-openssl
- build-android
- build-wasi
- test-hypothesis
- build-asan
- build-san
Expand All @@ -742,7 +668,6 @@ jobs:
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
allowed-failures: >-
build-windows-msi,
build-ubuntu-ssltests-awslc,
build-ubuntu-ssltests-openssl,
test-hypothesis,
Expand All @@ -764,22 +689,13 @@ jobs:
build-ubuntu,
build-ubuntu-ssltests-awslc,
build-ubuntu-ssltests-openssl,
build-android,
build-wasi,
test-hypothesis,
build-asan,
build-san,
cross-build-linux,
'
|| ''
}}
${{
!fromJSON(needs.build-context.outputs.run-windows-tests)
&& '
build-windows,
'
|| ''
}}
${{
!fromJSON(needs.build-context.outputs.run-ci-fuzz)
&& '
Expand Down
84 changes: 0 additions & 84 deletions .github/workflows/reusable-wasi.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/reusable-windows-msi.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/reusable-windows.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/tail-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
target:
# Un-comment as we add support for more platforms for tail-calling interpreters.
# - i686-pc-windows-msvc/msvc
- x86_64-pc-windows-msvc/msvc
# - x86_64-pc-windows-msvc/msvc
# - aarch64-pc-windows-msvc/msvc
- x86_64-apple-darwin/clang
- aarch64-apple-darwin/clang
Expand All @@ -50,9 +50,9 @@ jobs:
# - target: i686-pc-windows-msvc/msvc
# architecture: Win32
# runner: windows-2022
- target: x86_64-pc-windows-msvc/msvc
architecture: x64
runner: windows-2022
# - target: x86_64-pc-windows-msvc/msvc
# architecture: x64
# runner: windows-2022
# - target: aarch64-pc-windows-msvc/msvc
# architecture: ARM64
# runner: windows-2022
Expand Down
1 change: 1 addition & 0 deletions Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ __pragma(warning(disable: 4201))
#include "cpython/pyfpe.h"
#include "cpython/tracemalloc.h"
#include "immutability.h"
#include "region.h"

#ifdef _MSC_VER
__pragma(warning(pop)) // warning(disable: 4201)
Expand Down
8 changes: 8 additions & 0 deletions Include/cpython/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,14 @@ struct _typeobject {

/* A callback called before a type is frozen. */
prefreezeproc tp_prefreeze;

/* FIXME(regions): xFrednet: Just adding this field at the end will not
* fly on the main branch. We either want another indicator or proper
* integration, potentially using a union to support the old 32 bit
* `tp_flags` and the extended 64 bit ones. For now let's bikeshed this
* task and just use a new 32bit flag field appended here.
*/
uint32_t tp_flags2;
};

#define _Py_ATTR_CACHE_UNUSED (30000) // (see tp_versions_used)
Expand Down
2 changes: 2 additions & 0 deletions Include/cpython/tupleobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# error "this header file must not be included directly"
#endif

#include "region.h"

typedef struct {
PyObject_VAR_HEAD
/* Cached hash. Initially set to -1. */
Expand Down
Loading
Loading