Index: src/hydrogen-instructions.cc |
=================================================================== |
--- src/hydrogen-instructions.cc (revision 9858) |
+++ src/hydrogen-instructions.cc (working copy) |
@@ -126,7 +126,9 @@ |
bool may_overflow = false; // Overflow is ignored here. |
lower_ = AddWithoutOverflow(lower_, value, &may_overflow); |
upper_ = AddWithoutOverflow(upper_, value, &may_overflow); |
+#ifdef DEBUG |
Verify(); |
+#endif |
} |
@@ -173,7 +175,9 @@ |
lower_ = AddWithoutOverflow(lower_, other->lower(), &may_overflow); |
upper_ = AddWithoutOverflow(upper_, other->upper(), &may_overflow); |
KeepOrder(); |
+#ifdef DEBUG |
Verify(); |
+#endif |
return may_overflow; |
} |
@@ -183,7 +187,9 @@ |
lower_ = SubWithoutOverflow(lower_, other->upper(), &may_overflow); |
upper_ = SubWithoutOverflow(upper_, other->lower(), &may_overflow); |
KeepOrder(); |
+#ifdef DEBUG |
Verify(); |
+#endif |
return may_overflow; |
} |
@@ -197,9 +203,11 @@ |
} |
+#ifdef DEBUG |
void Range::Verify() const { |
ASSERT(lower_ <= upper_); |
} |
+#endif |
bool Range::MulAndCheckOverflow(Range* other) { |
@@ -210,7 +218,9 @@ |
int v4 = MulWithoutOverflow(upper_, other->upper(), &may_overflow); |
lower_ = Min(Min(v1, v2), Min(v3, v4)); |
upper_ = Max(Max(v1, v2), Max(v3, v4)); |
+#ifdef DEBUG |
Verify(); |
+#endif |
return may_overflow; |
} |
@@ -234,25 +244,6 @@ |
} |
-const char* HType::ToShortString() { |
- switch (type_) { |
- case kTagged: return "t"; |
- case kTaggedPrimitive: return "p"; |
- case kTaggedNumber: return "n"; |
- case kSmi: return "m"; |
- case kHeapNumber: return "h"; |
- case kString: return "s"; |
- case kBoolean: return "b"; |
- case kNonPrimitive: return "r"; |
- case kJSArray: return "a"; |
- case kJSObject: return "o"; |
- case kUninitialized: return "z"; |
- } |
- UNREACHABLE(); |
- return "Unreachable code"; |
-} |
- |
- |
HType HType::TypeFromValue(Handle<Object> value) { |
HType result = HType::Tagged(); |
if (value->IsSmi()) { |