From 7094ea495c039c0458680a443efc674626c31174 Mon Sep 17 00:00:00 2001 From: Tim Besard Date: Tue, 17 Sep 2024 13:51:19 +0200 Subject: [PATCH] Adapt to JuliaLang/julia#54816. --- .github/workflows/ci.yml | 13 +------------ src/utils.jl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a219716a..23521bd0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ jobs: llvm_args: [''] include: # starting with Julia 1.10, we can enable opaque pointers + # from Juila 1.12 on, this is the default. - version: '1.10' os: 'ubuntu-latest' arch: 'x64' @@ -48,18 +49,6 @@ jobs: os: 'windows-latest' arch: 'x64' llvm_args: '--opaque-pointers' - #- version: 'nightly' - # os: 'ubuntu-latest' - # arch: 'x64' - # llvm_args: '--opaque-pointers' - #- version: 'nightly' - # os: 'macOS-latest' - # arch: 'x64' - # llvm_args: '--opaque-pointers' - #- version: 'nightly' - # os: 'windows-latest' - # arch: 'x64' - # llvm_args: '--opaque-pointers' steps: - uses: actions/checkout@v4 diff --git a/src/utils.jl b/src/utils.jl index 6ad39bae..b71244f5 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -95,6 +95,12 @@ end # XXX: it's not allowed to switch tasks while under this lock, can we guarantee that? # its probably easier to start using our own LLVM context when that's possible. macro locked(ex) + # XXX: how does locking work after JuliaLang/julia#54816? + # do we have to call engine_reserve/engine_reject? + if VERSION >= v"1.12.0-DEV.769" + return esc(ex) + end + def = splitdef(ex) def[:body] = quote ccall(:jl_typeinf_lock_begin, Cvoid, ()) @@ -109,6 +115,12 @@ end # HACK: temporarily unlock again to perform a task switch macro unlocked(ex) + # XXX: how does locking work after JuliaLang/julia#54816? + # do we have to call engine_reserve/engine_reject? + if VERSION >= v"1.12.0-DEV.769" + return esc(ex) + end + def = splitdef(ex) def[:body] = quote ccall(:jl_typeinf_lock_end, Cvoid, ())