-
Notifications
You must be signed in to change notification settings - Fork 694
Define memmove
and memzero
operators.
#284
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
|
This is a path which I'm specifically nervous about, and am liable to abandon and subsequently oppose the addition of even
"Everything is int32", and the future "Everything is int64", are pretty simple (and note that this is nicer with
|
Type signatures are easier to read than English IMO :-) |
Important to have in a section of intrinsics or builtins, surely :-). |
Is there a strong need to have a distinction between intrinsics and the On Wed, Jul 29, 2015 at 5:34 AM, Dan Gohman [email protected]
|
@titzer I've been thinking the same thing. In terms of file format, even control flow could be stored the same way as intrinsics (except maybe ... blocks? Blocks are the only thing coming to mind that really seem to need a variable argument list. There could be a binary operator |
@titzer I agree, I don't think we need such a distinction. |
No distinction sounds fine. I'd still like explicit signatures instead of English. We do provide signatures for AST nodes. I'd also like |
For core semantics ( |
Closing for now; we can reconsider these operators in the future when we look at other bulk memory operations too. |
This proposes what I sketched out in #236.
I'm quite open to discussing extensions to these operators to accept e.g. size and alignment hints (size hints may include things like known-multiples or known-ranges when the size isn't constant), but let's do so in a new issue.
Why
memzero
and notmemset
? It's simpler while still covering the main use case. On one hand, I'm already a nervous about adding what could be seen as macro-operators to WebAssembly in the first place. And on the other, the ability to paint memory regions with just a single-byte pattern is oddly restrictive. If we're going to add functionality like that, perhaps we should add forms for 32-bit and 64-bit patterns too.