Revert "Revert "Remove non-live vregs from GC map on return.""
This reverts commit 73dda0bc2adcd6a3a7d75f663a3559f8b527d485.
It also fixes the problematic line in the ReferenceMap test.
Change-Id: Ic3b62db7c040853a5ddfed589f6e0acff25d82b7
diff --git a/runtime/verifier/instruction_flags.h b/runtime/verifier/instruction_flags.h
index 9b2e595..e50ba13 100644
--- a/runtime/verifier/instruction_flags.h
+++ b/runtime/verifier/instruction_flags.h
@@ -93,6 +93,21 @@
return IsVisited() || IsChanged();
}
+ void SetReturn() {
+ flags_ |= 1 << kReturn;
+ }
+ void ClearReturn() {
+ flags_ &= ~(1 << kReturn);
+ }
+ bool IsReturn() const {
+ return (flags_ & (1 << kReturn)) != 0;
+ }
+
+ void SetCompileTimeInfoPointAndReturn() {
+ SetCompileTimeInfoPoint();
+ SetReturn();
+ }
+
std::string ToString() const;
private:
@@ -108,6 +123,8 @@
kBranchTarget = 3,
// Location of interest to the compiler for GC maps and verifier based method sharpening.
kCompileTimeInfoPoint = 4,
+ // A return instruction.
+ kReturn = 5,
};
// Size of instruction in code units.