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

Side by Side Diff: src/objects.h

Issue 1704353002: [runtime] Force internalize names used before lookup in in DescriptorArray and TransitionArray (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment Created 4 years, 10 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
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 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 static const int kFirstOffset = kEnumCacheOffset + kPointerSize; 3031 static const int kFirstOffset = kEnumCacheOffset + kPointerSize;
3032 3032
3033 // Layout description for the bridge array. 3033 // Layout description for the bridge array.
3034 static const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize; 3034 static const int kEnumCacheBridgeCacheOffset = FixedArray::kHeaderSize;
3035 3035
3036 // Layout of descriptor. 3036 // Layout of descriptor.
3037 static const int kDescriptorKey = 0; 3037 static const int kDescriptorKey = 0;
3038 static const int kDescriptorDetails = 1; 3038 static const int kDescriptorDetails = 1;
3039 static const int kDescriptorValue = 2; 3039 static const int kDescriptorValue = 2;
3040 static const int kDescriptorSize = 3; 3040 static const int kDescriptorSize = 3;
3041 static const int kEntrySize = kDescriptorSize;
3041 3042
3042 #if defined(DEBUG) || defined(OBJECT_PRINT) 3043 #if defined(DEBUG) || defined(OBJECT_PRINT)
3043 // For our gdb macros, we should perhaps change these in the future. 3044 // For our gdb macros, we should perhaps change these in the future.
3044 void Print(); 3045 void Print();
3045 3046
3046 // Print all the descriptors. 3047 // Print all the descriptors.
3047 void PrintDescriptors(std::ostream& os); // NOLINT 3048 void PrintDescriptors(std::ostream& os); // NOLINT
3048 #endif 3049 #endif
3049 3050
3050 #ifdef DEBUG 3051 #ifdef DEBUG
(...skipping 5514 matching lines...) Expand 10 before | Expand all | Expand 10 after
8565 // Equality operations. 8566 // Equality operations.
8566 inline bool Equals(Name* other); 8567 inline bool Equals(Name* other);
8567 inline static bool Equals(Handle<Name> one, Handle<Name> two); 8568 inline static bool Equals(Handle<Name> one, Handle<Name> two);
8568 8569
8569 // Conversion. 8570 // Conversion.
8570 inline bool AsArrayIndex(uint32_t* index); 8571 inline bool AsArrayIndex(uint32_t* index);
8571 8572
8572 // If the name is private, it can only name own properties. 8573 // If the name is private, it can only name own properties.
8573 inline bool IsPrivate(); 8574 inline bool IsPrivate();
8574 8575
8575 // If the name is a non-flat string, this method returns a flat version of the 8576 inline bool IsUniqueName() const;
8576 // string. Otherwise it'll just return the input.
8577 static inline Handle<Name> Flatten(Handle<Name> name,
8578 PretenureFlag pretenure = NOT_TENURED);
8579 8577
8580 // Return a string version of this name that is converted according to the 8578 // Return a string version of this name that is converted according to the
8581 // rules described in ES6 section 9.2.11. 8579 // rules described in ES6 section 9.2.11.
8582 MUST_USE_RESULT static MaybeHandle<String> ToFunctionName(Handle<Name> name); 8580 MUST_USE_RESULT static MaybeHandle<String> ToFunctionName(Handle<Name> name);
8583 8581
8584 DECLARE_CAST(Name) 8582 DECLARE_CAST(Name)
8585 8583
8586 DECLARE_PRINTER(Name) 8584 DECLARE_PRINTER(Name)
8587 #if TRACE_MAPS 8585 #if TRACE_MAPS
8588 void NameShortPrint(); 8586 void NameShortPrint();
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after
10837 } 10835 }
10838 return value; 10836 return value;
10839 } 10837 }
10840 }; 10838 };
10841 10839
10842 10840
10843 } // NOLINT, false-positive due to second-order macros. 10841 } // NOLINT, false-positive due to second-order macros.
10844 } // NOLINT, false-positive due to second-order macros. 10842 } // NOLINT, false-positive due to second-order macros.
10845 10843
10846 #endif // V8_OBJECTS_H_ 10844 #endif // V8_OBJECTS_H_
OLDNEW
« src/factory.cc ('K') | « src/lookup.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698