SemanticDiff
인터페이스, 도구 분류
The four buckets of difference.
import type { SemanticDiff } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface SemanticDiff { readonly interface: readonly string[]; readonly resources: readonly string[]; readonly constants: readonly string[]; readonly controlFlow: readonly string[];}설명
Each entry is a fact line prefixed - (present in
a, absent from b) or + (the reverse). When all four are empty the modules agree
on everything this comparison inspects; isSemanticallyEqual performs that test.
인스턴스 속성
interface읽기 전용readonly string[]Entry-point signatures and the vertex attribute layout.
resources읽기 전용readonly string[]Bind groups, std140/std430 struct layouts, and required capabilities.
constants읽기 전용readonly string[]Module consts, pipeline overrides, and the multiset of numeric literals in function bodies. A literal’s value is reported here and nowhere else, because the control-flow skeleton leaves it out, so changing a constant and changing the shape of the code around it land in different buckets.
controlFlow읽기 전용readonly string[]Per-statement control-flow skeleton, one line per statement, addressed by path.
함께 보기
소스
src/core/semantic-diff.ts, 81행, 커밋 c66579bf 기준