diff --git a/base/docs/basedocs.jl b/base/docs/basedocs.jl index e03d0db78f29f..7cefa7d2b0ce4 100644 --- a/base/docs/basedocs.jl +++ b/base/docs/basedocs.jl @@ -3705,11 +3705,11 @@ unused and delete the entire benchmark code). the code is semantically equivalent to `donotdelete(2).` !!! note - This intrinsic does not affect the semantics of code that is dead because it is + This function does not affect the semantics of code that is dead because it is *unreachable*. For example, the body of the function `f(x) = false && donotdelete(x)` - may be deleted in its entirety. The semantics of this intrinsic only guarantee that - *if* the intrinsic is semantically executed, then there is some program state at - which the value of the arguments of this intrinsic were available (in a register, + may be deleted in its entirety. The semantics of this function only guarantee that + *if* the function is semantically executed, then there is some program state at + which the value of the arguments of this function were available (in a register, in memory, etc.). # Examples diff --git a/base/essentials.jl b/base/essentials.jl index 32c44a9571f23..8539d423e9327 100644 --- a/base/essentials.jl +++ b/base/essentials.jl @@ -1,6 +1,6 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -using Core: CodeInfo, SimpleVector, donotdelete, compilerbarrier, memoryrefnew, memoryrefget, memoryrefset! +using Core: CodeInfo, SimpleVector, compilerbarrier, memoryrefnew, memoryrefget, memoryrefset! const Callable = Union{Function,Type} @@ -1261,3 +1261,5 @@ typename(typeof(function < end)).constprop_heuristic = Core.SAMETYPE_HEURISTIC typename(typeof(function > end)).constprop_heuristic = Core.SAMETYPE_HEURISTIC typename(typeof(function << end)).constprop_heuristic = Core.SAMETYPE_HEURISTIC typename(typeof(function >> end)).constprop_heuristic = Core.SAMETYPE_HEURISTIC + +donotdelete(args...) = Core.donotdelete(args...)