Skip to content

Commit 3c7a1ab

Browse files
committed
v8 arch
1 parent ed6ff0e commit 3c7a1ab

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Diff for: chapter2/chapter2-0.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11

22
## V8 concept
3+
### 架构图
4+
![](e09d7b330d9e754f7ff1282a1af55295.png)
5+
6+
现在JS引擎的执行过程大致是:源代码--->抽象语法树--->字节码--->JIT--->本地代码。
7+
8+
V8更加直接的将抽象语法树通过JIT技术转换成本地代码,放弃了在字节码阶段可以进行的一些性能优化,但保证了执行速度。
9+
在V8生成本地代码后,也会通过Profiler采集一些信息,来优化本地代码。虽然,少了生成字节码这一阶段的性能优化,
10+
但极大减少了转换时间。
11+
12+
> PS: Tuborfan 将逐步取代 Crankshaft
13+
314
在使用v8引擎之前,先来了解一下几个基本概念:句柄(handle),作用域(scope),上下文环境(可以简单地理解为运行环境)。
415

516
### Isolate

Diff for: chapter2/e09d7b330d9e754f7ff1282a1af55295.png

28.5 KB
Loading

0 commit comments

Comments
 (0)