I have a question about reordering legal instructions in C # /. NET
Let's start with this example. We have this method defined in some class, where _a, _b and _c are fields.
int _a;
int _b;
int _c;
void Foo()
{
_a = 1;
_b = 1;
_c = 1;
}
And our calling environment will look something like this.
ClassInstance.Foo();
I wonder what kind of legal team reorganization is possible when this method call is built in against the function call. In particular, I am wondering if / when it is legal to reorder memory operations inside Foo () with memory operations outside it (from our previous example, memory operations).
Also, a function call (no built-in), in a sense, "creates memory barriers." As in the case, memory operations that occur before or after a function call cannot be redirected to memory operations in a function call.
, - " ", ?