Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: runtime/vm/object.h

Issue 2987183002: [vm] Revise Dart_IntegerToHexCString to avoid dependency on Bigint (Closed)
Patch Set: Virtual methods grouped together Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index ed2c2c13ce9c63bf2b246838ef52332f122e69b2..6e20a1bc57dcd9e2d651ed45dbfe015f7ba29b19 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -6458,6 +6458,11 @@ class Integer : public Number {
// Returns 0, -1 or 1.
virtual int CompareWith(const Integer& other) const;
+ // Converts integer to hex string.
+ // TODO(alexmarkov): this method can become non-virtual once Bigint class is
+ // decoupled from Integer hierarchy.
+ virtual const char* ToHexCString(Zone* zone) const;
+
// Return the most compact presentation of an integer.
RawInteger* AsValidInteger() const;
@@ -6615,6 +6620,8 @@ class Bigint : public Integer {
virtual int CompareWith(const Integer& other) const;
+ virtual const char* ToHexCString(Zone* zone) const;
+
virtual bool CheckAndCanonicalizeFields(Thread* thread,
const char** error_str) const;
@@ -6643,7 +6650,6 @@ class Bigint : public Integer {
uint32_t DigitAt(intptr_t index) const;
const char* ToDecCString(Zone* zone) const;
- const char* ToHexCString(Zone* zone) const;
static const intptr_t kBitsPerDigit = 32; // Same as _Bigint._DIGIT_BITS
static const intptr_t kBytesPerDigit = 4;
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698