Hi,

I find it is a common occurrence that we want to expand a `SafePointNode` into 
a subgraph, and to do that we may need to create a `JVMState` ourselves, which 
may easily results in cumbersome errors because the kit state is not created 
properly. I tried using `GraphKit` to expand generate code after a 
`SafePointNode` (in particular, I tried to emit an uncommon trap there), which 
leads to this PR which consolidates the creation of a `GraphKit` from a 
`SafePointNode` that we want to use its debug state.

Please take a look and leave your reviews, thanks a lot.

-------------

Commit messages:
 - GraphKit for macro expansion

Changes: https://git.openjdk.org/valhalla/pull/2163/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2163&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8378672
  Stats: 42 lines in 3 files changed: 26 ins; 10 del; 6 mod
  Patch: https://git.openjdk.org/valhalla/pull/2163.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2163/head:pull/2163

PR: https://git.openjdk.org/valhalla/pull/2163

Reply via email to