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

Unified Diff: vm/object.h

Issue 8963001: Add Double::NewCanonical and Mint::NewCanonical so that it is possible to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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 | « no previous file | vm/object.cc » ('j') | vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.h
===================================================================
--- vm/object.h (revision 2470)
+++ vm/object.h (working copy)
@@ -608,6 +608,9 @@
}
void set_allocation_stub(const Code& value) const;
+ void set_constants(const Array& value) const;
+ RawArray* constants() const;
+
void Finalize() const;
// Allocate a class used for VM internal objects.
@@ -646,9 +649,6 @@
void set_signature_type(const AbstractType& value) const;
void set_class_state(int8_t state) const;
- void set_constants(const Array& value) const;
- RawArray* constants() const;
-
void set_canonical_types(const Array& value) const;
RawArray* canonical_types() const;
@@ -2355,6 +2355,7 @@
virtual int CompareWith(const Integer& other) const;
static RawMint* New(int64_t value, Heap::Space space = Heap::kNew);
+ static RawMint* NewCanonical(int64_t value);
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawMint));
@@ -2433,10 +2434,17 @@
return raw_ptr()->value_;
}
+ bool Equals(double value) const;
srdjan 2011/12/15 22:02:26 Please give this one a different name, e.g. Equals
siva 2011/12/15 23:42:54 Done.
+ virtual bool Equals(const Instance& other) const;
+
static RawDouble* New(double d, Heap::Space space = Heap::kNew);
static RawDouble* New(const String& str, Heap::Space space = Heap::kNew);
+ static RawDouble* NewCanonical(double d);
srdjan 2011/12/15 22:02:26 Please use different names, e.g., NewCanonicalFrom
siva 2011/12/15 23:42:54 This style seems to go against the style we have u
+
+ static RawDouble* NewCanonical(const String& str);
srdjan 2011/12/15 22:02:26 Need to comment that a Double::null() is returned
siva 2011/12/15 23:42:54 Done.
+
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawDouble));
}
« no previous file with comments | « no previous file | vm/object.cc » ('j') | vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698