getCallTrace (-- callTrace)callTrace: Immutable Ref to the current top call-trace item, or known NIL of that Ref schema when unavailable.getCallTrace returns the structured immutable Ref itself.
The result schema is an immutable Ref to the callTraceItem type. In formatted form, that referent schema is:
{
name: Text;
line: Int32;
column: Int32;
prev: Natx;
}
The referent fields mean:
name: Source text of the current node.line: 1-based source line of that node.column: 1-based source column of that node.prev: Natx link to the previous call-trace item, or 0 when no older frame is present.The structured result does not include a file path.
NIL immutable Ref of the same schema.{} 0 {} [
"-- immutable Ref result --" printCompilerMessage
getCallTrace isConst printStack _:;
getCallTrace printStack _:;
0
] "main" exportFunction
-- immutable Ref result --
TRUE
{
name: Text;
line: Int32;
column: Int32;
prev: Natx;
} CNIL
failCompilation builtin (--) Aborts compilation immediately.printCompilerMessage builtin (message --) Prints a known Text message during compilation and appends one line-feed character.printStack builtin (--) Prints the current data stack in canonical formatter form; it does not itself pop stack values.printStackTrace builtin (--) Prints the current scope stack as file path, line, column, and node source text information.raiseStaticError builtin (message --) Raises a compile-time error with the given known Text message.