@@ -62,11 +62,6 @@ mutable struct InferenceState
62
62
# Inferred purity flags
63
63
ipo_effects:: Effects
64
64
65
- # The place to look up methods while working on this function.
66
- # In particular, we cache method lookup results for the same function to
67
- # fast path repeated queries.
68
- method_table:: InternalMethodTable
69
-
70
65
# The interpreter that created this inference state. Not looked at by
71
66
# NativeInterpreter. But other interpreters may use this to detect cycles
72
67
interp:: AbstractInterpreter
@@ -85,9 +80,9 @@ mutable struct InferenceState
85
80
src. ssavaluetypes = Any[ NOT_FOUND for i = 1 : nssavalues ]
86
81
stmt_info = Any[ nothing for i = 1 : length (code) ]
87
82
88
- n = length (code)
89
- s_types = Union{Nothing, VarTable}[ nothing for i = 1 : n ]
90
- s_edges = Union{Nothing, Vector{Any}}[ nothing for i = 1 : n ]
83
+ nstmts = length (code)
84
+ s_types = Union{Nothing, VarTable}[ nothing for i = 1 : nstmts ]
85
+ s_edges = Union{Nothing, Vector{Any}}[ nothing for i = 1 : nstmts ]
91
86
92
87
# initial types
93
88
nslots = length (src. slotflags)
@@ -129,19 +124,17 @@ mutable struct InferenceState
129
124
@assert cache === :no || cache === :local || cache === :global
130
125
frame = new (
131
126
params, result, linfo,
132
- sp, slottypes, mod, 0 ,
133
- IdSet {InferenceState} (), IdSet {InferenceState} (),
127
+ sp, slottypes, mod, #= currpc =# 0 ,
128
+ #= pclimitations =# IdSet {InferenceState} (), #= limitations =# IdSet {InferenceState} (),
134
129
src, get_world_counter (interp), valid_worlds,
135
130
nargs, s_types, s_edges, stmt_info,
136
- Union{}, ip, 1 , n, handler_at,
137
- ssavalue_uses,
138
- Vector {Tuple{InferenceState,LineNum}} (), # cycle_backedges
139
- Vector {InferenceState} (), # callers_in_cycle
131
+ #= bestguess=# Union{}, ip, #= pc´´=# 1 , nstmts, handler_at, ssavalue_uses,
132
+ #= cycle_backedges=# Vector {Tuple{InferenceState,LineNum}} (),
133
+ #= callers_in_cycle=# Vector {InferenceState} (),
140
134
#= parent=# nothing ,
141
- cache === :global , false , false ,
142
- Effects (consistent, ALWAYS_TRUE, ALWAYS_TRUE, ALWAYS_TRUE,
143
- inbounds_taints_consistency),
144
- method_table (interp),
135
+ #= cached=# cache === :global ,
136
+ #= inferred=# false , #= dont_work_on_me=# false ,
137
+ #= ipo_effects=# Effects (consistent, ALWAYS_TRUE, ALWAYS_TRUE, ALWAYS_TRUE, inbounds_taints_consistency),
145
138
interp)
146
139
result. result = frame
147
140
cache != = :no && push! (get_inference_cache (interp), result)
@@ -267,8 +260,6 @@ function iterate(unw::InfStackUnwind, (infstate, cyclei)::Tuple{InferenceState,
267
260
(infstate:: InferenceState , (infstate, cyclei))
268
261
end
269
262
270
- method_table (interp:: AbstractInterpreter , sv:: InferenceState ) = sv. method_table
271
-
272
263
function InferenceState (result:: InferenceResult , cache:: Symbol , interp:: AbstractInterpreter )
273
264
# prepare an InferenceState object for inferring lambda
274
265
src = retrieve_code_info (result. linfo)
0 commit comments