@@ -23,7 +23,8 @@ struct OptimizedSource
23
23
end
24
24
25
25
const InferenceKey = Union{MethodInstance,InferenceResult}
26
- const InferenceDict{T} = Dict{InferenceKey, T}
26
+ const InferenceDict{T} = IdDict{InferenceKey, T}
27
+ const OptimizationDict = IdDict{MethodInstance, CodeInstance}
27
28
const PC2Remarks = Vector{Pair{Int, String}}
28
29
const PC2Effects = Dict{Int, Effects}
29
30
const PC2Excts = Dict{Int, Any}
@@ -32,7 +33,7 @@ struct CthulhuInterpreter <: AbstractInterpreter
32
33
native:: AbstractInterpreter
33
34
34
35
unopt:: InferenceDict{InferredSource}
35
- opt:: Dict{MethodInstance, CodeInstance}
36
+ opt:: OptimizationDict
36
37
37
38
remarks:: InferenceDict{PC2Remarks}
38
39
effects:: InferenceDict{PC2Effects}
@@ -43,7 +44,7 @@ function CthulhuInterpreter(interp::AbstractInterpreter=NativeInterpreter())
43
44
return CthulhuInterpreter (
44
45
interp,
45
46
InferenceDict {InferredSource} (),
46
- Dict {MethodInstance, CodeInstance} (),
47
+ OptimizationDict (),
47
48
InferenceDict {PC2Remarks} (),
48
49
InferenceDict {PC2Effects} (),
49
50
InferenceDict {PC2Excts} ())
@@ -69,7 +70,7 @@ CC.lock_mi_inference(interp::CthulhuInterpreter, mi::MethodInstance) = nothing
69
70
CC. unlock_mi_inference (interp:: CthulhuInterpreter , mi:: MethodInstance ) = nothing
70
71
CC. method_table (interp:: CthulhuInterpreter ) = method_table (interp. native)
71
72
struct CthulhuCache
72
- cache:: Dict{MethodInstance, CodeInstance}
73
+ cache:: OptimizationDict
73
74
end
74
75
75
76
CC. code_cache (interp:: CthulhuInterpreter ) = WorldView (CthulhuCache (interp. opt), WorldRange (get_world_counter (interp)))
0 commit comments