-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat!: Grain implementation of memory allocator #530
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -429,7 +429,7 @@ and block = list(instr); | |
[@deriving sexp] | ||
type import_type = | ||
| MFuncImport(list(asmtype), list(asmtype)) | ||
| MGlobalImport(asmtype); | ||
| MGlobalImport(asmtype, bool); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should consider documenting these fields. Perhaps we should try to add documentation to an ADT definition whenever we update it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general, I suppose so, yeah. This one sorta makes sense because globals went from always being immutable to optionally being mutable. I think in general we could prefer the record-type variants since those are self-documenting. |
||
|
||
[@deriving sexp] | ||
type import_kind = | ||
|
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 kind of wish we used an ADT here which was something like this:
Even if we only have
AllocWords
as the only variant, I feel like it'd be more expressive/readable/"safe":tm:, since it will be clear at the use sites that the number we're passing intoheap_allocate
represents words rather than bytes.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.
Could be a good future change, yeah.