node.js – In nodejs, how was javascript with c++ code references compiled and executed by the V8 engine?

I know that internalBindings is used in nodejs to help javascript code introduce the c++ module, but in the end v8 will compile javascript into ast. At this time, ast contains both the content of the javascript language and the content referenced by c++.

When executing ast, I wonder if it is parsed When reaching the content referenced by c++, first run the c++ code and then return the result, so that JavaScript can be fully integrated into the c++ code. Is this how v8 runs js code?

Read more here: Source link