Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inference: update VALID_EXPR_HEADS #54789

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions base/compiler/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const VALID_EXPR_HEADS = IdDict{Symbol,UnitRange{Int}}(
:new => 1:typemax(Int),
:splatnew => 2:2,
:the_exception => 0:0,
:enter => 1:2,
:leave => 1:typemax(Int),
:pop_exception => 1:1,
:inbounds => 1:1,
Expand All @@ -38,6 +37,7 @@ const VALID_EXPR_HEADS = IdDict{Symbol,UnitRange{Int}}(
:import => 1:typemax(Int),
:using => 1:typemax(Int),
:export => 1:typemax(Int),
:public => 1:typemax(Int),
)

# @enum isn't defined yet, otherwise I'd use it for this
Expand Down Expand Up @@ -147,7 +147,7 @@ function validate_code!(errors::Vector{InvalidCodeError}, c::CodeInfo, is_top_le
elseif head === :call || head === :invoke || x.head === :invoke_modify ||
head === :gc_preserve_end || head === :meta ||
head === :inbounds || head === :foreigncall || head === :cfunction ||
head === :const || head === :enter || head === :leave || head === :pop_exception ||
head === :const || head === :leave || head === :pop_exception ||
head === :method || head === :global || head === :static_parameter ||
head === :new || head === :splatnew || head === :thunk || head === :loopinfo ||
head === :throw_undef_if_not || head === :code_coverage_effect || head === :inline || head === :noinline
Expand Down
2 changes: 1 addition & 1 deletion test/compiler/ssair.jl
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ let

# this isn't valid code, we just care about looking at a variety of IR nodes
body = Any[
Expr(:enter, 11),
EnterNode(11),
Expr(:call, :+, SSAValue(3), 1),
Expr(:throw_undef_if_not, :expected, false),
Expr(:leave, Core.SSAValue(1)),
Expand Down