- Removes VUTF8String and replaces its usage with VArray's of Char8's.
- Reworks VUniqueString to derive from VArray
- Re-enables majority of string related verse-tests for VM
Minor:
- Updated some ToStringImpl for VFalse and VFunction
#okforversepublic
#rb saam.barati, Tim.Smith
#rb tim.smith
[CL 32803034 by jared cotton in ue5-main branch]
Defer blocks run for one of several reasons: normal block exit, exit via break or return, or (not yet implemented) task cancellation. To accommodate this, defer bytecode accepts a jump target index and switches on it after running. This index is stored in a register allocated for the defer block, which is sufficient because defers are not re-entrant. The register and switch are elided when the block runs only on the normal exit path.
The switch instruction has a variadic label operand. To simplify label fixup, all variadic operands are moved from `TArray` fields in the instructions to a shared trailing array in `VProcedure`. (Variadic operands to suspension captures remain `TArray`s.)
Early exit may cross several defer blocks on the way to its eventual jump target. Each defer block wraps these jump targets in a thunk, which passes the index for the wrapped target to the defer block. Exit control flow thus executes a chain of these thunks, ending with the actual exit jump when it reaches the appropriate scope.
#rb Markus.Breyer, Tim.Smith
[CL 32670628 by russell johnston in ue5-main branch]
Bind the `task` class to `VTask` with a native `Await` method. For tasks created before this binding, `VTask` uses a trivial emergent type and shape, so code that runs in this context (i.e. module top-levels) does not support structured concurrency.
Each `sync` arm spawns a new task, and the overall expression `Await`s each of them in turn to collect their results. These tasks may need to remain active when the outer `sync` expression suspends, which conflicts with the way lenient suspension forcibly suspends child tasks - to resolve this, suspenion no longer affects child tasks (in fact child tasks are no longer tracked at all) and instead `EndTask` (really any time the current task changes) must check for an already-suspended `YieldTask`.
Also adjust the bytecode of `for` loops so that the body runs outside of any failure context, rather than forwarding failures. This enables `<suspends>` calls in `for` loop bodies.
#rb Markus.Breyer
[CL 32277546 by russell johnston in ue5-main branch]
Replace `TVerseFunction` and its `FProperty` with a `VRestValue`.
Unify `TVerseFunction` and `FInteropUtils::TryInvoke...` for calling methods vs module/interface functions. (This includes fixing named non-defaulted parameters in the `TVerseFunction` path, apparently previous unused.)
Wrap the `verse::task*` result of `<native_callable>` APIs in `FVerseTask`; remove `Cancel` from `TVerseCall` (see SOL-6056).
Switch to decorated but unmangled names in VNI-generated binding glue.
Switch to decorated method names in VerseVM to match the binding glue.
Run `UVerseVMClass` CDO initialization after binding glue computes class layout.
Always create a `UObject` for `<native>` classes, now that their methods are bound.
#rb markus.breyer, tim.smith
#okforversepublic
[CL 32004566 by russell johnston in ue5-main branch]