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

Unified Diff: vm/raw_object.h

Issue 10831248: 1. Write out only the kind_tag_ field of a function in the snapshot instead of the individual bits … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 | « vm/object.cc ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/raw_object.h
===================================================================
--- vm/raw_object.h (revision 10450)
+++ vm/raw_object.h (working copy)
@@ -558,83 +558,6 @@
private:
RAW_HEAP_OBJECT_IMPLEMENTATION(Function);
- enum KindTagBits {
- kStaticBit = 1,
- kConstBit,
- kOptimizableBit,
- kHasFinallyBit,
- kNativeBit,
- kAbstractBit,
- kExternalBit,
- kKindTagBit,
- kKindTagSize = 4,
- };
- class StaticBit : public BitField<bool, kStaticBit, 1> {};
- class ConstBit : public BitField<bool, kConstBit, 1> {};
- class OptimizableBit : public BitField<bool, kOptimizableBit, 1> {};
- class HasFinallyBit : public BitField<bool, kHasFinallyBit, 1> {};
- class NativeBit : public BitField<bool, kNativeBit, 1> {};
- class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
- class ExternalBit : public BitField<bool, kExternalBit, 1> {};
- class KindBits : public BitField<Kind, kKindTagBit, kKindTagSize> {};
-
- bool IsStatic() const {
- return StaticBit::decode(ptr()->kind_tag_);
- }
- void SetIsStatic(bool value) {
- uword bits = ptr()->kind_tag_;
- ptr()->kind_tag_ = StaticBit::update(value, bits);
- }
- bool IsConst() const {
- return ConstBit::decode(ptr()->kind_tag_);
- }
- void SetIsConst(bool value) {
- uword bits = ptr()->kind_tag_;
- ptr()->kind_tag_ = ConstBit::update(value, bits);
- }
- bool IsOptimizable() const {
- return OptimizableBit::decode(ptr()->kind_tag_);
- }
- void SetIsOptimizable(bool value) {
- uword bits = ptr()->kind_tag_;
- ptr()->kind_tag_ = OptimizableBit::update(value, bits);
- }
- bool HasFinally() const {
- return HasFinallyBit::decode(ptr()->kind_tag_);
- }
- void SetHasFinally(bool value) {
- uword bits = ptr()->kind_tag_;
- ptr()->kind_tag_ = HasFinallyBit::update(value, bits);
- }
- bool IsNative() const {
- return NativeBit::decode(ptr()->kind_tag_);
- }
- void SetIsNative(bool value) {
- uword bits = ptr()->kind_tag_;
- ptr()->kind_tag_ = NativeBit::update(value, bits);
- }
- bool IsAbstract() const {
- return AbstractBit::decode(ptr()->kind_tag_);
- }
- void SetIsAbstract(bool value) {
- uword bits = ptr()->kind_tag_;
- ptr()->kind_tag_ = AbstractBit::update(value, bits);
- }
- bool IsExternal() const {
- return ExternalBit::decode(ptr()->kind_tag_);
- }
- void SetIsExternal(bool value) {
- uword bits = ptr()->kind_tag_;
- ptr()->kind_tag_ = ExternalBit::update(value, bits);
- }
- Kind GetKind() const {
- return KindBits::decode(ptr()->kind_tag_);
- }
- void SetKind(Kind value) {
- uword bits = ptr()->kind_tag_;
- ptr()->kind_tag_ = KindBits::update(value, bits);
- }
-
RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); }
RawString* name_;
RawClass* owner_;
« no previous file with comments | « vm/object.cc ('k') | vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698