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

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值