This code is adapted from jhjourdan's 2c93ca1e711. Comballoc is
extended to keep track of allocation sizes and debug info for each
allocation, and the frame table format is modified to store them.
The native code GC-entry logic is changed to match bytecode, by
calling the garbage collector at most once per allocation.
amd64 only, for now.
Locations of inlined frames are now represented as contiguous
sequences rather than linked lists.
The frame tables now refer to debug info by 32-bit offset rather
than word-sized pointer.
Since we cannot access backtrace position in cmmgen.ml anymore,
Cmm.raise_kind in removed. Instead, we use Lambda.raise_kind. When
assembly code is generated, we reset the backtrace position to 0 in the
case of regular raise. Importantly, the semantics remains the same.
Stacks grow downward on all platforms that OCaml supports or is ever likely to, so this PR removes some #ifdefs about the direction of stack growth.
These #ifdefs were added to support HP's PA-RISC, the last major architecture that had stacks growing upward. The last PA-RISC processor was released in 2005, and HP customers looking for an upgrade path were told to move to Intel's Itanium (!). OCaml dropped PA-RISC support in 2011, but these #ifdefs hung around.
There aren't many other machines like this. Some grepping in the Linux sources returns only one other architecture that Linux has ever supported with stacks that grow up, an embedded DSP called Meta. Support has recently been dropped. Apparently the DECSYSTEM-20 (running on the PDP-10) also had stacks growing up, but I doubt OCaml is likely to support that soon either.