Enforce strict reference equality for uninit ref register types

This commit is contained in:
Ben Gruver
2013-04-08 21:45:22 -07:00
parent 3f05570b6b
commit 8c2d92d954
4 changed files with 61 additions and 2 deletions

View File

@ -76,6 +76,12 @@ public class RegisterType {
if (category != that.category) {
return false;
}
// These require strict reference equality. Every instance represents a unique
// reference that can't be merged with a different one, even if they have the same type.
if (category == UNINIT_REF || category == UNINIT_THIS) {
return false;
}
return (type != null ? type.equals(that.type) : that.type == null);
}