Promoting an object duplicates the object in the major heap and uses
write barriers to ensure that the copies are in sync. However, physical
comparison breaks due to this. Physical comparison is essential for
pattern matching polymorphic and extensible variants. See #7 for
example. The fix ensures that the major heap object is always used when
comparing promoted objects.
Previously, callbacks from C to OCaml allocated a fresh OCaml stack to
run the callback function. This isn't a problem usually, but it turns
out to be very bad for timer interrupts. Every time a timer interrupt is
handled, a new OCaml stack is created on the heap and discarded soon
This commit modifies the behavior of callbacks such that they run on the
same stack as the parent, need only a check to see if there is enough
space in the parent stack to initiate a callback. Fixes#7.