Currently, HotSpotSpeculationLog encapsulates and stores object representing speculations across all compilations of a method (or a Truffle AST). This complicates GC which has to find these logs and also presents concurrency issues when there can be multiple compilations of a Method. It is better to have a compilation serialize speculations into bytes. An nmethod will directly store these bytes and when a speculation fails, the relevant bytes are appended to a list hanging of a Method* (or Truffle AST).
This has the following advantages:
* speculation lifetimes work out of the box (i.e. they are reclaimed when their holder is collected)
* in the context of libgraal, there is no need to worry about managing objects on the SVM heap that outlive a compilation