Index: src/compiler/instruction.h |
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h |
index 6d37b9f6932eec59d0c78e8db3db8687c137f0cb..75c3e9e34b0f94c0f1fc6fbe51e8d9727c2df756 100644 |
--- a/src/compiler/instruction.h |
+++ b/src/compiler/instruction.h |
@@ -675,8 +675,10 @@ class Constant FINAL { |
Type type() const { return type_; } |
int32_t ToInt32() const { |
- DCHECK_EQ(kInt32, type()); |
- return static_cast<int32_t>(value_); |
+ DCHECK(type() == kInt32 || type() == kInt64); |
+ const int32_t value = static_cast<int32_t>(value_); |
+ DCHECK_EQ(value_, static_cast<int64_t>(value)); |
+ return value; |
} |
int64_t ToInt64() const { |