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

Unified Diff: runtime/vm/object.h

Issue 735723003: Implement enum types in VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 41810)
+++ runtime/vm/object.h (working copy)
@@ -1172,6 +1172,11 @@
}
void set_is_synthesized_class() const;
+ bool is_enum_class() const {
+ return EnumBit::decode(raw_ptr()->state_bits_);
+ }
+ void set_is_enum_class() const;
+
bool is_finalized() const {
return ClassFinalizedBits::decode(raw_ptr()->state_bits_)
== RawClass::kFinalized;
@@ -1329,6 +1334,7 @@
kMixinTypeAppliedBit = 10,
kFieldsMarkedNullableBit = 11,
kCycleFreeBit = 12,
+ kEnumBit = 13,
};
class ConstBit : public BitField<bool, kConstBit, 1> {};
class ImplementedBit : public BitField<bool, kImplementedBit, 1> {};
@@ -1344,6 +1350,7 @@
class FieldsMarkedNullableBit : public BitField<bool,
kFieldsMarkedNullableBit, 1> {}; // NOLINT
class CycleFreeBit : public BitField<bool, kCycleFreeBit, 1> {};
+ class EnumBit : public BitField<bool, kEnumBit, 1> {};
void set_name(const String& value) const;
void set_pretty_name(const String& value) const;

Powered by Google App Engine
This is Rietveld 408576698