unknownStable?

unknownStable? (value -- isUnknownStable)

Inputs

Outputs

unknownStable? is the current stack-value forgotten-contents predicate. It tests whether current stability survives after concrete contents are forgotten.

This predicate follows the referenced target for known non-NIL Ref values. It is the same predicate as isDynamic. Fully known In-place values therefore report FALSE. Text, Code, and Meta values also report FALSE, including callable non-NIL Code values.

Behavior

Example

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

  "-- stable? versus unknownStable? for In-place values --" printCompilerMessage
  7 stable? printStack _:;
  7 unknownStable? printStack _:;
  7 isDynamic printStack _:;
  unknownValue stable? printStack _:;
  unknownValue unknownStable? printStack _:;
  unknownValue isDynamic printStack _:;

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

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

  0
] "main" exportFunction

Expected Output During Compilation

-- stable? versus unknownStable? for In-place values --
TRUE
FALSE
FALSE
TRUE
TRUE
TRUE
-- stable? versus unknownStable? for references --
TRUE
FALSE
FALSE
TRUE
TRUE
TRUE
FALSE
FALSE
FALSE
-- stable? versus unknownStable? for text, code, meta --
TRUE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
FALSE
TRUE
FALSE
FALSE

See also