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

Ref array types as alternative to pointers #1

Open
rhenwood39 opened this issue Mar 2, 2017 · 2 comments
Open

Ref array types as alternative to pointers #1

rhenwood39 opened this issue Mar 2, 2017 · 2 comments

Comments

@rhenwood39
Copy link
Contributor

rhenwood39 commented Mar 2, 2017

In llvm2, ref array types were used in places where this project used pointers (e.g. voidpp, int pointers, etc).

See https://github.com/dirk/llvm2/blob/master/lib/ref-types.js for definition of array types.

See https://github.com/dirk/llvm2/blob/master/lib/library.js for use of array types.

@rhenwood39 rhenwood39 changed the title Ref array types as alternative to voidpp Ref array types as alternative to pointers Mar 4, 2017
@rhenwood39
Copy link
Contributor Author

It looks like we are going to have to use PointerArrays instead of voidpp and the like. We'll have to go through llvm.ts and see which functions are currently using pointer arguments when they should be using array arguments.

@sampsyo
Copy link
Collaborator

sampsyo commented Mar 20, 2017

Yes, good point. I think it's technically possible for voidpp to work if the user carefully constructs their own Buffer full of pointer-sized numbers, but the new array types are certainly more ergonomic.

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

2 participants