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

Side by Side Diff: src/objects.h

Issue 294083002: Simplify declaration of KindSpecificFlags1 fields. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 #include "assert-scope.h" 9 #include "assert-scope.h"
10 #include "builtins.h" 10 #include "builtins.h"
(...skipping 5689 matching lines...) Expand 10 before | Expand all | Expand 10 after
5700 class TypeField: public BitField<StubType, 3, 1> {}; 5700 class TypeField: public BitField<StubType, 3, 1> {};
5701 class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {}; 5701 class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {};
5702 class KindField: public BitField<Kind, 6, 4> {}; 5702 class KindField: public BitField<Kind, 6, 4> {};
5703 // TODO(bmeurer): Bit 10 is available for free use. :-) 5703 // TODO(bmeurer): Bit 10 is available for free use. :-)
5704 class ExtraICStateField: public BitField<ExtraICState, 11, 5704 class ExtraICStateField: public BitField<ExtraICState, 11,
5705 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT 5705 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT
5706 5706
5707 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) 5707 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION)
5708 static const int kStackSlotsFirstBit = 0; 5708 static const int kStackSlotsFirstBit = 0;
5709 static const int kStackSlotsBitCount = 24; 5709 static const int kStackSlotsBitCount = 24;
5710 static const int kHasFunctionCacheFirstBit = 5710 static const int kHasFunctionCacheBit =
5711 kStackSlotsFirstBit + kStackSlotsBitCount; 5711 kStackSlotsFirstBit + kStackSlotsBitCount + 0;
5712 static const int kHasFunctionCacheBitCount = 1; 5712 static const int kMarkedForDeoptimizationBit =
5713 static const int kMarkedForDeoptimizationFirstBit =
5714 kStackSlotsFirstBit + kStackSlotsBitCount + 1; 5713 kStackSlotsFirstBit + kStackSlotsBitCount + 1;
5715 static const int kMarkedForDeoptimizationBitCount = 1; 5714 static const int kWeakStubBit =
5716 static const int kWeakStubFirstBit = 5715 kStackSlotsFirstBit + kStackSlotsBitCount + 2;
5717 kMarkedForDeoptimizationFirstBit + kMarkedForDeoptimizationBitCount; 5716 static const int kInvalidatedWeakStubBit =
5718 static const int kWeakStubBitCount = 1; 5717 kStackSlotsFirstBit + kStackSlotsBitCount + 3;
5719 static const int kInvalidatedWeakStubFirstBit =
5720 kWeakStubFirstBit + kWeakStubBitCount;
5721 static const int kInvalidatedWeakStubBitCount = 1;
5722 5718
5723 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); 5719 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32);
5724 STATIC_ASSERT(kHasFunctionCacheFirstBit + kHasFunctionCacheBitCount <= 32); 5720 STATIC_ASSERT(kInvalidatedWeakStubBit + 1 <= 32);
5725 STATIC_ASSERT(kInvalidatedWeakStubFirstBit +
5726 kInvalidatedWeakStubBitCount <= 32);
5727 5721
5728 class StackSlotsField: public BitField<int, 5722 class StackSlotsField: public BitField<int,
5729 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT 5723 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT
5730 class HasFunctionCacheField: public BitField<bool, 5724 class HasFunctionCacheField: public BitField<bool,
5731 kHasFunctionCacheFirstBit, kHasFunctionCacheBitCount> {}; // NOLINT 5725 kHasFunctionCacheBit, 1> {}; // NOLINT
5732 class MarkedForDeoptimizationField: public BitField<bool, 5726 class MarkedForDeoptimizationField: public BitField<bool,
5733 kMarkedForDeoptimizationFirstBit, 5727 kMarkedForDeoptimizationBit, 1> {}; // NOLINT
5734 kMarkedForDeoptimizationBitCount> {}; // NOLINT
5735 class WeakStubField: public BitField<bool, 5728 class WeakStubField: public BitField<bool,
5736 kWeakStubFirstBit, 5729 kWeakStubBit, 1> {}; // NOLINT
5737 kWeakStubBitCount> {}; // NOLINT
5738 class InvalidatedWeakStubField: public BitField<bool, 5730 class InvalidatedWeakStubField: public BitField<bool,
5739 kInvalidatedWeakStubFirstBit, 5731 kInvalidatedWeakStubBit, 1> {}; // NOLINT
5740 kInvalidatedWeakStubBitCount> {}; // NOLINT
5741 5732
5742 // KindSpecificFlags2 layout (ALL) 5733 // KindSpecificFlags2 layout (ALL)
5743 static const int kIsCrankshaftedBit = 0; 5734 static const int kIsCrankshaftedBit = 0;
5744 class IsCrankshaftedField: public BitField<bool, 5735 class IsCrankshaftedField: public BitField<bool,
5745 kIsCrankshaftedBit, 1> {}; // NOLINT 5736 kIsCrankshaftedBit, 1> {}; // NOLINT
5746 5737
5747 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) 5738 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION)
5748 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1; 5739 static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1;
5749 static const int kSafepointTableOffsetFirstBit = 5740 static const int kSafepointTableOffsetFirstBit =
5750 kStubMajorKeyFirstBit + kStubMajorKeyBits; 5741 kStubMajorKeyFirstBit + kStubMajorKeyBits;
(...skipping 5366 matching lines...) Expand 10 before | Expand all | Expand 10 after
11117 } else { 11108 } else {
11118 value &= ~(1 << bit_position); 11109 value &= ~(1 << bit_position);
11119 } 11110 }
11120 return value; 11111 return value;
11121 } 11112 }
11122 }; 11113 };
11123 11114
11124 } } // namespace v8::internal 11115 } } // namespace v8::internal
11125 11116
11126 #endif // V8_OBJECTS_H_ 11117 #endif // V8_OBJECTS_H_
OLDNEW
« 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