In the Node (using v10.14.2) usage description there is an option --v8-options. Run Node with this to see a long list of options to give directly to V8, the Javascript engine running under the hood of Node.
There are a few options in here that will get us a look at the inner workings of the Javascript code we write.
--print-code --print-bytecode--print-code prints the code out in x64 assembly, I think.
--print-bytecode prints the intermediate bytecode.
For even a simple program like hello world there are a few pages of bootstrapping code that also gets printed out. Your functions are put under a label that looks like this:
[generated bytecode for function: myadd]
Use that to your advantage to find your code.
Good Luck!
-Victor F.
No comments:
Post a Comment