Haiyang-Sun / nodeprof.js

Instrumentation framework for Node.js compliant to ECMAScript 2020 based on GraalVM.
Apache License 2.0
53 stars 22 forks source link

Update NodeProf to support latest GraalVM JavaScript codebase. #94

Closed jirkamarsik closed 3 years ago

jirkamarsik commented 3 years ago

Calls to #getRealm are replaced with JSRealm#get. The PR also includes a fix for compiling NodeProf in native images, by explicitly specifying that the NodeProf classes can be initialized at build-time.

I also dropped an unused Env parameter from getReceiver that was giving me compiler warnings and ran the code through the Eclipse code formatter that's used in GraalVM JavaScript (that last one was a bit of a mistake as I thought mx eclipseformat was being used already, but it turned out it isn't and so it changed the formatting in several unrelated places; I can revert those changes if they are unwanted).

alexjordan commented 3 years ago

@jirkamarsik I think you want to bump the Graal.js import in your PR as well.

alexjordan commented 3 years ago

Don't worry about the whitespace changes, I should try to get mx eclipseformat working in our Gtihub action so that the formatting is consistent.