@@ -1749,48 +1749,6 @@ f_ifelse_3(a, b) = Core.ifelse(a, true, b)
17491749@test fully_eliminated (f_ifelse_2, Tuple{Any, Any}; retval= Core. Argument (3 ))
17501750@test ! fully_eliminated (f_ifelse_3, Tuple{Any, Any})
17511751
1752- # inline_splatnew for abstract `NamedTuple`
1753- @eval construct_splatnew (T, fields) = $ (Expr (:splatnew , :T , :fields ))
1754- for tt = Any[(Int,Int), (Integer,Integer), (Any,Any)]
1755- let src = code_typed1 (tt) do a, b
1756- construct_splatnew (NamedTuple{(:a ,:b ),typeof ((a,b))}, (a,b))
1757- end
1758- @test count (issplatnew, src. code) == 0
1759- @test count (isnew, src. code) == 1
1760- end
1761- end
1762-
1763- # optimize away `NamedTuple`s used for handling `@nospecialize`d keyword-argument
1764- # https://github.com/JuliaLang/julia/pull/47059
1765- abstract type CallInfo end
1766- struct NewInstruction
1767- stmt:: Any
1768- type:: Any
1769- info:: CallInfo
1770- line:: Int32
1771- flag:: UInt8
1772- function NewInstruction (@nospecialize (stmt), @nospecialize (type), @nospecialize (info:: CallInfo ),
1773- line:: Int32 , flag:: UInt8 )
1774- return new (stmt, type, info, line, flag)
1775- end
1776- end
1777- @nospecialize
1778- function NewInstruction (newinst:: NewInstruction ;
1779- stmt= newinst. stmt,
1780- type= newinst. type,
1781- info:: CallInfo = newinst. info,
1782- line:: Int32 = newinst. line,
1783- flag:: UInt8 = newinst. flag)
1784- return NewInstruction (stmt, type, info, line, flag)
1785- end
1786- @specialize
1787- let src = code_typed1 ((NewInstruction,Any,Any,CallInfo)) do newinst, stmt, type, info
1788- NewInstruction (newinst; stmt, type, info)
1789- end
1790- @test count (issplatnew, src. code) == 0
1791- @test count (iscall ((src,NamedTuple)), src. code) == 0
1792- @test count (isnew, src. code) == 1
1793- end
17941752
17951753# Test that inlining can still use nothrow information from concrete-eval
17961754# even if the result itself is too big to be inlined, and nothrow is not
0 commit comments