QCon北京「鸿蒙专场」火热来袭!即刻报名,与创新同行~ 了解详情
写点什么

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:34792

评论

发布
暂无评论
发现更多内容

MySQL5.7 通过逻辑备份迁移到GreatSQL注意事项

GreatSQL

TouchDesigner Pro 2023 mac破解版 及安装教程

Rose

AE脚本Motion 4 中文版for Mac v4.1.2激活版 MG运动图形高级工具

Rose

Mac SVN客户端 SmartSVN for Mac许可证书及详细安装图文教程 支持M1/M2

Rose

钢轨行业的数字化转型:全生命周期管理与智能化决策支持

天津汇柏科技有限公司

数字化转型

Beyond Compare 4 mac中文破解版 及安装教程 兼容M1/M2

Rose

用技术定义未来,洲际交易所ICE即将推出AI高频交易平台

科技热闻

软件测试学习笔记丨Flask操作数据库-多对多操作

测试人

数据库 软件测试

人工智能能为区块链和初创公司做些什么?

区块链开发团队DappNetWork

Photoshop CC 2018 for Mac(ps cc 2018)v19.1.8中文激活版

Rose

Next-Level Agents:释放动态上下文(Dynamic Context)的巨大潜力

Baihai IDP

AI 白海科技 LLMs 企业号 6 月 PK 榜 AI Agent

一文搞懂5种内存溢出案例,内含完整源码

华为云开发者联盟

Java JVM 华为云 华为云开发者联盟 企业号2024年6月PK榜

AI日报|国产大模型迎来新卷王,天工MoE全球首用4090推理,马斯克计划豪掷90亿购买GPU

可信AI进展

#人工智能

深度剖析集团型企业在新质生产力和数字化转型过程中面临的身份管理问题(一)

芯盾时代

数字化转型 iam 统一身份 新质生产力

简单4步,带你用华为云MetaStudio制作数字人短片

华为云开发者联盟

人工智能 华为云 AIGC 华为云开发者联盟 企业号2024年6月PK榜

JavaScript WeakRefs and TC39 standardization_GMTC_Daniel Ehrenberg_InfoQ精选文章