Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【特性】增加this特殊变量 #10

Open
bd4sur opened this issue Sep 5, 2019 · 0 comments
Open

【特性】增加this特殊变量 #10

bd4sur opened this issue Sep 5, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@bd4sur
Copy link
Owner

bd4sur commented Sep 5, 2019

特性描述:增加this特殊变量,这一变量的值,①为它所出现的词法Lambda节点的把柄。②为运行时确定的所在闭包的把柄。

实现思路:这一特性涉及反射,需要通盘考虑。目前的想法是:若值为闭包,则返回currentClosureHandle。若值为Lambda节点把柄,则静态分析阶段作替换。

需要考虑this①能否用来模拟面向对象特性;②能否用来实现define;③能否用来实现匿名函数递归进而实现(function ..)特殊结构。等等。

@bd4sur bd4sur added the enhancement New feature or request label Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant