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

Unified Diff: runtime/vm/object.h

Issue 10899039: Add compiler error when instantiating abstract class (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | 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
===================================================================
--- runtime/vm/object.h (revision 11549)
+++ runtime/vm/object.h (working copy)
@@ -648,6 +648,11 @@
}
void set_is_interface() const;
+ bool is_abstract() const {
+ return AbstractBit::decode(raw_ptr()->state_bits_);
+ }
+ void set_is_abstract() const;
+
bool is_finalized() const {
return StateBits::decode(raw_ptr()->state_bits_) == RawClass::kFinalized;
}
@@ -716,11 +721,13 @@
enum {
kConstBit = 1,
kInterfaceBit = 2,
- kStateTagBit = 3,
+ kAbstractBit = 3,
+ kStateTagBit = 4,
kStateTagSize = 2,
};
class ConstBit : public BitField<bool, kConstBit, 1> {};
class InterfaceBit : public BitField<bool, kInterfaceBit, 1> {};
+ class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
class StateBits : public BitField<RawClass::ClassState,
kStateTagBit, kStateTagSize> {}; // NOLINT
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698