Skip to content

Commit

Permalink
inference: minor typing improvements for InferenceState.stmt_types (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk authored Jan 6, 2021
1 parent ed89ae7 commit 5c6e21e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState)
frame.cur_hand = Pair{Any,Any}(l, frame.cur_hand)
# propagate type info to exception handler
old = s[l]
new = s[pc]::Array{Any,1}
new = s[pc]::VarTable
newstate_catch = stupdate!(old, new)
if newstate_catch !== false
if l < frame.pc´´
Expand Down
4 changes: 2 additions & 2 deletions base/compiler/inferencestate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ mutable struct InferenceState
world::UInt
valid_worlds::WorldRange
nargs::Int
stmt_types::Vector{Any}
stmt_types::Vector{Union{Nothing, Vector{Any}}} # ::Vector{Union{Nothing, VarTable}}
stmt_edges::Vector{Union{Nothing, Vector{Any}}}
stmt_info::Vector{Any}
# return type
Expand Down Expand Up @@ -67,7 +67,7 @@ mutable struct InferenceState

n = length(code)
s_edges = Union{Nothing, Vector{Any}}[ nothing for i = 1:n ]
s_types = Any[ nothing for i = 1:n ]
s_types = Union{Nothing, Vector{Any}}[ nothing for i = 1:n ]

# initial types
nslots = length(src.slotflags)
Expand Down
2 changes: 1 addition & 1 deletion base/compiler/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ function type_annotate!(sv::InferenceState)
src = sv.src
states = sv.stmt_types
nargs = sv.nargs
nslots = length(states[1]::Array{Any,1})
nslots = length(states[1]::VarTable)
undefs = fill(false, nslots)
body = src.code::Array{Any,1}
nexpr = length(body)
Expand Down

5 comments on commit 5c6e21e

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - successfully executed benchmarks. A full report can be found here. cc @christopher-dG

@vtjnash
Copy link
Member

@vtjnash vtjnash commented on 5c6e21e Jan 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without looking too closely, I think many of those failures may haven been fixed by #39133

Please sign in to comment.