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

Unified Diff: src/transitions.h

Issue 10692026: Moving prototype transitions into the header of the transition array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update Created 8 years, 5 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
Index: src/transitions.h
diff --git a/src/transitions.h b/src/transitions.h
index 5abdf99f8c3cdbf72bb5650f6691a5834ff06f39..ba7b4dfbf7233c5441f333470dc85a1af68fe665 100644
--- a/src/transitions.h
+++ b/src/transitions.h
@@ -52,6 +52,12 @@ class TransitionArray: public FixedArray {
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
inline void ClearElementsTransition();
inline bool HasElementsTransition();
+ inline FixedArray* prototype_transitions();
+ inline void set_prototype_transitions(
+ FixedArray* prototype_transitions,
+ WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
+ inline HeapObject* unchecked_prototype_transitions();
+ inline bool HasPrototypeTransitions();
// Accessors for fetching instance transition at transition number.
inline String* GetKey(int transition_number);
inline Object** GetKeySlot(int transition_number);
@@ -62,6 +68,8 @@ class TransitionArray: public FixedArray {
inline Map* GetTargetMap(int transition_number);
inline PropertyDetails GetTargetDetails(int transition_number);
inline Object** GetElementsSlot();
+ inline Object** GetPrototypeTransitionsSlot();
Michael Starzinger 2012/07/06 13:53:18 Can we group these accessors somehow, this is beco
Toon Verwaest 2012/07/09 12:45:27 Done.
+ bool TransitionsTo(Object* target);
// Returns the number of transitions in the array.
int number_of_transitions() {
@@ -99,11 +107,14 @@ class TransitionArray: public FixedArray {
static const int kNotFound = -1;
static const int kElementsTransitionIndex = 0;
- static const int kFirstIndex = 1;
+ static const int kPrototypeTransitionsIndex = 1;
+ static const int kFirstIndex = 2;
// Layout transition array header.
static const int kElementsTransitionOffset = FixedArray::kHeaderSize;
- static const int kFirstOffset = kElementsTransitionOffset + kPointerSize;
+ static const int kPrototypeTransitionsOffset = kElementsTransitionOffset +
Michael Starzinger 2012/07/06 13:53:18 Better break that after the "=", to be consistent
+ kPointerSize;
+ static const int kFirstOffset = kPrototypeTransitionsOffset + kPointerSize;
// Layout of map transition.
static const int kTransitionKey = 0;
« src/objects-inl.h ('K') | « src/profile-generator.cc ('k') | src/transitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698