This pull request should fix issue #14. The new algorithm for counting shared-memory access can be summarized as follows,
+1 whenever GetLValue in ResolveAsLValue
+1 whenver GetRValue in ResolveAsRValue
+1 whenver UnaryOp.Dereference in ResolveAsRValue
Resolution of LValue caused by UnaryOp.AddressOf doesn't count as a memory reference. This is dealt after the recursion.
In addition, the shared-memory access counting for method call arguments are separate from the rest of the statement. The reasoning is that a method call is translated into two separate next routines for call and return.
This pull request should fix issue #14. The new algorithm for counting shared-memory access can be summarized as follows,
In addition, the shared-memory access counting for method call arguments are separate from the rest of the statement. The reasoning is that a method call is translated into two separate next routines for call and return.