Rule 9.8
On this page

Rule 9.8

Chapter 9, Built-in functions and the TypeShade extensions Test

A row, a declaration, a signature, an overload, or a member must never be added for a compiler-internal name (§2.1), under its own id, under an allowed id, or under a new spelling that denotes the same thing. The reviewer reads the row’s reason, and reads a changed signature of an existing name as a new spelling. A reason that describes a representation the compiler chose (the halves of an emulated value, a lowering intermediate, a mangled name) describes an internal name, whatever the id.

The rule text and the parts under it are the compiler's own English, as the design document writes them.

Rationale

see Rule 2.2; a row is how a decision is recorded, not how a check is bypassed, and a new id is the cheapest bypass there is.

Derives from

PR #166’s body, section “A design rule this lane settled” (“the maintainer’s decision is that they must not exist on the surface”, written against an issue text that asked for an author spelling).

How it is verified

Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.

Where the rule says the compiler enforces it:

  • surface-names.test.ts (no pre-emit intrinsic id is declared or listed), which fails on a row for any id of PRE_EMIT_INTRINSICS but f64;
  • the same test (the f64 family declares only the constructor forms WGSL gives the type it stands in for), which fails on a signature of f64 or of a vecNf64 outside WGSL’s constructor forms;
  • the review Rule 13.1 and CLAUDE.md require of every pull request that changes what an author can write, which alone catches a row under any other id, a row for a generated backend name, and a signature added to a name outside the f64 family;
  • that review, which reads the change for new authorable names and new signatures that are not WGSL’s, applying the definition of §2.1 to what the name, or the signature, denotes.

The files that verify it at commit 26de7be8, each at the first line that names the rule:

See also

Source

The rule at commit 26de7be8:

Edit this page Report a problem