@@ -62,11 +62,6 @@ mutable struct InferenceState
6262    #  Inferred purity flags
6363    ipo_effects:: Effects 
6464
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- 
7065    #  The interpreter that created this inference state. Not looked at by
7166    #  NativeInterpreter. But other interpreters may use this to detect cycles
7267    interp:: AbstractInterpreter 
@@ -85,9 +80,9 @@ mutable struct InferenceState
8580        src. ssavaluetypes =  Any[ NOT_FOUND for  i =  1 : nssavalues ]
8681        stmt_info =  Any[ nothing  for  i =  1 : length (code) ]
8782
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  ]
9186
9287        #  initial types
9388        nslots =  length (src. slotflags)
@@ -129,19 +124,17 @@ mutable struct InferenceState
129124        @assert  cache ===  :no  ||  cache ===  :local  ||  cache ===  :global 
130125        frame =  new (
131126            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} (),
134129            src, get_world_counter (interp), valid_worlds,
135130            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=# #= pc´´=# 1 , nstmts, handler_at, ssavalue_uses,
132+             #= cycle_backedges=# Vector {Tuple{InferenceState,LineNum}} (),
133+             #= callers_in_cycle=# Vector {InferenceState} (),
140134            #= 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=# ===  :global ,
136+             #= inferred=# false , #= dont_work_on_me=# false ,
137+             #= ipo_effects=# Effects (consistent, ALWAYS_TRUE, ALWAYS_TRUE, ALWAYS_TRUE, inbounds_taints_consistency),
145138            interp)
146139        result. result =  frame
147140        cache != =  :no  &&  push! (get_inference_cache (interp), result)
@@ -267,8 +260,6 @@ function iterate(unw::InfStackUnwind, (infstate, cyclei)::Tuple{InferenceState,
267260    (infstate:: InferenceState , (infstate, cyclei))
268261end 
269262
270- method_table (interp:: AbstractInterpreter , sv:: InferenceState ) =  sv. method_table
271- 
272263function  InferenceState (result:: InferenceResult , cache:: Symbol , interp:: AbstractInterpreter )
273264    #  prepare an InferenceState object for inferring lambda
274265    src =  retrieve_code_info (result. linfo)
0 commit comments