Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 2cac9f950c190b2a57177b881cffb6db21bb2538..d1b188a1065a65122be9dafa4072899cb07673fc 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -18241,6 +18241,16 @@ RawInteger* Integer::AsValidInteger() const { |
return raw(); |
} |
+const char* Integer::ToHexCString(Zone* zone) const { |
+ ASSERT(IsSmi() || IsMint()); // Bigint has its own implementation. |
+ int64_t value = AsInt64Value(); |
+ if (value < 0) { |
+ return OS::SCreate(zone, "-0x%" PX64, static_cast<uint64_t>(-value)); |
+ } else { |
+ return OS::SCreate(zone, "0x%" PX64, static_cast<uint64_t>(value)); |
+ } |
+} |
+ |
RawInteger* Integer::ArithmeticOp(Token::Kind operation, |
const Integer& other, |
Heap::Space space) const { |