3535
3636@eval baremodule Compiler
3737
38- # Needs to match UUID defined in Project.toml
39- ccall (:jl_set_module_uuid , Cvoid, (Any, NTuple{2 , UInt64}), Compiler,
40- (0x807dbc54_b67e_4c79 , 0x8afb_eafe4df6f2e1 ))
41-
4238using Core. Intrinsics, Core. IR
4339
4440using Core: ABIOverride, Builtin, CodeInstance, IntrinsicFunction, MethodInstance, MethodMatch,
@@ -49,7 +45,8 @@ using Core: ABIOverride, Builtin, CodeInstance, IntrinsicFunction, MethodInstanc
4945
5046using Base
5147using Base: @_foldable_meta , @_gc_preserve_begin , @_gc_preserve_end , @nospecializeinfer ,
52- BINDING_KIND_GLOBAL, BINDING_KIND_UNDEF_CONST, BINDING_KIND_BACKDATED_CONST, BINDING_KIND_DECLARED,
48+ PARTITION_KIND_GLOBAL, PARTITION_KIND_UNDEF_CONST, PARTITION_KIND_BACKDATED_CONST, PARTITION_KIND_DECLARED,
49+ PARTITION_FLAG_DEPWARN,
5350 Base, BitVector, Bottom, Callable, DataTypeFieldDesc,
5451 EffectsOverride, Filter, Generator, IteratorSize, JLOptions, NUM_EFFECTS_OVERRIDES,
5552 OneTo, Ordering, RefValue, SizeUnknown, _NAMEDTUPLE_NAME,
@@ -60,7 +57,7 @@ using Base: @_foldable_meta, @_gc_preserve_begin, @_gc_preserve_end, @nospeciali
6057 generating_output, get_nospecializeinfer_sig, get_world_counter, has_free_typevars,
6158 hasgenerator, hasintersect, indexed_iterate, isType, is_file_tracked, is_function_def,
6259 is_meta_expr, is_meta_expr_head, is_nospecialized, is_nospecializeinfer, is_defined_const_binding,
63- is_some_const_binding, is_some_guard, is_some_imported, is_valid_intrinsic_elptr,
60+ is_some_const_binding, is_some_guard, is_some_imported, is_some_explicit_imported, is_some_binding_imported, is_valid_intrinsic_elptr,
6461 isbitsunion, isconcretedispatch, isdispatchelem, isexpr, isfieldatomic, isidentityfree,
6562 iskindtype, ismutabletypename, ismutationfree, issingletontype, isvarargtype, isvatuple,
6663 kwerr, lookup_binding_partition, may_invoke_generator, methods, midpoint, moduleroot,
@@ -74,6 +71,10 @@ import Base: ==, _topmod, append!, convert, copy, copy!, findall, first, get, ge
7471 getindex, haskey, in, isempty, isready, iterate, iterate, last, length, max_world,
7572 min_world, popfirst!, push!, resize!, setindex!, size, intersect
7673
74+ # Needs to match UUID defined in Project.toml
75+ ccall (:jl_set_module_uuid , Cvoid, (Any, NTuple{2 , UInt64}), Compiler,
76+ (0x807dbc54_b67e_4c79 , 0x8afb_eafe4df6f2e1 ))
77+
7778const getproperty = Core. getfield
7879const setproperty! = Core. setfield!
7980const swapproperty! = Core. swapfield!
@@ -129,7 +130,7 @@ something(x::Any, y...) = x
129130# ###########
130131
131132baremodule BuildSettings
132- using Core: ARGS , include
133+ using Core: ARGS , include, Int, ===
133134using .. Compiler: > , getindex, length
134135
135136global MAX_METHODS:: Int = 3
@@ -188,21 +189,25 @@ macro __SOURCE_FILE__()
188189 return QuoteNode (__source__. file:: Symbol )
189190end
190191
191- module IRShow end
192- function load_irshow! ()
193- if isdefined (Base, :end_base_include )
194- # This code path is exclusively for Revise, which may want to re-run this
195- # after bootstrap.
196- include (IRShow, Base. joinpath (Base. dirname (Base. String (@__SOURCE_FILE__ )), " ssair/show.jl" ))
197- else
192+ module IRShow end # relies on string and IO operations defined in Base
193+ baremodule TrimVerifier using Core end # relies on IRShow, so define this afterwards
194+
195+ if isdefined (Base, :end_base_include )
196+ # When this module is loaded as the standard library, include these files as usual
197+ include (IRShow, " ssair/show.jl" )
198+ include (TrimVerifier, " verifytrim.jl" )
199+ else
200+ function load_irshow! ()
201+ Base. delete_method (Base. which (verify_typeinf_trim, (IO, Vector{Any}, Bool)),)
198202 include (IRShow, " ssair/show.jl" )
203+ include (TrimVerifier, " verifytrim.jl" )
199204 end
200- end
201- if ! isdefined (Base, :end_base_include )
202- # During bootstrap, skip including this file and defer it to base/show.jl to include later
203- else
204- # When this module is loaded as the standard library, include this file as usual
205- load_irshow! ()
205+ function verify_typeinf_trim (io :: IO , codeinfos :: Vector{Any} , onlywarn :: Bool )
206+ # stub implementation
207+ msg = " --trim verifier not defined "
208+ onlywarn ? println (io, msg) : error (msg)
209+ end
210+ # During bootstrap, skip including these files and defer to base/show.jl to include it later
206211end
207212
208213end # baremodule Compiler
0 commit comments