您的位置:首页 > Web前端 > JavaScript

How do I dig into under the hood of Google V8 JavaScript engine

2017-05-11 13:38 579 查看
1.  Firstly, you should prepare some knowledge of dynamic compilation.  If you have the knowledge of Java Virtual Machine, you are in good position but you need to prepare some new knowledge of compiler.  Especially the concept of "Sea of Nodes"  IR.   You
can start from googling "combining Analyses, Combining optimizations - Summary", and then read Cliff Clicks thesis.

2. And then you should read the V8 design docs. Of course the best ones are from Google V8 engineering team.

3. The third step is of course to download V8 source code and try to play with it, like building, testing etc.

4. After playing with it,  you are commended to scan through the source code.  I did it by setting up the Eclipse environment and scan all the source codes under v8/src directory. At this stage, you are only expected to get a rough idea of those key classes,
and try to remember their names and their roles.

5. Now,  try to understand the general execution sequence of running a simple JS file. I did it by generating a callgraph by using valgrind tool and get the visual call graph by kCachegrind.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐