yjhjstz / deep-into-node

In-depth understanding of Node.js: Core Ideas and Source Code Analysis
https://jianghua-yjhs-organization.gitbook.io/in-depth-understanding-of-node.js-core-ideas-and/
4.36k stars 622 forks source link

generator #2

Closed lezi1022 closed 6 years ago

lezi1022 commented 8 years ago

deep-into-node,不能缺少generator相关的东西吧,作为从c转到nodejs的开发者,很好奇js的yield是底层怎么实现的

yjhjstz commented 8 years ago

恩,不错的提议,yield 底层实现是在 v8 层面,后面我研究下,写一或多篇文章来介绍下。 也欢迎提更多的意见。

yjhjstz commented 8 years ago

https://yjhjstz.gitbooks.io/deep-into-node/content/chapter3/chapter3-2.html 汇编部分比较晦涩,没有展开写。

sodawy commented 8 years ago

赞行动力

joyeecheung commented 7 years ago

Note: generator 在去年重新实现了一遍,现在走 ignition + turbofan