Shopify / seafoam

A tool for working with compiler graphs dumped by the GraalVM compiler
MIT License
126 stars 22 forks source link

Handle NaN in BGV files when converting to JSON #16

Closed chrisseaton closed 3 years ago

tomstuart commented 3 years ago

The code looks sensible to me. How can I try it (with & without this change) to see if it’s working right?

chrisseaton commented 3 years ago

I added a spec, and an example file that now includes a NaN, examples/ruby-fib.bgv. So you can see the difference by running the spec, or by bgv2json examples/ruby-fib.bgv, which would not work before due to NaN not being allowed in JSON.

chrisseaton commented 3 years ago

Some other researchers do their own analysis and were happier working with a JSON dump than they were writing a Ruby script. I also just grep the JSON output for a quick way to see if something is in the file or not.