IR
export 40개
모든 백엔드가 읽는 중간 표현입니다. 노드와 문장과 선언이 들어 있고, 출력은 모두 여기서 나옵니다.
시그니처, 설명, 예제는 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
-
AddressSpace타입 - The BindingDecl.space a resource binding lives in: WGSL's var<uniform> or var<storage, ...>.
-
ALL_CAPABILITIES상수 - Every Capability, as a runtime value: the list a capability matrix, a doc generator or a coverage check iterates.
-
ASSEMBLED_AS상수 - Non-enumerable marker key on a FuncDecl: the name the declaration was last assembled under by module.
-
BindingDecl인터페이스 - A ModuleDecl.bindings entry: a resource bound at a slot.
-
BinOp타입 - The operator tag on Expr.binop: arithmetic (+ - * /), remainder (%) and bitwise.
-
Capability타입 - A GPU or language feature a target backend may or may not support.
-
CmpOp타입 - The operator tag on Expr.compare: the six relational operators.
-
ConstDecl인터페이스 - A ModuleDecl.consts entry: a module-scope constant.
-
DeclarableCapability타입 - The capabilities a module may name in ModuleDecl.enables: Capability minus the nine capabilities derived from the module's shape.
-
DiagnosticDirective인터페이스 - One WGSL diagnostic; directive.
-
EntryParam인터페이스 - An entry-point parameter: it carries a @builtin(...) or a @location(n).
-
Expr타입 - Every expression shape the IR can hold: the closed set that Node and ReadonlyNode build and that the WGSL, GLSL and CPU backends walk to emit or evaluate.
-
ExternVarDecl인터페이스 - A host-provided global, the declaration behind externVar.
-
FuncDecl인터페이스 - A ModuleDecl.funcs entry: a WGSL/GLSL function, either an ordinary helper or a pipeline entry point (stage set).
-
grad함수 - Differentiate a function of a module with respect to one of its parameters, in forward mode, and add the derivative as a new function.
-
GradOptions인터페이스 - Options for grad.
-
GradResult인터페이스 - What grad returns: the module with the derivative function added, and its name.
-
installStmtSink함수 - Installs the statement sink that Node.assign() writes through.
-
isNodeValue함수 - Runtime type guard for "is this value a node".
-
lift함수 - Normalizes a NodeLike operand to a ReadonlyNode: a JS number becomes an f32 literal, and an existing node passes through unchanged.
-
LogOp타입 - The operator tag on Expr.logical: the short-circuiting boolean operators && and ||.
-
ModuleDecl인터페이스 - The whole-shader unit: everything a backend needs to emit a complete WGSL or GLSL ES 3.00 module, or to evaluate one on the CPU oracle.
-
ModuleVarDecl인터페이스 - One entry of ModuleDecl.vars: a module-scope variable that is not a resource.
-
Node클래스 - The write-capable node.
-
NODE_BRAND상수 - The symbol every node carries as a brand, installed once on the ReadonlyNode prototype.
-
OverrideDecl인터페이스 - A pipeline specialization constant, the declaration behind overrideConst.
-
RawPayload타입 - The argument to rawStmt: the wgsl and glsl source text of a raw statement.
-
RawStmt타입 - The raw statement node: a fragment of target source spliced verbatim into a function body, spelled per target.
-
ReadonlyNode클래스 - The read-only base of every value node: every literal, parameter, constRef and Let() binding is a ReadonlyNode.
-
renameVarrefsInFunc함수 - Renames variable references in the body of f.
-
rewriteExprsInFunc함수 - Applies rewrite to every expression in the body of f and returns the rewritten function.
-
SourceSpan인터페이스 - Where an IR node came from in its authored source: the file, the exact UTF-16 offsets, and the line and character of each end for display.
-
sourceSpanOf함수 - The authored source span of an IR node, or undefined when it has none.
-
stageOf함수 - The stage of a function declaration: 'vertex', 'fragment' or 'compute' for an entry point, undefined for a helper.
-
Stmt타입 - Every statement shape the IR can hold: the ordered readonly Stmt[] that makes up a FuncDecl.body.
-
StructDecl인터페이스 - A ModuleDecl.structs entry: a WGSL struct declaration.
-
StructField인터페이스 - One field of a StructDecl: a plain data member of a uniform or storage struct, or, in a vertex/fragment I/O struct, a member carrying a @builtin or @location attribute.
-
WorkgroupShape타입 - The x, y and z extents of a compute entry's workgroup, WGSL's @workgroup_size(x, y, z).
-
workgroupShapeOf함수 - The workgroup shape of a compute entry: the structured workgroupShape field first, then [workgroupSize, 1, 1], then the extents of the @workgroup_size(x, y, z) attribute string; undefined when none is present.
-
workgroupSizeOf함수 - The x workgroup size of a compute entry: the structured workgroupSize field first, then the @workgroup_size(n) attribute string; undefined when neither is present.