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

Side by Side Diff: src/objects.h

Issue 1203653003: Don't insert elements transitions into normalized maps (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6210 matching lines...) Expand 10 before | Expand all | Expand 10 after
6221 #if TRACE_MAPS 6221 #if TRACE_MAPS
6222 static void TraceTransition(const char* what, Map* from, Map* to, Name* name); 6222 static void TraceTransition(const char* what, Map* from, Map* to, Name* name);
6223 static void TraceAllTransitions(Map* map); 6223 static void TraceAllTransitions(Map* map);
6224 #endif 6224 #endif
6225 6225
6226 static inline Handle<Map> CopyInstallDescriptorsForTesting( 6226 static inline Handle<Map> CopyInstallDescriptorsForTesting(
6227 Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors, 6227 Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors,
6228 Handle<LayoutDescriptor> layout_descriptor); 6228 Handle<LayoutDescriptor> layout_descriptor);
6229 6229
6230 private: 6230 private:
6231 static void ConnectElementsTransition(Handle<Map> parent, Handle<Map> child);
6232 static void ConnectTransition(Handle<Map> parent, Handle<Map> child, 6231 static void ConnectTransition(Handle<Map> parent, Handle<Map> child,
6233 Handle<Name> name, SimpleTransitionFlag flag); 6232 Handle<Name> name, SimpleTransitionFlag flag);
6234 6233
6235 bool EquivalentToForTransition(Map* other); 6234 bool EquivalentToForTransition(Map* other);
6236 static Handle<Map> RawCopy(Handle<Map> map, int instance_size); 6235 static Handle<Map> RawCopy(Handle<Map> map, int instance_size);
6237 static Handle<Map> ShareDescriptor(Handle<Map> map, 6236 static Handle<Map> ShareDescriptor(Handle<Map> map,
6238 Handle<DescriptorArray> descriptors, 6237 Handle<DescriptorArray> descriptors,
6239 Descriptor* descriptor); 6238 Descriptor* descriptor);
6240 static Handle<Map> CopyInstallDescriptors( 6239 static Handle<Map> CopyInstallDescriptors(
6241 Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors, 6240 Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors,
(...skipping 17 matching lines...) Expand all
6259 PropertyAttributes attributes, const char** reason); 6258 PropertyAttributes attributes, const char** reason);
6260 6259
6261 static Handle<Map> CopyNormalized(Handle<Map> map, 6260 static Handle<Map> CopyNormalized(Handle<Map> map,
6262 PropertyNormalizationMode mode); 6261 PropertyNormalizationMode mode);
6263 6262
6264 // Fires when the layout of an object with a leaf map changes. 6263 // Fires when the layout of an object with a leaf map changes.
6265 // This includes adding transitions to the leaf map or changing 6264 // This includes adding transitions to the leaf map or changing
6266 // the descriptor array. 6265 // the descriptor array.
6267 inline void NotifyLeafMapLayoutChange(); 6266 inline void NotifyLeafMapLayoutChange();
6268 6267
6269 static Handle<Map> TransitionElementsToSlow(Handle<Map> object,
6270 ElementsKind to_kind);
6271
6272 void DeprecateTransitionTree(); 6268 void DeprecateTransitionTree();
6273 bool DeprecateTarget(PropertyKind kind, Name* key, 6269 bool DeprecateTarget(PropertyKind kind, Name* key,
6274 PropertyAttributes attributes, 6270 PropertyAttributes attributes,
6275 DescriptorArray* new_descriptors, 6271 DescriptorArray* new_descriptors,
6276 LayoutDescriptor* new_layout_descriptor); 6272 LayoutDescriptor* new_layout_descriptor);
6277 6273
6278 Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors); 6274 Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors);
6279 6275
6280 // Update field type of the given descriptor to new representation and new 6276 // Update field type of the given descriptor to new representation and new
6281 // type. The type must be prepared for storing in descriptor array: 6277 // type. The type must be prepared for storing in descriptor array:
(...skipping 4540 matching lines...) Expand 10 before | Expand all | Expand 10 after
10822 } else { 10818 } else {
10823 value &= ~(1 << bit_position); 10819 value &= ~(1 << bit_position);
10824 } 10820 }
10825 return value; 10821 return value;
10826 } 10822 }
10827 }; 10823 };
10828 10824
10829 } } // namespace v8::internal 10825 } } // namespace v8::internal
10830 10826
10831 #endif // V8_OBJECTS_H_ 10827 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698