Skip to content

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

Description

@bd4sur

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

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions