Groups
Groups
Sign in
Groups
Groups
Wind.js User Groups
Conversations
About
Send feedback
Help
[AOT] Dynamic generated async method can't use AOT?
7 views
Skip to first unread message
fantasybei
unread,
Oct 9, 2012, 5:42:02 AM
10/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to win...@googlegroups.com
Hi 老赵,
从文档看,AOT 现在是不是只能对静态也就是eval(Wind.compile...);这种类型的代码进行AOT处理?如果异步方法是动态时生成的,比如有一个function组成的数组[funcA, funB, funcC],然后代码里在运行时把这些函数一个个做成异步方法,这种情况下现在应该还做不了AOT吧?或者这根本就是做不到的?
现在在一个资源有限的设备上运行代码,而且要动态eval成异步方法的代码很多,所以这个过程现在很慢
还有一点关于文档的意见, 在
windjs.org
上好像都没有了AOT相关的文档了,我是在之前
jscex.info
上面看AOT相关的文档的,希望能多补充一点AOT方面的说明。
谢谢
Jeffrey Zhao
unread,
Oct 14, 2012, 5:45:50 AM
10/14/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to win...@googlegroups.com
对,只能对eval(Wind.compile)类型的做AOT。如果有一个function数组再一个一个做成异步方法,这个的确不支持,但是这个本来也会破坏Wind.js异步函数的使用啊。详见《eval为什么不能封装》这篇文章:
http://windjs.org/cn/blog/2012/09/eval-the-method-cannot-be-encapsulated/
你是什么情况所以需要这么做呢?
老赵 | Jeffrey Zhao
Blog:
http://blog.zhaojie.me/
GitHub:
https://github.com/JeffreyZhao
--
Reply all
Reply to author
Forward
0 new messages