diff options
| -rw-r--r-- | src/verifier/reg_type.h | 18 | ||||
| -rw-r--r-- | test/080-oom-throw/src/Main.java | 4 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/verifier/reg_type.h b/src/verifier/reg_type.h index 5daaf6013c..79ff67425b 100644 --- a/src/verifier/reg_type.h +++ b/src/verifier/reg_type.h @@ -127,8 +127,8 @@ class RegType { bool CheckWidePair(const RegType& type_h) const { if (IsLowHalf()) { return (type_h.type_ == type_ + 1) || - (IsPreciseConstantLo() && !type_h.IsPreciseConstantHi()) || - (!IsPreciseConstantLo() && type_h.IsPreciseConstantHi()); + (IsPreciseConstantLo() && type_h.IsImpreciseConstantHi()) || + (IsImpreciseConstantLo() && type_h.IsPreciseConstantHi()); } return false; } @@ -141,14 +141,16 @@ class RegType { return type_ == kRegTypePreciseConst; } bool IsPreciseConstantLo() const { - bool result = (type_ == kRegTypePreciseConstLo); - DCHECK(result || (type_ == kRegTypeImpreciseConstLo)); - return result; + return type_ == kRegTypePreciseConstLo; } bool IsPreciseConstantHi() const { - bool result = (type_ == kRegTypePreciseConstHi); - DCHECK(result || (type_ == kRegTypeImpreciseConstHi)); - return result; + return type_ == kRegTypePreciseConstHi; + } + bool IsImpreciseConstantLo() const { + return type_ == kRegTypeImpreciseConstLo; + } + bool IsImpreciseConstantHi() const { + return type_ == kRegTypeImpreciseConstHi; } bool IsConstant() const { return type_ == kRegTypePreciseConst || type_ == kRegTypeImpreciseConst; diff --git a/test/080-oom-throw/src/Main.java b/test/080-oom-throw/src/Main.java index 3d75f3d9af..052feb664b 100644 --- a/test/080-oom-throw/src/Main.java +++ b/test/080-oom-throw/src/Main.java @@ -56,6 +56,8 @@ public class Main { int count = ArrayMemEater.blowup(holder, size); ArrayMemEater.confuseCompilerOptimization(holder); + // Ensure there is some reclaimable memory for println. + holder = null; if (count < size) { System.out.println("Array allocation failed"); } @@ -69,6 +71,8 @@ public class Main { lastMemEater = lastMemEater.next; } while (lastMemEater != null); memEater.confuseCompilerOptimization(memEater); + // Ensure there is some reclaimable memory for println. + memEater = null; System.out.println("Instance allocation failed"); } |