-
Notifications
You must be signed in to change notification settings - Fork 40
Mutable arrays in the LLVM backend #477
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
Conversation
f90caa3 to
5e451e0
Compare
|
Really great, thanks that you implemented both arrays and refs. Btw, in my drafts of promises in #469 I tried to stick to a similar strategy of storing the eraser after the RC and treat Promise as Pos this way. One issue that I have is: do you really want to directly test the "unsafe" variants? |
dc91c3c to
901c480
Compare
| * | ||
| * +--[ Header ]--+------+------------+ | ||
| * | Rc | Eraser | Size | Fields ... | | ||
| * +--------------+------+------------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we do not save the size in the tag because we need it in the eraser?
| /** | ||
| * Creates a new Array of size `size` filled with the value `init` | ||
| */ | ||
| extern global def fresh[T](size: Int, init: T): Array[T] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that fill is also already used in the stdlib for the same operation on lists — it might be worth it to think about synchronizing the two names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. here we used fresh since it is the same name as for Ref.
|
We would like to rename: unsafeFresh -> allocate document in allocate that the default constructor should be preferred and that it is unsafe... |
No description provided.