免费下载案例集|20+数字化领先企业人才培养实践经验 了解详情
写点什么

JavaScript WeakRefs and TC39 standardization

  • 2020-02-08
  • 本文字数:1790 字

    阅读完需:约 6 分钟

JavaScript WeakRefs and TC39 standardization

GMTC 深圳 2019 大会上,Daniel Ehrenberg 讲师做了《JavaScript WeakRefs and TC39 standardization》主题演讲,主要内容如下。


演讲简介


TC39 is the committee which defines the JavaScript standard. JavaScript developers have been telling us for many years that they need weak references and finalizer callbacks: These capabilities let programs hook into garbage collection to free up related resources. After several years of debate and refinement, TC39 has settled on a design for WeakRefs and FinalizationGroups which has reached Stage 3 in its process and will likely soon be shipping in browsers and Node.js. In this talk, I will explain how to use WeakRefs, as well as how TC39 works and how to get involved, so that we can work together for the future of JavaScript.


  1. Use cases for WeakRefs and FinalizationGroups

  2. (1) In-memory cache

  3. (2) Triggering errors on stranded resources

  4. (3) Using WebAssembly memory from JavaScript

  5. (4) In-memory cache with tombstone cleanup

  6. How TC39 develops JavaScript

  7. (1) What is TC39?

  8. (2) Development of the JavaScript standard

  9. (3) TC39 stage process

  10. (4) Some recent TC39 proposals

  11. Details of WeakRefs in TC39

  12. (1) History of this proposal in TC39

  13. (2) WeakRef and FinalizationGroup APIs

  14. (3) Weak guarantees in WeakRef/FinalizationGroup behavior

  15. (4) Scheduing interactions with deref() and FinalizationGroup callbacks

  16. Participating in TC39

  17. (1) Giving feedback on proposals via GitHub

  18. (2) Helping with tests and documentation

  19. (3) Creating implementations in Babel, tools, JS engines, etc

  20. (4) Joining Ecma to be a TC39 delegate


Audience benefits:


  1. Learn to use the new JavaScript WeakRefs feature

  2. Get involved in shaping the future of JavaScript through TC39


Frontier highlights:


WeakRefs and FinalizationGroups can lead to more precise, efficient memory consumption in modern JavaScript


Knowledge reserve:


  1. Know simple JavaScript

  2. Understand what garbage collection is


参考翻译


Javascript Weakrefs 和 TC39 标准化


内容大纲


TC39 委员会负责制定 JavaScript 标准。多年来,JavaScript 开发人员一直告诉委员会,他们需要弱引用和 Finalizer 回调:这些功能使得程序可以连接到垃圾收集中,以释放相关资源。经过几年的争论和改进,TC39 已经确定了 WeakRefs 和 FinalizationGroups 的一种设计方案,目前已经到了第 3 阶段,可能很快就会在浏览器和 Node.js 中发布。在本次演讲中,我将解释如何使用 Weakrefs,然后介绍 TC39 是如何工作的,以及如何参与其中,以便大家能够为 JavaScript 的未来共同努力。


  1. WeakRefs 和 FinalizationGroups 的用例

  2. (1)内存缓存

  3. (2)滞留资源触发错误

  4. (3)使用 JavaScript 中的 WebAssembly 内存

  5. (4)带逻辑删除的内存缓存

  6. TC39 如何开发 JavaScript

  7. (1)什么是 TC39?

  8. (2)JavaScript 标准的发展过程

  9. (3)TC39 阶段流程

  10. (4)近期 TC39 的一些建议

  11. TC39 中的 WeakRefs 细节

  12. (1)TC39 中本提案的历史

  13. (2)WeakRef 和 FinalizationGroup API

  14. (3)WeakRef/FinalizationGroup 行为中的弱保证

  15. (4)调度与 deref

  16. (5)和 FinalizationGroup 回调的交互

  17. 参与 TC39

  18. (1)通过 GitHub 反馈提案

  19. (2)帮助测试和文档

  20. (3)在 Babel、工具、JS 引擎等中创建实现

  21. (4)加入 Ecma 成为 TC39 代表


听众受益点


  1. 学习使用新的 JavaScript WeakRefs 特性

  2. 通过 TC39 参与塑造 JavaScript 的未来


前沿亮点


WeakRefs 和 finalizationgroup 可以使现代 JavaScript 中的内存使用更精确、更高效。


知识储备


  1. 了解简单的 JavaScript

  2. 了解什么是垃圾收集


讲师介绍


Daniel Ehrenberg,TC39 核心成员。


Daniel is an engineer at Igalia, an open source software cooperative. He participates in the TC39 and has dabbled in WebAssembly and web standards. He also worked on V8.


Daniel 是 TC39 的核心成员,他就职于 Igalia,这是一家自由软件咨询公司,希望通过自由软件让世界更美好。Daniel 还涉猎 WebAssembly 和 Web 标准,也参与了 V8 的开发。












完整演讲 PPT 下载链接


https://gmtc.infoq.cn/2019/shenzhen/schedule


2020-02-08 19:34688

评论

发布
暂无评论
发现更多内容
JavaScript WeakRefs and TC39 standardization_GMTC_Daniel Ehrenberg_InfoQ精选文章