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

Unified Diff: runtime/vm/object.h

Issue 11348259: Canonicalize all integer constants taht we create by parsing a string. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
===================================================================
--- runtime/vm/object.h (revision 15418)
+++ runtime/vm/object.h (working copy)
@@ -3464,7 +3464,9 @@
class Integer : public Number {
public:
- static RawInteger* New(const String& str, Heap::Space space = Heap::kNew);
+ // Returns a canonical Integer object allocated in the old gen space.
+ static RawInteger* NewCanonical(const String& str);
+
static RawInteger* New(int64_t value, Heap::Space space = Heap::kNew);
virtual double AsDoubleValue() const;
@@ -3621,7 +3623,8 @@
return RoundedAllocationSize(sizeof(RawBigint) + (len * kBytesPerElement));
}
- static RawBigint* New(const String& str, Heap::Space space = Heap::kNew);
+ // Returns a canonical Bigint object allocated in the old gen space.
+ static RawBigint* NewCanonical(const String& str);
RawBigint* ArithmeticOp(Token::Kind operation, const Bigint& other) const;

Powered by Google App Engine
This is Rietveld 408576698