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

Minimum viable virtual methods #459

Closed
vgrichina opened this issue Feb 4, 2019 · 0 comments · Fixed by #1208
Closed

Minimum viable virtual methods #459

vgrichina opened this issue Feb 4, 2019 · 0 comments · Fixed by #1208

Comments

@vgrichina
Copy link

My understanding is that it's possible to implement virtual methods in AssemblyScript before GC/reftypes land in WASM:

  • Make compiler emit vtables for classes not marked as @unmanaged
  • Make __memory_allocate take another optional parameter (vtable pointer). This can be stored before returned memory address, so that code expecting same object field offsets as now doesn't break.
  • Use call_indirect for method calls (looking up function index in vtable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants