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

Unified Diff: vm/object.h

Issue 12035087: Adapt operator= and operator^= of Smi to be similar to other internal VM classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.h
===================================================================
--- vm/object.h (revision 17615)
+++ vm/object.h (working copy)
@@ -3720,6 +3720,15 @@
RawInteger* ShiftOp(Token::Kind kind, const Smi& other) const;
+ void operator=(RawSmi* value) {
+ raw_ = value;
+ CHECK_HANDLE();
+ }
+ void operator^=(RawObject* value) {
+ raw_ = value;
+ CHECK_HANDLE();
+ }
+
private:
static intptr_t ValueFromRaw(uword raw_value) {
intptr_t value = raw_value;
@@ -3728,7 +3737,9 @@
}
static cpp_vtable handle_vtable_;
- OBJECT_IMPLEMENTATION(Smi, Integer);
+ Smi() : Integer() {}
+ BASE_OBJECT_IMPLEMENTATION(Smi, Integer);
+
friend class Api; // For ValueFromRaw
friend class Class;
friend class Object;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698