@@ -12,14 +12,17 @@ function bootstrap!()
12
12
println (" Compiling the compiler. This may take several minutes ..." )
13
13
interp = NativeInterpreter ()
14
14
15
- # analyze_escapes_tt = Tuple{typeof(analyze_escapes ), IRCode, Int, TODO }
15
+ ssa_inlining_pass!_tt = Tuple{typeof (ssa_inlining_pass! ), IRCode, InliningState{NativeInterpreter}, Bool }
16
16
optimize_tt = Tuple{typeof (optimize), NativeInterpreter, OptimizationState{NativeInterpreter}, InferenceResult}
17
+ typeinf_ext_tt = Tuple{typeof (typeinf_ext), NativeInterpreter, MethodInstance, UInt8}
18
+ typeinf_tt = Tuple{typeof (typeinf), NativeInterpreter, InferenceState}
19
+ typeinf_edge_tt = Tuple{typeof (typeinf_edge), NativeInterpreter, Method, Any, SimpleVector, InferenceState, Bool, Bool}
17
20
fs = Any[
18
21
# we first create caches for the optimizer, because they contain many loop constructions
19
22
# and they're better to not run in interpreter even during bootstrapping
20
- #= analyze_escapes_tt, =# optimize_tt,
23
+ compact!, ssa_inlining_pass!_tt, optimize_tt,
21
24
# then we create caches for inference entries
22
- typeinf_ext, typeinf, typeinf_edge ,
25
+ typeinf_ext_tt, typeinf_tt, typeinf_edge_tt ,
23
26
]
24
27
# tfuncs can't be inferred from the inference entries above, so here we infer them manually
25
28
for x in T_FFUNC_VAL
@@ -40,14 +43,19 @@ function bootstrap!()
40
43
else
41
44
tt = Tuple{typeof (f), Vararg{Any}}
42
45
end
43
- for m in _methods_by_ftype (tt, 10 , get_world_counter ()):: Vector
44
- # remove any TypeVars from the intersection
45
- m = m:: MethodMatch
46
- typ = Any[m. spec_types. parameters... ]
47
- for i = 1 : length (typ)
48
- typ[i] = unwraptv (typ[i])
46
+ matches = _methods_by_ftype (tt, 10 , get_world_counter ()):: Vector
47
+ if isempty (matches)
48
+ println (stderr , " WARNING: no matching method found for `" , tt, " `" )
49
+ else
50
+ for m in matches
51
+ # remove any TypeVars from the intersection
52
+ m = m:: MethodMatch
53
+ params = Any[m. spec_types. parameters... ]
54
+ for i = 1 : length (params)
55
+ params[i] = unwraptv (params[i])
56
+ end
57
+ typeinf_type (interp, m. method, Tuple{params... }, m. sparams)
49
58
end
50
- typeinf_type (interp, m. method, Tuple{typ... }, m. sparams)
51
59
end
52
60
end
53
61
endtime = time ()
0 commit comments