Skip to content

Commit 8773db7

Browse files
authored
Clarify docstrings for code_native and code_warntype (#57870)
You can see it from the diff.
1 parent de18300 commit 8773db7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stdlib/InteractiveUtils/src/codeview.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ characteristics of a particular type is an implementation detail of the compiler
159159
concern, so some types may be colored red even if they do not impact performance.
160160
Small unions of concrete types are usually not a concern, so these are highlighted in yellow.
161161
162-
Keyword argument `debuginfo` may be one of `:source` or `:none` (default), to specify the verbosity of code comments.
162+
Keyword argument `debuginfo` may be one of `:source`, `:none` or `:default`, to specify the verbosity of code comments.
163+
Unless the user changes `Base.IRShow.default_debuginfo[]`, the value `:default` is equivalent to `:source`.
163164
164165
See the [`@code_warntype`](@ref man-code-warntype) section in the Performance Tips page of the manual for more information.
165166
@@ -349,16 +350,16 @@ code_llvm(io::IO, @nospecialize(f), @nospecialize(types=Base.default_tt(f)); kwa
349350
code_llvm(args...; kwargs...) = (@nospecialize; code_llvm(stdout, args...; kwargs...))
350351

351352
"""
352-
code_native([io=stdout,], f, types; syntax=:intel, debuginfo=:default, binary=false, dump_module=true)
353+
code_native([io=stdout,], f, types; syntax=:intel, debuginfo=:default, binary=false, dump_module=true, raw=false)
353354
354355
Prints the native assembly instructions generated for running the method matching the given
355356
generic function and type signature to `io`.
356357
357358
* Set assembly syntax by setting `syntax` to `:intel` (default) for intel syntax or `:att` for AT&T syntax.
358-
* Specify verbosity of code comments by setting `debuginfo` to `:source` (default) or `:none`.
359+
* Specify verbosity of code comments by setting `debuginfo` to `:source` (equivalently, `:default`) or `:none`.
359360
* If `binary` is `true`, also print the binary machine code for each instruction precedented by an abbreviated address.
360361
* If `dump_module` is `false`, do not print metadata such as rodata or directives.
361-
* If `raw` is `false`, uninteresting instructions (like the safepoint function prologue) are elided.
362+
* If `raw` is `false` (default), uninteresting instructions (like the safepoint function prologue) are elided.
362363
363364
See also: [`@code_native`](@ref), [`code_warntype`](@ref), [`code_typed`](@ref), [`code_lowered`](@ref), [`code_llvm`](@ref).
364365
"""

0 commit comments

Comments
 (0)