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

Unified Diff: src/objects.h

Issue 10575032: In-place shrinking of descriptor arrays with non-live transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments Created 8 years, 6 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/objects.h
diff --git a/src/objects.h b/src/objects.h
index 692df446e262460e0f52f4dc899612f1d43451ad..df35d754ca539cd6c4820ea01c8d276d44f0766c 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2501,9 +2501,13 @@ class DescriptorArray: public FixedArray {
// Accessors for fetching instance descriptor at descriptor number.
inline String* GetKey(int descriptor_number);
inline Object** GetKeySlot(int descriptor_number);
+ inline void SetKeyUnchecked(Heap* heap, int descriptor_number, String* value);
inline Object* GetValue(int descriptor_number);
inline Object** GetValueSlot(int descriptor_number);
- inline void SetNullValueUnchecked(int descriptor_number, Heap* heap);
+ inline void SetNullValueUnchecked(Heap* heap, int descriptor_number);
+ inline void SetValueUnchecked(Heap* heap,
+ int descriptor_number,
+ Object* value);
inline PropertyDetails GetDetails(int descriptor_number);
inline void SetDetailsUnchecked(int descriptor_number, Smi* value);
inline PropertyType GetType(int descriptor_number);
@@ -2513,7 +2517,6 @@ class DescriptorArray: public FixedArray {
inline AccessorDescriptor* GetCallbacks(int descriptor_number);
inline bool IsProperty(int descriptor_number);
inline bool IsTransitionOnly(int descriptor_number);
- inline bool IsNullDescriptor(int descriptor_number);
// WhitenessWitness is used to prove that a specific descriptor array is white
// (unmarked), so incremental write barriers can be skipped because the
@@ -4769,6 +4772,10 @@ class Map: public HeapObject {
// [instance descriptors]: describes the object.
DECL_ACCESSORS(instance_descriptors, DescriptorArray)
+ // Should only be called to clear a descriptor array that was only used to
+ // store transitions, which does not contain any live transitions anymore.
Michael Starzinger 2012/06/25 12:48:38 "[...] store transitions and does not [...]"
+ inline void ClearDescriptorArray();
+
// Sets the instance descriptor array for the map to be an empty descriptor
// array.
inline void clear_instance_descriptors();

Powered by Google App Engine
This is Rietveld 408576698