javascriptv8bytecodeignition

Can I execute bytecode generated by Ignition with v8(-debug)?


I know I can print bytecode generated by Ignition by —print-bytecode flags with v8-debug, but I do not know How can I execute printed bytecode with v8(-debug).

I feel there is no way, because bytecode should be just a data structure in v8 program, and it is not equal to formatted bytecode for print.

Is my intuition is correct? or there is actually any way to execute printed bytecode with v8?


Solution

  • Yes, your intuition is correct: there is no way to feed the output of --print-bytecode back into V8.

    That said, making V8 execute that bytecode immediately is trivially easy: just keep going; right after being printed it'll be executed :-)