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

Unified Diff: runtime/vm/object.h

Issue 2987183002: [vm] Revise Dart_IntegerToHexCString to avoid dependency on Bigint (Closed)
Patch Set: 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
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index ed2c2c13ce9c63bf2b246838ef52332f122e69b2..c26c7881cde5a0631840ed96cbfff57b14eb049b 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -6461,6 +6461,9 @@ class Integer : public Number {
// Return the most compact presentation of an integer.
RawInteger* AsValidInteger() const;
+ // Converts integer to hex string.
+ virtual const char* ToHexCString(Zone* zone) const;
siva 2017/07/31 22:03:51 Club this with virtual methods listed above. Also
alexmarkov 2017/08/01 15:42:28 Done.
+
// Returns null to indicate that a bigint operation is required.
RawInteger* ArithmeticOp(Token::Kind operation,
const Integer& other,
@@ -6643,7 +6646,7 @@ class Bigint : public Integer {
uint32_t DigitAt(intptr_t index) const;
const char* ToDecCString(Zone* zone) const;
- const char* ToHexCString(Zone* zone) const;
+ virtual const char* ToHexCString(Zone* zone) const;
siva 2017/07/31 22:03:51 Club this with all virtual methods declared above.
alexmarkov 2017/08/01 15:42:28 Done.
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698