isDynamic

isDynamic (value -- isDynamic)

Inputs

Outputs

isDynamic is the current stack-value forgotten-contents predicate. It tests whether the current stack value is in the forgotten-contents state.

This predicate follows the referenced target for known non-NIL Ref values. It is the same predicate as unknownStable?. Mere lack of compile-time knownness is not enough, so Text, Code, and Meta values still report FALSE. This includes callable non-NIL Code values and known NIL Code values.

Behavior

Example

{} 0 {} [
  value: 7;
  codeLocal: {} () {} codeRef;
  unknownValue: 0 dynamic;
  unknownText: 0 ("") dynamic @;
  [] !codeLocal

  "-- same as unknownStable? for In-place values --" printCompilerMessage
  7 known? printStack _:;
  7 isDynamic printStack _:;
  7 unknownStable? printStack _:;
  unknownValue known? printStack _:;
  unknownValue isDynamic printStack _:;
  unknownValue unknownStable? printStack _:;

  "-- same as unknownStable? for references --" printCompilerMessage
  @value isDynamic printStack _:;
  @value unknownStable? printStack _:;
  @value dynamic isDynamic printStack _:;
  @value dynamic unknownStable? printStack _:;
  0nx value addressToReference isDynamic printStack _:;
  0nx value addressToReference unknownStable? printStack _:;

  "-- same as unknownStable? for text, code, meta --" printCompilerMessage
  "hi" isDynamic printStack _:;
  "hi" unknownStable? printStack _:;
  unknownText isDynamic printStack _:;
  unknownText unknownStable? printStack _:;
  {} () {} codeRef isDynamic printStack _:;
  {} () {} codeRef unknownStable? printStack _:;
  @codeLocal isDynamic printStack _:;
  @codeLocal unknownStable? printStack _:;
  () isDynamic printStack _:;
  () unknownStable? printStack _:;

  0
] "main" exportFunction

Expected Output During Compilation

-- same as unknownStable? for In-place values --
TRUE
FALSE
FALSE
FALSE
TRUE
TRUE
-- same as unknownStable? for references --
FALSE
FALSE
TRUE
TRUE
FALSE
FALSE
-- same as unknownStable? for text, code, meta --
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE

See also