0

How does v8 load and execute the native machine code it generates?

asked Apr 4, 2018 at 10:24

1 Answer 1

1

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

answered Apr 4, 2018 at 12:35
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.