@@ -402,7 +402,7 @@ julia> code_typed() do
402
402
1 ─ return 479001600
403
403
) => Int64
404
404
405
- julia> Base.@assume_effects :total_may_throw @ccall jl_type_intersection(Vector{Int}::Any, Vector{<:Integer}::Any)::Any
405
+ julia> Base.@assume_effects :foldable @ccall jl_type_intersection(Vector{Int}::Any, Vector{<:Integer}::Any)::Any
406
406
Vector{Int64} (alias for Array{Int64, 1})
407
407
```
408
408
@@ -541,7 +541,7 @@ This `setting` combines the following other assertions:
541
541
and is a convenient shortcut.
542
542
543
543
---
544
- # `:total_may_throw `
544
+ # `:foldable `
545
545
546
546
This `setting` combines the following other assertions:
547
547
- `:consistent`
@@ -554,10 +554,10 @@ and is a convenient shortcut.
554
554
the applied method when all the call arguments are fully known to be constant, no matter
555
555
if the call results in an error or not.
556
556
557
- `@assume_effects :total_may_throw ` is similar to [`@pure`](@ref) with the primary
557
+ `@assume_effects :foldable ` is similar to [`@pure`](@ref) with the primary
558
558
distinction that the `:consistent`-cy requirement applies world-age wise rather
559
559
than globally as described above. However, in particular, a method annotated
560
- `@pure` should always be `:total` or `:total_may_throw `.
560
+ `@pure` should always be `:total` or `:foldable `.
561
561
Another advantage is that effects introduced by `@assume_effects` are propagated to
562
562
callers interprocedurally while a purity defined by `@pure` is not.
563
563
"""
@@ -580,7 +580,7 @@ macro assume_effects(args...)
580
580
terminates_locally = true
581
581
elseif setting === :total
582
582
consistent = effect_free = nothrow = terminates_globally = true
583
- elseif setting === :total_may_throw
583
+ elseif setting === :foldable
584
584
consistent = effect_free = terminates_globally = true
585
585
else
586
586
throw (ArgumentError (" @assume_effects $setting not supported" ))
0 commit comments