Skip to content

Commit 1470614

Browse files
committed
Fix is_defined_and_owned_global (bpart changes)
Adapt to Core.Binding changes in JuliaLang/julia#54788. Also remove `is_defined_nothrow_global` (JuliaLang/julia#56746)
1 parent 59816f5 commit 1470614

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/runtime.jl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -370,18 +370,7 @@ end
370370
#
371371
# (This should do what fl_defined_julia_global does for flisp lowering)
372372
function is_defined_and_owned_global(mod, name)
373-
b = _get_module_binding(mod, name)
374-
!isnothing(b) && isdefined(b, :owner) && b.owner === b
375-
end
376-
377-
# Return true if `name` is defined in `mod`, the sense that accessing it is nothrow.
378-
# Has no side effects, unlike isdefined()
379-
#
380-
# (This should do what fl_nothrow_julia_global does for flisp lowering)
381-
function is_defined_nothrow_global(mod, name)
382-
b = _get_module_binding(mod, name)
383-
!isnothing(b) && isdefined(b, :owner) || return false
384-
isdefined(b.owner, :value)
373+
Base.binding_kind(mod, name) === Base.PARTITION_KIND_GLOBAL
385374
end
386375

387376
# "Reserve" a binding: create the binding if it doesn't exist but do not assign

0 commit comments

Comments
 (0)