Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix usage of live in opcodes and no longer preserve registers by default
Many opcodes have a live parameter which is the number of registers that should be preserved by GC operations. Take this into account and conversely stop preserving registers by default. This affects significantly the safety of `memory_ensure_free` when writing nifs. Indeed, arguments (which come from registers) are no longer preserved. However, no platform-specific nif was found that needed to be fixed. If required, calls to `memory_ensure_free` or `memory_ensure_free_opt` should be replaced with calls to `memory_ensure_free_with_roots`. Signed-off-by: Paul Guyot <[email protected]>
- Loading branch information