@@ -6,7 +6,7 @@ struct ADCursor <: Cthulhu.AbstractCursor
6
6
mi:: MethodInstance
7
7
transformed:: Bool
8
8
end
9
- Cthulhu. get_mi (c:: ADCursor ) = c. mi
9
+ # Cthulhu.get_mi(c::ADCursor) = c.mi
10
10
ADCursor (level:: Int , mi:: MethodInstance ) = ADCursor (level, mi, false )
11
11
12
12
#=
@@ -80,12 +80,13 @@ lower_level(interp::ADInterpreter) = change_level(interp, interp.current_level -
80
80
81
81
disable_forward (interp:: ADInterpreter ) = ADInterpreter (interp; forward= false )
82
82
83
+ #=
83
84
function Cthulhu.get_optimized_codeinst(interp::ADInterpreter, curs::ADCursor)
84
85
@show curs
85
86
(curs.transformed ? interp.transformed : interp.opt)[curs.level][curs.mi]
86
87
end
87
88
Cthulhu.AbstractCursor(interp::ADInterpreter, mi::MethodInstance) = ADCursor(0, mi, false)
88
-
89
+ =#
89
90
90
91
# This is a lie, but let's clean this up later
91
92
Cthulhu. can_descend (interp:: ADInterpreter , @nospecialize (key), optimize:: Bool ) = true
@@ -163,6 +164,7 @@ function CC.is_same_frame(interp::ADInterpreter, linfo::MethodInstance, frame::I
163
164
end
164
165
165
166
# Special handling for Recursion
167
+ #=
166
168
struct RecurseCallInfo <: Cthulhu.CallInfo
167
169
vmi::Cthulhu.CallInfo # callinfo to be descended
168
170
end
@@ -209,6 +211,7 @@ function Cthulhu.navigate(curs::ADCursor, callsite::Cthulhu.Callsite)
209
211
end
210
212
return ADCursor(curs.level, Cthulhu.get_mi(callsite))
211
213
end
214
+ =#
212
215
213
216
function Cthulhu. process_info (interp:: ADInterpreter , @nospecialize (info:: CC.CallInfo ), argtypes:: Cthulhu.ArgTypes , @nospecialize (rt), optimize:: Bool , @nospecialize (exct))
214
217
if isa (info, RecurseInfo)
@@ -271,7 +274,7 @@ function CC.add_remark!(interp::ADInterpreter, sv::InferenceState, msg)
271
274
end
272
275
273
276
# TODO : `get_remarks` should get a cursor?
274
- Cthulhu. get_remarks (interp:: ADInterpreter , key:: Union{MethodInstance,InferenceResult} ) = get (interp. remarks[interp. current_level], key, nothing )
277
+ # Cthulhu.get_remarks(interp::ADInterpreter, key::Union{MethodInstance,InferenceResult}) = get(interp.remarks[interp.current_level], key, nothing)
275
278
276
279
@static if VERSION ≥ v " 1.13.0-DEV.126"
277
280
function diffractor_finish (@specialize (finishfunc), state:: InferenceState , interp:: ADInterpreter , cycleid:: Int )
0 commit comments