Skip to content
Merged
Changes from all commits
Commits
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
22 changes: 17 additions & 5 deletions test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
using SciMLTesting, FunctionProperties, JET, Test

# `hasbranching` is a compiler-introspection utility: it `code_typed`s `f` and scans the
# resulting IR for `Core.GotoIfNot` nodes, and builds the dispatch signature with
# `Core.Typeof`. Both names are internal to `Core` with no public equivalent
# (`typeof` differs from `Core.Typeof` on type-valued arguments, and `Base.typesof`
# is itself non-public), so these two accesses are ignored in the public-API checks.
# resulting typed IR for value-dependent branches, so it necessarily reaches into the
# `Core`/`Base` IR and inference internals, none of which have a public equivalent:
# - `GotoIfNot` (explicit import via `using Core: GotoIfNot`) is the conditional-branch IR node.
# - `CodeInfo`/`SSAValue`/`SlotNumber`/`Argument` are typed-IR node types scanned in the body.
# - `Const`/`PartialStruct` are inference lattice element types read off the IR.
# - `MethodInstance` is the resolved-call type used to recurse through static calls.
# - `Typeof` builds the dispatch signature (`typeof` differs from `Core.Typeof` on
# type-valued arguments, and `Base.typesof` is itself non-public).
# - `code_typed_by_type` is the non-public typed-IR entry point (`Base.code_typed_by_type`).
# All of these are Core/Base compiler-introspection internals with no public API, so they are
# ignored in the public-API checks.
run_qa(
FunctionProperties;
explicit_imports = true,
ei_kwargs = (;
all_explicit_imports_are_public = (; ignore = (:GotoIfNot,)),
all_qualified_accesses_are_public = (; ignore = (:Typeof,)),
all_qualified_accesses_are_public = (;
ignore = (
:Typeof, :Argument, :CodeInfo, :Const, :MethodInstance,
:PartialStruct, :SSAValue, :SlotNumber, :code_typed_by_type,
),
),
)
)
Loading