Implement an object type A2_TTABLE, similar to A2_TCONSTANT and A2_TSTRING, but holding an array of constant values.
Requirements:
A language construct for defining tables at compile time.
Support for specifying (separately!) if low and high indexes should be wrapped, clamped, replaced with a default value, or if low and/or high index should result in a VM exception, aborting the script.
Support for specifying the base index. (Default: 0)
Support for interpolation (off/linear/cubic/...) when indexed with non-integer values.
A SimplExp syntax, and VM instructions, for reading items from indexable objects.
Shorthand syntax + optimization for reading a randomly selected item from a table.
Optimizations:
Special VM instructions for when something is known at compile time to be an A2_TTABLE, where the compiler puts a direct pointer to the object in the program, avoiding the handle lookup overhead.
Implement an object type A2_TTABLE, similar to A2_TCONSTANT and A2_TSTRING, but holding an array of constant values.
Requirements:
Optimizations: