Repository navigation
[interpreter] Add *.atomic.wait and atomic.notify - #115
Conversation
These are not implemented for execution.
| type atomicrmwop = rmwop * storeop | ||
| type atomicrmwcmpxchgop = storeop | ||
|
|
||
| type atomicmemop = storeop (* No atomic operations use Memory.extension *) |
There was a problem hiding this comment.
I would perhaps remove all the aliases to this type (and rename this to just atomicop?); atomicrmwop could go as well -- it seems more logical to have the rmwop as a separate argument directly on the AtomicRMW constructor, since it isn't really related to the memory access per se.
|
|
||
| let memop name {ty; align; offset; _} = | ||
| value_type ty ^ "." ^ name ^ | ||
| let memarg {ty; align; offset; _} = |
There was a problem hiding this comment.
Nit: since this one outputs a proper memop, I'd rather keep its name, and call the new one something different (memop_without_type?). Also, I think you can keep the name argument, since even the new function prepends it.
| (assert_invalid (module (memory 1 1) (func (drop (i64.atomic.rmw16_u.cmpxchg (i32.const 0) (i64.const 0) (i64.const 0))))) "atomic accesses require shared memory") | ||
| (assert_invalid (module (memory 1 1) (func (drop (i64.atomic.rmw32_u.cmpxchg (i32.const 0) (i64.const 0) (i64.const 0))))) "atomic accesses require shared memory") | ||
|
|
||
| ;; *.atomic.wait and atomic.notify (unimplemented in exec) |
|
|
||
| let memop name {ty; align; offset; _} = | ||
| value_type ty ^ "." ^ name ^ | ||
| let memop_without_type name {ty; align; offset; _} = |
There was a problem hiding this comment.
Nit: can remove ty in pattern.
There was a problem hiding this comment.
ty is used below when writing alignment. Maybe the name makes this unclear -- it could be memop_without_type_prefix perhaps?
There was a problem hiding this comment.
Ah, sorry, missed that. I think it's fine as is then.
Implement bulk memory operations in small-step semantics, as in spec. Minor fixes: - In spec, memory.copy was missing use of \vconst in the backwards case - In interpreter & test, memory.init still trapped if segment has been dropped but length parameter was 0.
…bAssembly#115) This reverts commit 10d6c6c. This reverts WebAssembly#96, which squashed all upstream commits into one, which was not the recommended way in https://github.com/WebAssembly/proposals/blob/master/howto.md#syncing-with-upstream-changes. This leaves README.md untouched because WebAssembly#99 made significant changes on top of the merged version already.
These are not implemented for execution.