当前位置:网站首页>js代码如何被浏览器引擎编译执行的?
js代码如何被浏览器引擎编译执行的?
2022-07-28 11:10:00 【卷王出征】
编译型 和 解释型 语言
执行阶段
Parse阶段: V8引擎将js代码转换为AST (抽象语法树)
Ignition阶段: 解释器将AST转换为字节码,解析执行字节码也会 为下一个阶段优化编译 提供重要的信息
TurboFan阶段: 编译器利用上个阶段收集的信息,将字节码优化为可执行的机器码
Orinoco阶段: 垃圾回收阶段,将程序中不再使用的内存空间进行回收
生成AST
词法分析: 这个阶段会将源代码拆分成最小的,不可再分的词法单元,称为token
语法分析: 将词法单元转换成一个由元素逐级嵌套所组成的代表了程序语法结构的树,这个树被称为抽象语法树(AST)
babel的作用 是将ES6语法转化为ES6语法,其实是将ES6的抽象语法树转化为ES5的抽象语法树
边栏推荐
- Autumn recruit offer harvesters, and take the offers of major manufacturers at will
- 「以云为核,无感极速」第五代验证码重磅来袭
- WPF layout controls are scaled up and down with the window, which is suitable for multi-resolution full screen filling applications
- B2 sub theme / blog b2child sub theme / open source code
- 完整版H5社交聊天平台源码[完整数据库+完整文档教程]
- Design and implementation of SSM personal blog system
- zotero文献管理器及其使用姿势(不定时更新)
- 对话庄表伟:开源第一课
- 天狼星网络验证源码/官方正版/内附搭建教程
- [极客大挑战 2019]BabySQL-1|SQL注入
猜你喜欢

ripro9.0修正升级版+WP两款美化包+稀有插件

Router firmware decryption idea
![ASP. Net core 6 framework unveiling example demonstration [29]: building a file server](/img/90/40869d7c03f09010beb989af07e2f0.png)
ASP. Net core 6 framework unveiling example demonstration [29]: building a file server

Five Ali technical experts have been offered. How many interview questions can you answer

LabVIEW AI视觉工具包(非NI Vision)下载与安装教程

一种比读写锁更快的锁,还不赶紧认识一下

目标检测领域必看的6篇论文

擦黑板特效表白H5源码+非常浪漫/附BGM

Xiaoshuidi 2.0 website navigation network template

可视化大型时间序列的技巧。
随机推荐
How to effectively implement a rapid and reasonable safety evacuation system in hospitals
Five Ali technical experts have been offered. How many interview questions can you answer
Can dynamic partitions be configured when MySQL is offline synchronized to ODPs
Embrace open source guidelines
Dialogue with Zhuang biaowei: the first lesson of open source
How to use JWT for authentication and authorization
Outlook suddenly becomes very slow and too laggy. How to solve it
Today's sleep quality record 74 points
Full version of H5 social chat platform source code [complete database + complete document tutorial]
天狼星网络验证源码/官方正版/内附搭建教程
Summary of common RSA related problems in CTF: basic RSA encryption and decryption
Rongyun IM & RTC capabilities on new sites
R language ggplot2 visualization: use the ggdotplot function of ggpubr package to visualize dot plot, set the add parameter, add violin graph to the dot plot, and add the vertical line of mean standar
接口测试的作用
Learning notes tree array
[collection] Advanced Mathematics: Capriccio of stars
The fifth generation verification code of "cloud centered, insensitive and extremely fast" is coming heavily
[applet] how to notify users of wechat applet version update?
Zotero document manager and its use posture (updated from time to time)
服务器在线测速系统源码