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

Simple extern FFI #63

Open
rurban opened this issue Oct 18, 2013 · 1 comment
Open

Simple extern FFI #63

rurban opened this issue Oct 18, 2013 · 1 comment
Milestone

Comments

@rurban
Copy link
Member

rurban commented Oct 18, 2013

See https://github.com/perl11/potion/wiki/FFI and p2 branch ffi

  • calling convention with different ABI (syntax and code, no win64, no stdcall yet)
  • either precompile each ffi proto to a signature translation wrapper, or translate the sigs at the call ext part in the vm, similar to filling in defaults.
  • return type declaration syntax. like an optional extern int sleep(sec=N).
    or extern sleep(sec=N) => N
  • call it (vm and jit)
  • move some of compile-time parts to the VM (OP_EXTERN dlsym). currently we can only call into already loaded libs, or load a lib at compile-time (as in p2 BEGIN{})

aggregate types and header parser later

@rurban
Copy link
Member Author

rurban commented Feb 5, 2014

work is done in branch extern. arguments are not yet converted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant