Reputation:
How does v8 load and execute the native machine code it generates?
Upvotes: 0
Views: 254
Reputation: 2318
Basically V8 creates a byte array containing the native instructions. It then copies the data into an executable memory region from which point on you can directly jump/call to it.
See FinalizeCode within the compiler which sets up a new Code object.
As for calling, you'll find the detailed frame description in frame-constants.h where you want
Upvotes: 1