Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backtrace support, part 1: Use StackChain to represent chains of stac…
…ks (#98) This is the first PR in a series to add support for generating backtraces in the presence of stack switching. Currently, the `VMContext` contains a (possibly `null`) pointer to the currently running continuation. Every `ContinuationObject` in turn contains a (possibly `null`) pointer to its parent. This effectively yields a linked list of continuations. This PR changes this situation in two ways. See the comment on `wasmtime_continuations::StackChain` for more details. 1. Instead of a (possibly `null`) pointer to a `ContinuationObject`), both `VMContext` and `ContinuationObject` now contain an object of type `StackChain` to represent their "parent". This is still effectively a linked list of stacks. 2. However, by using the new `StackChain` type, it is now possible to have an explicit representation of the main stack at the end of the list of active continuations. In other words, a `StackChain` linked list now ends with a `MainStack` variant. In addition, we now associate a `StackLimits` object with each element in the `StackChain` (including the main stack). This will be used in subsequent PRs to store a subset of the values in `VMRuntimeLimits` for each stack.
- Loading branch information