Chromium Code Reviews

Side by Side Diff: src/objects.h

Issue 2445333002: Ensure slow properties for simple {__proto__:null} literals. (Closed)
Patch Set: fixing typo Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include <memory> 9 #include <memory>
10 10
(...skipping 2778 matching lines...)
2789 inline Object** RawFieldOfElementAt(int index); 2789 inline Object** RawFieldOfElementAt(int index);
2790 2790
2791 DECLARE_CAST(FixedArray) 2791 DECLARE_CAST(FixedArray)
2792 2792
2793 // Maximal allowed size, in bytes, of a single FixedArray. 2793 // Maximal allowed size, in bytes, of a single FixedArray.
2794 // Prevents overflowing size computations, as well as extreme memory 2794 // Prevents overflowing size computations, as well as extreme memory
2795 // consumption. 2795 // consumption.
2796 static const int kMaxSize = 128 * MB * kPointerSize; 2796 static const int kMaxSize = 128 * MB * kPointerSize;
2797 // Maximally allowed length of a FixedArray. 2797 // Maximally allowed length of a FixedArray.
2798 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize; 2798 static const int kMaxLength = (kMaxSize - kHeaderSize) / kPointerSize;
2799 // Maximally allowed length for regular (non large object space) object.
2800 STATIC_ASSERT(kMaxRegularHeapObjectSize < kMaxSize);
2801 static const int kMaxRegularLength =
2802 (kMaxRegularHeapObjectSize - kHeaderSize) / kPointerSize;
2799 2803
2800 // Dispatched behavior. 2804 // Dispatched behavior.
2801 DECLARE_PRINTER(FixedArray) 2805 DECLARE_PRINTER(FixedArray)
2802 DECLARE_VERIFIER(FixedArray) 2806 DECLARE_VERIFIER(FixedArray)
2803 #ifdef DEBUG 2807 #ifdef DEBUG
2804 // Checks if two FixedArrays have identical contents. 2808 // Checks if two FixedArrays have identical contents.
2805 bool IsEqualTo(FixedArray* other); 2809 bool IsEqualTo(FixedArray* other);
2806 #endif 2810 #endif
2807 2811
2808 typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor; 2812 typedef FlexibleBodyDescriptor<kHeaderSize> BodyDescriptor;
(...skipping 3188 matching lines...)
5997 6001
5998 // Returns a non-deprecated version of the input. This method may deprecate 6002 // Returns a non-deprecated version of the input. This method may deprecate
5999 // existing maps along the way if encodings conflict. Not for use while 6003 // existing maps along the way if encodings conflict. Not for use while
6000 // gathering type feedback. Use TryUpdate in those cases instead. 6004 // gathering type feedback. Use TryUpdate in those cases instead.
6001 static Handle<Map> Update(Handle<Map> map); 6005 static Handle<Map> Update(Handle<Map> map);
6002 6006
6003 static inline Handle<Map> CopyInitialMap(Handle<Map> map); 6007 static inline Handle<Map> CopyInitialMap(Handle<Map> map);
6004 static Handle<Map> CopyInitialMap(Handle<Map> map, int instance_size, 6008 static Handle<Map> CopyInitialMap(Handle<Map> map, int instance_size,
6005 int in_object_properties, 6009 int in_object_properties,
6006 int unused_property_fields); 6010 int unused_property_fields);
6011 static Handle<Map> CopyInitialMapNormalized(
6012 Handle<Map> map,
6013 PropertyNormalizationMode mode = CLEAR_INOBJECT_PROPERTIES);
6007 static Handle<Map> CopyDropDescriptors(Handle<Map> map); 6014 static Handle<Map> CopyDropDescriptors(Handle<Map> map);
6008 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, 6015 static Handle<Map> CopyInsertDescriptor(Handle<Map> map,
6009 Descriptor* descriptor, 6016 Descriptor* descriptor,
6010 TransitionFlag flag); 6017 TransitionFlag flag);
6011 6018
6012 static Handle<Object> WrapFieldType(Handle<FieldType> type); 6019 static Handle<Object> WrapFieldType(Handle<FieldType> type);
6013 static FieldType* UnwrapFieldType(Object* wrapped_type); 6020 static FieldType* UnwrapFieldType(Object* wrapped_type);
6014 6021
6015 MUST_USE_RESULT static MaybeHandle<Map> CopyWithField( 6022 MUST_USE_RESULT static MaybeHandle<Map> CopyWithField(
6016 Handle<Map> map, Handle<Name> name, Handle<FieldType> type, 6023 Handle<Map> map, Handle<Name> name, Handle<FieldType> type,
(...skipping 5564 matching lines...)
11581 } 11588 }
11582 }; 11589 };
11583 11590
11584 11591
11585 } // NOLINT, false-positive due to second-order macros. 11592 } // NOLINT, false-positive due to second-order macros.
11586 } // NOLINT, false-positive due to second-order macros. 11593 } // NOLINT, false-positive due to second-order macros.
11587 11594
11588 #include "src/objects/object-macros-undef.h" 11595 #include "src/objects/object-macros-undef.h"
11589 11596
11590 #endif // V8_OBJECTS_H_ 11597 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine