As the ECMAScript specification evolves, industrial-scale JavaScript compilers face the challenge of supporting modern language syntax while maintaining compatibility for diverse execution environments. Traditionally, compilers solve this by running transpilation passes in a monolithic pipeline, where the transpilation passes are chosen to execute strictly based on a target language level. This results in significant computational waste, as compilers perform expensive Abstract Syntax Tree (AST) traversals to lower features that may not exist in the actual input source code. We present a compiler improvement that conditionally executes transpiler passes based on accurately tracking and dynamically maintaining the exact set of language features present in the compilation unit throughout the transpilation process. It is implemented in the production Google Closure Compiler. By populating and maintaining a FeatureSet at every JavaScript script-level, it dynamically skips running unnecessary lowering passes. We detail the architectural safeguards -- including strategic pass ordering and dynamic validation of the transpiled code for feature-correctness. Evaluation of this improvement on large-scale production monorepos produced a considerable reduction in compilation time and saved compute and memory usage.


翻译:暂无翻译

0
下载
关闭预览

相关内容

编译器(Compiler),是一种计算机程序,它会将用某种编程语言写成的源代码(原始语言),转换成另一种编程语言(目标语言)。
【CVPR2022】高分辨率和多样化的视频-文本预训练模型
专知会员服务
10+阅读 · 2022年3月6日
【精通OpenCV 4】Mastering OpenCV 4 - Third Edition 随书代码
专知会员服务
40+阅读 · 2019年11月13日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
SMP2018中文人机对话技术评测
哈工大SCIR
12+阅读 · 2019年3月6日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
《pyramid Attention Network for Semantic Segmentation》
统计学习与视觉计算组
44+阅读 · 2018年8月30日
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
论文笔记之Feature Selective Networks for Object Detection
统计学习与视觉计算组
21+阅读 · 2018年7月26日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Relation Networks for Object Detection 论文笔记
统计学习与视觉计算组
16+阅读 · 2018年4月18日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月24日
Feature Denoising for Improving Adversarial Robustness
Arxiv
15+阅读 · 2018年12月9日
VIP会员
最新内容
DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
7+阅读 · 5月5日
《美空军条令出版物 2-0:情报(2026版)》
专知会员服务
13+阅读 · 5月5日
帕兰提尔 Gotham:一个游戏规则改变器
专知会员服务
7+阅读 · 5月5日
【综述】 机器人学习中的世界模型:全面综述
专知会员服务
11+阅读 · 5月4日
伊朗的导弹-无人机行动及其对美国威慑的影响
相关VIP内容
【CVPR2022】高分辨率和多样化的视频-文本预训练模型
专知会员服务
10+阅读 · 2022年3月6日
【精通OpenCV 4】Mastering OpenCV 4 - Third Edition 随书代码
专知会员服务
40+阅读 · 2019年11月13日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
SMP2018中文人机对话技术评测
哈工大SCIR
12+阅读 · 2019年3月6日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
《pyramid Attention Network for Semantic Segmentation》
统计学习与视觉计算组
44+阅读 · 2018年8月30日
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
论文笔记之Feature Selective Networks for Object Detection
统计学习与视觉计算组
21+阅读 · 2018年7月26日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Relation Networks for Object Detection 论文笔记
统计学习与视觉计算组
16+阅读 · 2018年4月18日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员