Spec-Zone.ru › Nushell

view ir for debug

View the compiled IR code for a block of code.

Signature

> view ir {flags} (target)

Flags

  • --json, -j: Dump the raw block data as JSON (unstable).
  • --decl-id, -d: Integer is a declaration ID rather than a block ID.

Parameters

  • target: The name or block to view compiled code for.

Input/output types:

input output
nothing string

Notes

The target can be a closure, the name of a custom command, or an internal block ID. Closure literals within IR dumps often reference the block by ID (e.g. closure(3231)), so this provides an easy way to read the IR of any embedded closures.

The --decl-id option is provided to use a declaration ID instead, which can be found on call instructions. This is sometimes better than using the name, as the declaration may not be in scope.

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/view_ir.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API