Extends the Script class with support for the Tiri language.
The Tiri class provides functionality for running scripts written in the Tiri programming language.
The Tiri class consists of the following fields:
Access | Name | Type | Comment | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| JitOptions | JOF | Defines JIT debugging options. | |||||||||||||||||||||||||||||||||||||
This field allows the client to configure debugging options related to the Just-In-Time (JIT) compilation process.
| |||||||||||||||||||||||||||||||||||||||
| Procedures | kt::vector<std::string> | Returns a string array of all named procedures defined by a script. | |||||||||||||||||||||||||||||||||||||
This field will return a string array of all procedures loaded into the script, conditional on it being activated. It will otherwise return an empty array. | |||||||||||||||||||||||||||||||||||||||
The following actions are currently supported:
| Activate | Performs the native action of the object. | |||||||
|---|---|---|---|---|---|---|---|---|
| Query | Compiles the script and prepares it for execution. | |||||||
ERR acQuery(*Object) Query() performs the process of compiling the Tiri script. A Tiri script can be queried only once, at which point the object enters a configured state. Further queries will do nothing, and return Note that due to the code not being run, declared functions and variables won't be formally registered. Introspection of available procedures will be limited until the script is activated. | ||||||||
| SaveToObject | Compiles the current script statement and saves it as byte code. | |||||||
ERR acSaveToObject(*Object, OBJECTID Dest, CLASSID ClassID)
Use the SaveToObject action to compile the statement in the Script's String field and save the resulting byte code to a target object. The byte code can be loaded into any script object for execution or referenced in the Tiri code for usage. | ||||||||
JIT behaviour options
| Name | Description |
|---|---|
| JOF::ALL_TIPS | Include all tips and style suggestions. |
| JOF::DIAGNOSE | Cancels aborting on error so that the full script is parsed. Enables deeper log tracing. |
| JOF::DISABLE_JIT | Disable the JIT compiler. |
| JOF::DUMP_BYTECODE | Print a disassembly of bytecode instructions after parsing. |
| JOF::PROFILE | Use timers to profile JIT parsing. Required to configure run-time profiling. |
| JOF::TIPS | Filter tips down to performance and code quality issues. |
| JOF::TOP_TIPS | Filter tips down to type safety and correctness issues. |
| JOF::TRACE | Synonym for TRACE_TOKENS | TRACE_EXPECT | TRACE_BOUNDARY | TRACE_OPERATORS | TRACE_REGISTERS | TRACE_CFG | TRACE_ASSIGNMENTS | TRACE_VALUE_CATEGORY | TRACE_TYPES |
| JOF::TRACE_ASSIGNMENTS | Trace PreparedAssignment lifecycle and hazard handling. |
| JOF::TRACE_BOUNDARY | Enable log messages for AST boundary crossing. |
| JOF::TRACE_CFG | Trace ControlFlowGraph edge creation and patching. |
| JOF::TRACE_EXPECT | Enable trace expectation messages during parsing. |
| JOF::TRACE_OPERATORS | Trace OperatorEmitter method calls and decisions. |
| JOF::TRACE_REGISTERS | Trace RegisterAllocator reservations and releases. |
| JOF::TRACE_TOKENS | Trace the emission of tokens. |
| JOF::TRACE_TYPES | Trace type inference and type checking decisions. |
| JOF::TRACE_VALUE_CATEGORY | Trace ValueUse/ValueSlot/LValue operations. |