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

Unified Diff: src/transitions.h

Issue 10816005: Swapped transition array and descriptor array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments, and updated additional code comments. 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
« src/bootstrapper.cc ('K') | « src/runtime.cc ('k') | src/transitions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions.h
diff --git a/src/transitions.h b/src/transitions.h
index 57f32535a5a01ebd938ca80513e4ddfe86fa3ea2..d0d761b5de367de35a60bb7694398f007a400120 100644
--- a/src/transitions.h
+++ b/src/transitions.h
@@ -41,8 +41,11 @@ namespace internal {
// TransitionArrays are fixed arrays used to hold map transitions for property,
// constant, and element changes.
// The format of the these objects is:
-// [0] Elements transition
-// [1] First transition
+// [0] Descriptor array
+// [1] Undefined or back pointer map
+// [2] Smi(0) or elements transition map
+// [3] Smi(0) or fixed array of prototype transitions
+// [4] First transition
// [length() - kTransitionSize] Last transition
class TransitionArray: public FixedArray {
public:
@@ -63,6 +66,16 @@ class TransitionArray: public FixedArray {
inline bool HasElementsTransition();
inline void ClearElementsTransition();
+ inline DescriptorArray* descriptors();
+ inline void set_descriptors(DescriptorArray* descriptors,
+ WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
+ inline Object** GetDescriptorsSlot();
+
+ inline Object* back_pointer_storage();
+ inline void set_back_pointer_storage(
+ Object* back_pointer,
+ WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
+
inline FixedArray* GetPrototypeTransitions();
inline void SetPrototypeTransitions(
FixedArray* prototype_transitions,
@@ -106,15 +119,20 @@ class TransitionArray: public FixedArray {
// Constant for denoting key was not found.
static const int kNotFound = -1;
- static const int kElementsTransitionIndex = 0;
- static const int kPrototypeTransitionsIndex = 1;
- static const int kFirstIndex = 2;
+ static const int kDescriptorsIndex = 0;
+ static const int kBackPointerStorageIndex = 1;
+ static const int kElementsTransitionIndex = 2;
+ static const int kPrototypeTransitionsIndex = 3;
+ static const int kFirstIndex = 4;
// Layout transition array header.
- static const int kElementsTransitionOffset = FixedArray::kHeaderSize;
+ static const int kDescriptorsOffset = FixedArray::kHeaderSize;
+ static const int kBackPointerStorageOffset = kDescriptorsOffset +
+ kPointerSize;
+ static const int kElementsTransitionOffset = kBackPointerStorageOffset +
+ kPointerSize;
static const int kPrototypeTransitionsOffset = kElementsTransitionOffset +
kPointerSize;
- static const int kFirstOffset = kPrototypeTransitionsOffset + kPointerSize;
// Layout of map transition.
static const int kTransitionKey = 0;
« src/bootstrapper.cc ('K') | « src/runtime.cc ('k') | src/transitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698