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

Unified Diff: src/transitions.h

Issue 11093026: Reapply descriptor array sharing. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: fix long line 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/string-stream.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 aca877d4417ce1b9f03c0cbcb9016871de17c271..b87b9730303aa32274885c2b6309cdc1679833e4 100644
--- a/src/transitions.h
+++ b/src/transitions.h
@@ -72,9 +72,9 @@ class TransitionArray: public FixedArray {
inline void ClearElementsTransition();
inline DescriptorArray* descriptors();
- inline void set_descriptors(DescriptorArray* descriptors,
- WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
- inline Object** GetDescriptorsSlot();
+ inline void set_descriptors(DescriptorArray* descriptors);
+ inline JSGlobalPropertyCell* descriptors_pointer();
+ inline void set_descriptors_pointer(JSGlobalPropertyCell* pointer);
inline Object* back_pointer_storage();
inline void set_back_pointer_storage(
@@ -99,7 +99,11 @@ class TransitionArray: public FixedArray {
inline int number_of_entries() { return number_of_transitions(); }
// Allocate a new transition array with a single entry.
- static MUST_USE_RESULT MaybeObject* NewWith(String* name, Map* target);
+ static MUST_USE_RESULT MaybeObject* NewWith(
+ String* name,
+ Map* target,
+ JSGlobalPropertyCell* descriptor_pointer,
+ Object* back_pointer);
// Copy the transition array, inserting a new transition.
// TODO(verwaest): This should not cause an existing transition to be
@@ -115,7 +119,9 @@ class TransitionArray: public FixedArray {
inline int Search(String* name);
// Allocates a TransitionArray.
- MUST_USE_RESULT static MaybeObject* Allocate(int number_of_transitions);
+ MUST_USE_RESULT static MaybeObject* Allocate(
+ int number_of_transitions,
+ JSGlobalPropertyCell* descriptors_cell);
// Casting.
static inline TransitionArray* cast(Object* obj);
@@ -123,15 +129,15 @@ class TransitionArray: public FixedArray {
// Constant for denoting key was not found.
static const int kNotFound = -1;
- static const int kDescriptorsIndex = 0;
+ static const int kDescriptorsPointerIndex = 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 kDescriptorsOffset = FixedArray::kHeaderSize;
- static const int kBackPointerStorageOffset = kDescriptorsOffset +
+ static const int kDescriptorsPointerOffset = FixedArray::kHeaderSize;
+ static const int kBackPointerStorageOffset = kDescriptorsPointerOffset +
kPointerSize;
static const int kElementsTransitionOffset = kBackPointerStorageOffset +
kPointerSize;
@@ -152,7 +158,7 @@ class TransitionArray: public FixedArray {
#endif
#ifdef DEBUG
- bool IsSortedNoDuplicates();
+ bool IsSortedNoDuplicates(int valid_entries = -1);
bool IsConsistentWithBackPointers(Map* current_map);
bool IsEqualTo(TransitionArray* other);
#endif
« no previous file with comments | « src/string-stream.cc ('k') | src/transitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698