Add missing memory barrier.

When DEX-to-DEX compiler is not run onto a method (because it's not preverified
at the time of compilation), we do not replace RETURN where a barrier is needed
into RETURN_VOID_BARRIER.
This CL fixes this by placing a barrier on RETURN instruction only when the
checks are enabled (non-preverified method).

Change-Id: I4eb4cf79bb4a74684579c578318e27f62f4d9e8a
2 files changed