Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Following on from #107 and #108, this PR updates the serialization layer to store the set of functions along with associated type information. Previously, the serialization layer would store a string identifier when a function pointer was encountered, followed by additional objects if the function was a closure. The deserialization layer relies on information from the user/coroc (via `RegisterClosure`) as to which functions are closures and what the layout of objects looks like in memory. For an offline process to analyze durable coroutine state we need to store this information alongside the state. This PR updates the serialization to register functions/closures (and types) as they're encountered in the object graph. Like types in #108, functions are stored in an array where the index is used as a unique identifier. When serializing functions/closures, the serialization layer now stores the function ID (the index, not the name) as function pointers are encountered, followed by closure objects. An offline process now has the same information as the original program when it comes to function types and closure memory layouts.
- Loading branch information