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

【特性】增加“普通”函数调用相关指令 #6

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

【特性】增加“普通”函数调用相关指令 #6

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

Comments

@bd4sur
Copy link
Owner

bd4sur commented Sep 2, 2019

特性描述:计划增加3条指令,使AVM可执行不具有闭包特性的非一等函数(例如C、Java等语言的函数、方法等)。3条指令分别为:

  • invoke <label> 执行<label>处定义的函数。
  • setlocal <variable> 将OP栈顶对象保存到位于栈帧的局部变量中。
  • getlocal <variable> 从栈帧中取出局部变量的值,并压入OP栈顶。

还需要加入全局变量操作指令。

实现思路:①栈帧增加局部变量字段。②或者invoke的栈帧并不与call共用同一类栈帧。

@bd4sur bd4sur added the enhancement New feature or request label Sep 2, 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