Going by Ecma 335 III.4.13, it is my understanding that a sequence like
should produce a volatile load. While one could argue that it's a store (the spec says "copy the value stored at address src to the stack"), interpreting it as a load seems more appropriate if one considers that the spec also says "if typeTok is not a generic parameter and either a reference type or a built-in value class, then the ldind instruction provides a shorthand for the ldobj instruction".
The relevant code:
category:correctness
theme:interpreter
skill-level:intermediate
cost:small
Going by Ecma 335 III.4.13, it is my understanding that a sequence like
should produce a volatile load. While one could argue that it's a store (the spec says "copy the value stored at address
srcto the stack"), interpreting it as a load seems more appropriate if one considers that the spec also says "iftypeTokis not a generic parameter and either a reference type or a built-in value class, then theldindinstruction provides a shorthand for theldobjinstruction".The relevant code:
category:correctness
theme:interpreter
skill-level:intermediate
cost:small