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

Side by Side Diff: src/objects.h

Issue 661133002: TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 5801 matching lines...) Expand 10 before | Expand all | Expand 10 after
5812 5812
5813 // Returns true if the current map doesn't have DICTIONARY_ELEMENTS but if a 5813 // Returns true if the current map doesn't have DICTIONARY_ELEMENTS but if a
5814 // map with DICTIONARY_ELEMENTS was found in the prototype chain. 5814 // map with DICTIONARY_ELEMENTS was found in the prototype chain.
5815 bool DictionaryElementsInPrototypeChainOnly(); 5815 bool DictionaryElementsInPrototypeChainOnly();
5816 5816
5817 inline bool HasTransitionArray() const; 5817 inline bool HasTransitionArray() const;
5818 inline bool HasElementsTransition(); 5818 inline bool HasElementsTransition();
5819 inline Map* elements_transition_map(); 5819 inline Map* elements_transition_map();
5820 5820
5821 inline Map* GetTransition(int transition_index); 5821 inline Map* GetTransition(int transition_index);
5822 inline int SearchTransition(Name* name); 5822 inline int SearchSpecialTransition(Symbol* name);
5823 inline int SearchTransition(PropertyType type, Name* name,
5824 PropertyAttributes attributes);
5823 inline FixedArrayBase* GetInitialElements(); 5825 inline FixedArrayBase* GetInitialElements();
5824 5826
5825 DECL_ACCESSORS(transitions, TransitionArray) 5827 DECL_ACCESSORS(transitions, TransitionArray)
5826 5828
5827 static inline Handle<String> ExpectedTransitionKey(Handle<Map> map); 5829 static inline Handle<String> ExpectedTransitionKey(Handle<Map> map);
5828 static inline Handle<Map> ExpectedTransitionTarget(Handle<Map> map); 5830 static inline Handle<Map> ExpectedTransitionTarget(Handle<Map> map);
5829 5831
5830 // Try to follow an existing transition to a field with attributes NONE. The 5832 // Try to follow an existing transition to a field with attributes NONE. The
5831 // return value indicates whether the transition was successful. 5833 // return value indicates whether the transition was successful.
5832 static inline Handle<Map> FindTransitionToField(Handle<Map> map, 5834 static inline Handle<Map> FindTransitionToField(Handle<Map> map,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
5950 cache->set(kProtoTransitionNumberOfEntriesOffset, Smi::FromInt(value)); 5952 cache->set(kProtoTransitionNumberOfEntriesOffset, Smi::FromInt(value));
5951 } 5953 }
5952 5954
5953 // Lookup in the map's instance descriptors and fill out the result 5955 // Lookup in the map's instance descriptors and fill out the result
5954 // with the given holder if the name is found. The holder may be 5956 // with the given holder if the name is found. The holder may be
5955 // NULL when this function is used from the compiler. 5957 // NULL when this function is used from the compiler.
5956 inline void LookupDescriptor(JSObject* holder, 5958 inline void LookupDescriptor(JSObject* holder,
5957 Name* name, 5959 Name* name,
5958 LookupResult* result); 5960 LookupResult* result);
5959 5961
5960 inline void LookupTransition(JSObject* holder, 5962 inline void LookupTransition(JSObject* holder, Name* name,
5961 Name* name, 5963 PropertyAttributes attributes,
5962 LookupResult* result); 5964 LookupResult* result);
5963 5965
5964 inline PropertyDetails GetLastDescriptorDetails(); 5966 inline PropertyDetails GetLastDescriptorDetails();
5965 5967
5966 // The size of transition arrays are limited so they do not end up in large 5968 // The size of transition arrays are limited so they do not end up in large
5967 // object space. Otherwise ClearNonLiveTransitions would leak memory while 5969 // object space. Otherwise ClearNonLiveTransitions would leak memory while
5968 // applying in-place right trimming. 5970 // applying in-place right trimming.
5969 inline bool CanHaveMoreTransitions(); 5971 inline bool CanHaveMoreTransitions();
5970 5972
5971 int LastAdded() { 5973 int LastAdded() {
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
6352 // Zaps the contents of backing data structures. Note that the 6354 // Zaps the contents of backing data structures. Note that the
6353 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects 6355 // heap verifier (i.e. VerifyMarkingVisitor) relies on zapping of objects
6354 // holding weak references when incremental marking is used, because it also 6356 // holding weak references when incremental marking is used, because it also
6355 // iterates over objects that are otherwise unreachable. 6357 // iterates over objects that are otherwise unreachable.
6356 // In general we only want to call these functions in release mode when 6358 // In general we only want to call these functions in release mode when
6357 // heap verification is turned on. 6359 // heap verification is turned on.
6358 void ZapPrototypeTransitions(); 6360 void ZapPrototypeTransitions();
6359 void ZapTransitions(); 6361 void ZapTransitions();
6360 6362
6361 void DeprecateTransitionTree(); 6363 void DeprecateTransitionTree();
6362 void DeprecateTarget(Name* key, DescriptorArray* new_descriptors); 6364 void DeprecateTarget(PropertyType type, Name* key,
6365 PropertyAttributes attributes,
6366 DescriptorArray* new_descriptors);
6363 6367
6364 Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors); 6368 Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors);
6365 6369
6366 void UpdateFieldType(int descriptor_number, Handle<Name> name, 6370 void UpdateFieldType(int descriptor_number, Handle<Name> name,
6367 Handle<HeapType> new_type); 6371 Handle<HeapType> new_type);
6368 6372
6369 void PrintGeneralization(FILE* file, 6373 void PrintGeneralization(FILE* file,
6370 const char* reason, 6374 const char* reason,
6371 int modify_index, 6375 int modify_index,
6372 int split, 6376 int split,
(...skipping 4544 matching lines...) Expand 10 before | Expand all | Expand 10 after
10917 } else { 10921 } else {
10918 value &= ~(1 << bit_position); 10922 value &= ~(1 << bit_position);
10919 } 10923 }
10920 return value; 10924 return value;
10921 } 10925 }
10922 }; 10926 };
10923 10927
10924 } } // namespace v8::internal 10928 } } // namespace v8::internal
10925 10929
10926 #endif // V8_OBJECTS_H_ 10930 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.cc » ('j') | src/transitions-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698