externRef
이 페이지에서

externRef()

함수, 값 분류

A read of a global the host provides, the read side of an externVar(...) declaration and the variable counterpart of an externFn call.

import { externRef } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

function externRef<T extends ShaderType>(name: string, type: T): ReadonlyNode<KeyOf<T>>

매개변수

name string
type T extends ShaderType

반환값

ReadonlyNode<KeyOf<T>>

설명

A read of a global the host provides, the read side of an externVar(...) declaration and the variable counterpart of an externFn call. It is read-only: the host owns the value. The optimizer treats it as opaque, like overrideRef: the value is unknown when the module is built, so no folding or dead-branch pass may collapse a branch it guards. Authoring code reads through the handle externVar returns; this is the primitive behind that handle.

함께 보기

소스

src/core/ir/node.ts, 1098행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고