409
409
CC. nsplit_impl (info:: NoinlineCallInfo ) = CC. nsplit (info. info)
410
410
CC. getsplit_impl (info:: NoinlineCallInfo , idx:: Int ) = CC. getsplit (info. info, idx)
411
411
CC. getresult_impl (info:: NoinlineCallInfo , idx:: Int ) = CC. getresult (info. info, idx)
412
+ CC. add_uncovered_edges_impl (edges:: Vector{Any} , info:: NoinlineCallInfo , @nospecialize (atype)) = CC. add_uncovered_edges! (edges, info. info, atype)
412
413
413
414
function CC. abstract_call (interp:: NoinlineInterpreter ,
414
415
arginfo:: CC.ArgInfo , si:: CC.StmtInfo , sv:: CC.InferenceState , max_methods:: Int )
431
432
@inline function inlined_usually (x, y, z)
432
433
return x * y + z
433
434
end
435
+ foo_split (x:: Float64 ) = 1
436
+ foo_split (x:: Int ) = 2
434
437
435
438
# check if the inlining algorithm works as expected
436
439
let src = code_typed1 ((Float64,Float64,Float64)) do x, y, z
@@ -444,6 +447,7 @@ let NoinlineModule = Module()
444
447
main_func (x, y, z) = inlined_usually (x, y, z)
445
448
@eval NoinlineModule noinline_func (x, y, z) = $ inlined_usually (x, y, z)
446
449
@eval OtherModule other_func (x, y, z) = $ inlined_usually (x, y, z)
450
+ @eval NoinlineModule bar_split_error () = $ foo_split (Core. compilerbarrier (:type , nothing ))
447
451
448
452
interp = NoinlineInterpreter (Set ((NoinlineModule,)))
449
453
@@ -473,6 +477,11 @@ let NoinlineModule = Module()
473
477
@test count (isinvoke (:inlined_usually ), src. code) == 0
474
478
@test count (iscall ((src, inlined_usually)), src. code) == 0
475
479
end
480
+
481
+ let src = code_typed1 (NoinlineModule. bar_split_error)
482
+ @test count (iscall ((src, foo_split)), src. code) == 0
483
+ @test count (iscall ((src, Core. throw_methoderror)), src. code) > 0
484
+ end
476
485
end
477
486
478
487
# Make sure that Core.Compiler has enough NamedTuple infrastructure
0 commit comments