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

Unified Diff: src/objects.h

Issue 11188031: Move DescriptorArray into the map (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove padding area Created 8 years, 2 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 | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index edc85dee0e5c54803432c8e8696c89cc3b2da3f5..91cafddcdcfcb926c44f69ea9261b49f6cd5c413 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2456,11 +2456,12 @@ class FixedDoubleArray: public FixedArrayBase {
// DescriptorArrays are fixed arrays used to hold instance descriptors.
// The format of the these objects is:
-// [0]: Either Smi(0) if uninitialized, or a pointer to small fixed array:
+// [0]: Number of descriptors
+// [1]: Either Smi(0) if uninitialized, or a pointer to small fixed array:
// [0]: pointer to fixed array with enum cache
// [1]: either Smi(0) or pointer to fixed array with indices
-// [1]: first key
-// [length() - kDescriptorSize]: last key
+// [2]: first key
+// [2 + number of descriptors * kDescriptorSize]: start of slack
class DescriptorArray: public FixedArray {
public:
// WhitenessWitness is used to prove that a descriptor array is white
@@ -4808,7 +4809,6 @@ class Map: public HeapObject {
static bool IsValidElementsTransition(ElementsKind from_kind,
ElementsKind to_kind);
- bool StoresOwnDescriptors() { return HasTransitionArray(); }
inline bool HasTransitionArray();
inline bool HasElementsTransition();
inline Map* elements_transition_map();
@@ -4856,13 +4856,8 @@ class Map: public HeapObject {
inline JSFunction* unchecked_constructor();
// [instance descriptors]: describes the object.
- inline DescriptorArray* instance_descriptors();
- MUST_USE_RESULT inline MaybeObject* SetDescriptors(
- DescriptorArray* descriptors);
- static void SetDescriptors(Handle<Map> map,
- Handle<DescriptorArray> descriptors);
- MUST_USE_RESULT inline MaybeObject* InitializeDescriptors(
- DescriptorArray* descriptors);
+ DECL_ACCESSORS(instance_descriptors, DescriptorArray)
+ inline void InitializeDescriptors(DescriptorArray* descriptors);
// [stub cache]: contains stubs compiled for this map.
DECL_ACCESSORS(code_cache, Object)
@@ -5124,11 +5119,12 @@ class Map: public HeapObject {
// indirection.
static const int kTransitionsOrBackPointerOffset =
kConstructorOffset + kPointerSize;
- static const int kCodeCacheOffset =
+ static const int kDescriptorsOffset =
kTransitionsOrBackPointerOffset + kPointerSize;
+ static const int kCodeCacheOffset =
+ kDescriptorsOffset + kPointerSize;
static const int kBitField3Offset = kCodeCacheOffset + kPointerSize;
- static const int kPadStart = kBitField3Offset + kPointerSize;
- static const int kSize = MAP_POINTER_ALIGN(kPadStart);
+ static const int kSize = kBitField3Offset + kPointerSize;
// Layout of pointer fields. Heap iteration code relies on them
// being continuously allocated.
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698