@@ -423,6 +423,15 @@ const TypeInfo = Tuple{Vector{Any},Dict{ID,Type}}
423
423
_typeof(x)
424
424
425
425
Central definition of typeof, which is specific to the use-required in this package.
426
+ Largely the same as `Base._stable_typeof`, differing only in a handful of
427
+ situations, for example:
428
+ ```jldoctest
429
+ julia> Base._stable_typeof((Float64,))
430
+ Tuple{DataType}
431
+
432
+ julia> Libtask._typeof((Float64,))
433
+ Tuple{Type{Float64}}
434
+ ```
426
435
"""
427
436
_typeof (x) = Base. _stable_typeof (x)
428
437
_typeof (x:: Tuple ) = Tuple{map (_typeof, x)... }
@@ -881,6 +890,11 @@ function derive_copyable_task_ir(ir::BBCode)::Tuple{BBCode,Tuple,Vector{Any}}
881
890
# At present, we're not able to properly infer the values which might
882
891
# potentially be produced by a call-which-might-produce. Consequently, we
883
892
# have to assume they can produce anything.
893
+ #
894
+ # This `Any` only affects the return type of the function being derived
895
+ # here. Importantly, it does not affect the type stability of subsequent
896
+ # statements in this function. As a result, the impact ought to be
897
+ # reasoanbly limited.
884
898
push! (possible_produce_types, Any)
885
899
886
900
# Create a new basic block from the existing statements, since all new
0 commit comments