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

Side by Side Diff: src/objects.h

Issue 694533003: Add FLAG_trace_maps (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 1 month 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
« no previous file with comments | « src/isolate.cc ('k') | 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 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 ElementsKind to_kind); 2042 ElementsKind to_kind);
2043 2043
2044 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map); 2044 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map);
2045 2045
2046 // Convert the object to use the canonical dictionary 2046 // Convert the object to use the canonical dictionary
2047 // representation. If the object is expected to have additional properties 2047 // representation. If the object is expected to have additional properties
2048 // added this number can be indicated to have the backing store allocated to 2048 // added this number can be indicated to have the backing store allocated to
2049 // an initial capacity for holding these properties. 2049 // an initial capacity for holding these properties.
2050 static void NormalizeProperties(Handle<JSObject> object, 2050 static void NormalizeProperties(Handle<JSObject> object,
2051 PropertyNormalizationMode mode, 2051 PropertyNormalizationMode mode,
2052 int expected_additional_properties); 2052 int expected_additional_properties,
2053 const char* reason);
2053 2054
2054 // Convert and update the elements backing store to be a 2055 // Convert and update the elements backing store to be a
2055 // SeededNumberDictionary dictionary. Returns the backing after conversion. 2056 // SeededNumberDictionary dictionary. Returns the backing after conversion.
2056 static Handle<SeededNumberDictionary> NormalizeElements( 2057 static Handle<SeededNumberDictionary> NormalizeElements(
2057 Handle<JSObject> object); 2058 Handle<JSObject> object);
2058 2059
2059 // Transform slow named properties to fast variants. 2060 // Transform slow named properties to fast variants.
2060 static void MigrateSlowToFast(Handle<JSObject> object, 2061 static void MigrateSlowToFast(Handle<JSObject> object,
2061 int unused_property_fields); 2062 int unused_property_fields, const char* reason);
2062 2063
2063 // Access fast-case object properties at index. 2064 // Access fast-case object properties at index.
2064 static Handle<Object> FastPropertyAt(Handle<JSObject> object, 2065 static Handle<Object> FastPropertyAt(Handle<JSObject> object,
2065 Representation representation, 2066 Representation representation,
2066 FieldIndex index); 2067 FieldIndex index);
2067 inline Object* RawFastPropertyAt(FieldIndex index); 2068 inline Object* RawFastPropertyAt(FieldIndex index);
2068 inline void FastPropertyAtPut(FieldIndex index, Object* value); 2069 inline void FastPropertyAtPut(FieldIndex index, Object* value);
2069 void WriteToField(int descriptor, Object* value); 2070 void WriteToField(int descriptor, Object* value);
2070 2071
2071 // Access to in object properties. 2072 // Access to in object properties.
(...skipping 3799 matching lines...) Expand 10 before | Expand all | Expand 10 after
5871 static Handle<Map> CopyGeneralizeAllRepresentations( 5872 static Handle<Map> CopyGeneralizeAllRepresentations(
5872 Handle<Map> map, 5873 Handle<Map> map,
5873 int modify_index, 5874 int modify_index,
5874 StoreMode store_mode, 5875 StoreMode store_mode,
5875 const char* reason); 5876 const char* reason);
5876 5877
5877 static Handle<Map> PrepareForDataProperty(Handle<Map> old_map, 5878 static Handle<Map> PrepareForDataProperty(Handle<Map> old_map,
5878 int descriptor_number, 5879 int descriptor_number,
5879 Handle<Object> value); 5880 Handle<Object> value);
5880 5881
5881 static Handle<Map> Normalize(Handle<Map> map, PropertyNormalizationMode mode); 5882 static Handle<Map> Normalize(Handle<Map> map, PropertyNormalizationMode mode,
5883 const char* reason);
5882 5884
5883 // Returns the constructor name (the name (possibly, inferred name) of the 5885 // Returns the constructor name (the name (possibly, inferred name) of the
5884 // function that was used to instantiate the object). 5886 // function that was used to instantiate the object).
5885 String* constructor_name(); 5887 String* constructor_name();
5886 5888
5887 // Tells whether the map is used for JSObjects in dictionary mode (ie 5889 // Tells whether the map is used for JSObjects in dictionary mode (ie
5888 // normalized objects, ie objects for which HasFastProperties returns false). 5890 // normalized objects, ie objects for which HasFastProperties returns false).
5889 // A map can never be used for both dictionary mode and fast mode JSObjects. 5891 // A map can never be used for both dictionary mode and fast mode JSObjects.
5890 // False by default and for HeapObjects that are not JSObjects. 5892 // False by default and for HeapObjects that are not JSObjects.
5891 inline void set_dictionary_map(bool value); 5893 inline void set_dictionary_map(bool value);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
6080 static Handle<Map> TransitionToAccessorProperty( 6082 static Handle<Map> TransitionToAccessorProperty(
6081 Handle<Map> map, Handle<Name> name, AccessorComponent component, 6083 Handle<Map> map, Handle<Name> name, AccessorComponent component,
6082 Handle<Object> accessor, PropertyAttributes attributes); 6084 Handle<Object> accessor, PropertyAttributes attributes);
6083 static Handle<Map> ReconfigureDataProperty(Handle<Map> map, int descriptor, 6085 static Handle<Map> ReconfigureDataProperty(Handle<Map> map, int descriptor,
6084 PropertyAttributes attributes); 6086 PropertyAttributes attributes);
6085 6087
6086 inline void AppendDescriptor(Descriptor* desc); 6088 inline void AppendDescriptor(Descriptor* desc);
6087 6089
6088 // Returns a copy of the map, with all transitions dropped from the 6090 // Returns a copy of the map, with all transitions dropped from the
6089 // instance descriptors. 6091 // instance descriptors.
6090 static Handle<Map> Copy(Handle<Map> map); 6092 static Handle<Map> Copy(Handle<Map> map, const char* reason);
6091 static Handle<Map> Create(Isolate* isolate, int inobject_properties); 6093 static Handle<Map> Create(Isolate* isolate, int inobject_properties);
6092 6094
6093 // Returns the next free property index (only valid for FAST MODE). 6095 // Returns the next free property index (only valid for FAST MODE).
6094 int NextFreePropertyIndex(); 6096 int NextFreePropertyIndex();
6095 6097
6096 // Returns the number of properties described in instance_descriptors 6098 // Returns the number of properties described in instance_descriptors
6097 // filtering out properties with the specified attributes. 6099 // filtering out properties with the specified attributes.
6098 int NumberOfDescribedProperties(DescriptorFlag which = OWN_DESCRIPTORS, 6100 int NumberOfDescribedProperties(DescriptorFlag which = OWN_DESCRIPTORS,
6099 PropertyAttributes filter = NONE); 6101 PropertyAttributes filter = NONE);
6100 6102
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
6308 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset, 6310 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset,
6309 kPointerFieldsEndOffset, 6311 kPointerFieldsEndOffset,
6310 kSize> BodyDescriptor; 6312 kSize> BodyDescriptor;
6311 6313
6312 // Compares this map to another to see if they describe equivalent objects. 6314 // Compares this map to another to see if they describe equivalent objects.
6313 // If |mode| is set to CLEAR_INOBJECT_PROPERTIES, |other| is treated as if 6315 // If |mode| is set to CLEAR_INOBJECT_PROPERTIES, |other| is treated as if
6314 // it had exactly zero inobject properties. 6316 // it had exactly zero inobject properties.
6315 // The "shared" flags of both this map and |other| are ignored. 6317 // The "shared" flags of both this map and |other| are ignored.
6316 bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode); 6318 bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode);
6317 6319
6320 #if TRACE_MAPS
6321 static void TraceTransition(const char* what, Map* from, Map* to, Name* name);
6322 static void TraceAllTransitions(Map* map);
6323 #endif
6324
6318 private: 6325 private:
6319 static void ConnectElementsTransition(Handle<Map> parent, Handle<Map> child); 6326 static void ConnectElementsTransition(Handle<Map> parent, Handle<Map> child);
6320 static void ConnectTransition(Handle<Map> parent, Handle<Map> child, 6327 static void ConnectTransition(Handle<Map> parent, Handle<Map> child,
6321 Handle<Name> name, SimpleTransitionFlag flag); 6328 Handle<Name> name, SimpleTransitionFlag flag);
6322 6329
6323 bool EquivalentToForTransition(Map* other); 6330 bool EquivalentToForTransition(Map* other);
6324 static Handle<Map> RawCopy(Handle<Map> map, int instance_size); 6331 static Handle<Map> RawCopy(Handle<Map> map, int instance_size);
6325 static Handle<Map> ShareDescriptor(Handle<Map> map, 6332 static Handle<Map> ShareDescriptor(Handle<Map> map,
6326 Handle<DescriptorArray> descriptors, 6333 Handle<DescriptorArray> descriptors,
6327 Descriptor* descriptor); 6334 Descriptor* descriptor);
6328 static Handle<Map> CopyInstallDescriptors( 6335 static Handle<Map> CopyInstallDescriptors(
6329 Handle<Map> map, 6336 Handle<Map> map,
6330 int new_descriptor, 6337 int new_descriptor,
6331 Handle<DescriptorArray> descriptors); 6338 Handle<DescriptorArray> descriptors);
6332 static Handle<Map> CopyAddDescriptor(Handle<Map> map, 6339 static Handle<Map> CopyAddDescriptor(Handle<Map> map,
6333 Descriptor* descriptor, 6340 Descriptor* descriptor,
6334 TransitionFlag flag); 6341 TransitionFlag flag);
6335 static Handle<Map> CopyReplaceDescriptors(Handle<Map> map, 6342 static Handle<Map> CopyReplaceDescriptors(Handle<Map> map,
6336 Handle<DescriptorArray> descriptors, 6343 Handle<DescriptorArray> descriptors,
6337 TransitionFlag flag, 6344 TransitionFlag flag,
6338 MaybeHandle<Name> maybe_name, 6345 MaybeHandle<Name> maybe_name,
6346 const char* reason,
6339 SimpleTransitionFlag simple_flag); 6347 SimpleTransitionFlag simple_flag);
6340 static Handle<Map> CopyReplaceDescriptor(Handle<Map> map, 6348 static Handle<Map> CopyReplaceDescriptor(Handle<Map> map,
6341 Handle<DescriptorArray> descriptors, 6349 Handle<DescriptorArray> descriptors,
6342 Descriptor* descriptor, 6350 Descriptor* descriptor,
6343 int index, 6351 int index,
6344 TransitionFlag flag); 6352 TransitionFlag flag);
6345 6353
6346 static Handle<Map> CopyNormalized(Handle<Map> map, 6354 static Handle<Map> CopyNormalized(Handle<Map> map,
6347 PropertyNormalizationMode mode); 6355 PropertyNormalizationMode mode);
6348 6356
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
6702 6710
6703 // [expected_nof_properties]: Expected number of properties for the function. 6711 // [expected_nof_properties]: Expected number of properties for the function.
6704 inline int expected_nof_properties() const; 6712 inline int expected_nof_properties() const;
6705 inline void set_expected_nof_properties(int value); 6713 inline void set_expected_nof_properties(int value);
6706 6714
6707 // [feedback_vector] - accumulates ast node feedback from full-codegen and 6715 // [feedback_vector] - accumulates ast node feedback from full-codegen and
6708 // (increasingly) from crankshafted code where sufficient feedback isn't 6716 // (increasingly) from crankshafted code where sufficient feedback isn't
6709 // available. 6717 // available.
6710 DECL_ACCESSORS(feedback_vector, TypeFeedbackVector) 6718 DECL_ACCESSORS(feedback_vector, TypeFeedbackVector)
6711 6719
6720 #if TRACE_MAPS
6721 // [unique_id] - For --trace-maps purposes, an identifier that's persistent
6722 // even if the GC moves this SharedFunctionInfo.
6723 inline int unique_id() const;
6724 inline void set_unique_id(int value);
6725 #endif
6726
6712 // [instance class name]: class name for instances. 6727 // [instance class name]: class name for instances.
6713 DECL_ACCESSORS(instance_class_name, Object) 6728 DECL_ACCESSORS(instance_class_name, Object)
6714 6729
6715 // [function data]: This field holds some additional data for function. 6730 // [function data]: This field holds some additional data for function.
6716 // Currently it either has FunctionTemplateInfo to make benefit the API 6731 // Currently it either has FunctionTemplateInfo to make benefit the API
6717 // or Smi identifying a builtin function. 6732 // or Smi identifying a builtin function.
6718 // In the long run we don't want all functions to have this field but 6733 // In the long run we don't want all functions to have this field but
6719 // we can fix that when we have a better model for storing hidden data 6734 // we can fix that when we have a better model for storing hidden data
6720 // on objects. 6735 // on objects.
6721 DECL_ACCESSORS(function_data, Object) 6736 DECL_ACCESSORS(function_data, Object)
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
6948 static const int kConstructStubOffset = kScopeInfoOffset + kPointerSize; 6963 static const int kConstructStubOffset = kScopeInfoOffset + kPointerSize;
6949 static const int kInstanceClassNameOffset = 6964 static const int kInstanceClassNameOffset =
6950 kConstructStubOffset + kPointerSize; 6965 kConstructStubOffset + kPointerSize;
6951 static const int kFunctionDataOffset = 6966 static const int kFunctionDataOffset =
6952 kInstanceClassNameOffset + kPointerSize; 6967 kInstanceClassNameOffset + kPointerSize;
6953 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; 6968 static const int kScriptOffset = kFunctionDataOffset + kPointerSize;
6954 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; 6969 static const int kDebugInfoOffset = kScriptOffset + kPointerSize;
6955 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize; 6970 static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize;
6956 static const int kFeedbackVectorOffset = 6971 static const int kFeedbackVectorOffset =
6957 kInferredNameOffset + kPointerSize; 6972 kInferredNameOffset + kPointerSize;
6973 #if TRACE_MAPS
6974 static const int kUniqueIdOffset = kFeedbackVectorOffset + kPointerSize;
6975 static const int kLastPointerFieldOffset = kUniqueIdOffset;
6976 #else
6977 static const int kLastPointerFieldOffset = kFeedbackVectorOffset;
6978 #endif
6979
6958 #if V8_HOST_ARCH_32_BIT 6980 #if V8_HOST_ARCH_32_BIT
6959 // Smi fields. 6981 // Smi fields.
6960 static const int kLengthOffset = 6982 static const int kLengthOffset = kLastPointerFieldOffset + kPointerSize;
6961 kFeedbackVectorOffset + kPointerSize;
6962 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize; 6983 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize;
6963 static const int kExpectedNofPropertiesOffset = 6984 static const int kExpectedNofPropertiesOffset =
6964 kFormalParameterCountOffset + kPointerSize; 6985 kFormalParameterCountOffset + kPointerSize;
6965 static const int kNumLiteralsOffset = 6986 static const int kNumLiteralsOffset =
6966 kExpectedNofPropertiesOffset + kPointerSize; 6987 kExpectedNofPropertiesOffset + kPointerSize;
6967 static const int kStartPositionAndTypeOffset = 6988 static const int kStartPositionAndTypeOffset =
6968 kNumLiteralsOffset + kPointerSize; 6989 kNumLiteralsOffset + kPointerSize;
6969 static const int kEndPositionOffset = 6990 static const int kEndPositionOffset =
6970 kStartPositionAndTypeOffset + kPointerSize; 6991 kStartPositionAndTypeOffset + kPointerSize;
6971 static const int kFunctionTokenPositionOffset = 6992 static const int kFunctionTokenPositionOffset =
(...skipping 15 matching lines...) Expand all
6987 // The only reason to use smi fields instead of int fields 7008 // The only reason to use smi fields instead of int fields
6988 // is to allow iteration without maps decoding during 7009 // is to allow iteration without maps decoding during
6989 // garbage collections. 7010 // garbage collections.
6990 // To avoid wasting space on 64-bit architectures we use 7011 // To avoid wasting space on 64-bit architectures we use
6991 // the following trick: we group integer fields into pairs 7012 // the following trick: we group integer fields into pairs
6992 // The least significant integer in each pair is shifted left by 1. 7013 // The least significant integer in each pair is shifted left by 1.
6993 // By doing this we guarantee that LSB of each kPointerSize aligned 7014 // By doing this we guarantee that LSB of each kPointerSize aligned
6994 // word is not set and thus this word cannot be treated as pointer 7015 // word is not set and thus this word cannot be treated as pointer
6995 // to HeapObject during old space traversal. 7016 // to HeapObject during old space traversal.
6996 #if V8_TARGET_LITTLE_ENDIAN 7017 #if V8_TARGET_LITTLE_ENDIAN
6997 static const int kLengthOffset = 7018 static const int kLengthOffset = kLastPointerFieldOffset + kPointerSize;
6998 kFeedbackVectorOffset + kPointerSize;
6999 static const int kFormalParameterCountOffset = 7019 static const int kFormalParameterCountOffset =
7000 kLengthOffset + kIntSize; 7020 kLengthOffset + kIntSize;
7001 7021
7002 static const int kExpectedNofPropertiesOffset = 7022 static const int kExpectedNofPropertiesOffset =
7003 kFormalParameterCountOffset + kIntSize; 7023 kFormalParameterCountOffset + kIntSize;
7004 static const int kNumLiteralsOffset = 7024 static const int kNumLiteralsOffset =
7005 kExpectedNofPropertiesOffset + kIntSize; 7025 kExpectedNofPropertiesOffset + kIntSize;
7006 7026
7007 static const int kEndPositionOffset = 7027 static const int kEndPositionOffset =
7008 kNumLiteralsOffset + kIntSize; 7028 kNumLiteralsOffset + kIntSize;
(...skipping 13 matching lines...) Expand all
7022 static const int kAstNodeCountOffset = 7042 static const int kAstNodeCountOffset =
7023 kCountersOffset + kIntSize; 7043 kCountersOffset + kIntSize;
7024 static const int kProfilerTicksOffset = 7044 static const int kProfilerTicksOffset =
7025 kAstNodeCountOffset + kIntSize; 7045 kAstNodeCountOffset + kIntSize;
7026 7046
7027 // Total size. 7047 // Total size.
7028 static const int kSize = kProfilerTicksOffset + kIntSize; 7048 static const int kSize = kProfilerTicksOffset + kIntSize;
7029 7049
7030 #elif V8_TARGET_BIG_ENDIAN 7050 #elif V8_TARGET_BIG_ENDIAN
7031 static const int kFormalParameterCountOffset = 7051 static const int kFormalParameterCountOffset =
7032 kFeedbackVectorOffset + kPointerSize; 7052 kLastPointerFieldOffset + kPointerSize;
7033 static const int kLengthOffset = kFormalParameterCountOffset + kIntSize; 7053 static const int kLengthOffset = kFormalParameterCountOffset + kIntSize;
7034 7054
7035 static const int kNumLiteralsOffset = kLengthOffset + kIntSize; 7055 static const int kNumLiteralsOffset = kLengthOffset + kIntSize;
7036 static const int kExpectedNofPropertiesOffset = kNumLiteralsOffset + kIntSize; 7056 static const int kExpectedNofPropertiesOffset = kNumLiteralsOffset + kIntSize;
7037 7057
7038 static const int kStartPositionAndTypeOffset = 7058 static const int kStartPositionAndTypeOffset =
7039 kExpectedNofPropertiesOffset + kIntSize; 7059 kExpectedNofPropertiesOffset + kIntSize;
7040 static const int kEndPositionOffset = kStartPositionAndTypeOffset + kIntSize; 7060 static const int kEndPositionOffset = kStartPositionAndTypeOffset + kIntSize;
7041 7061
7042 static const int kCompilerHintsOffset = kEndPositionOffset + kIntSize; 7062 static const int kCompilerHintsOffset = kEndPositionOffset + kIntSize;
(...skipping 12 matching lines...) Expand all
7055 7075
7056 #else 7076 #else
7057 #error Unknown byte ordering 7077 #error Unknown byte ordering
7058 #endif // Big endian 7078 #endif // Big endian
7059 #endif // 64-bit 7079 #endif // 64-bit
7060 7080
7061 7081
7062 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize); 7082 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize);
7063 7083
7064 typedef FixedBodyDescriptor<kNameOffset, 7084 typedef FixedBodyDescriptor<kNameOffset,
7065 kFeedbackVectorOffset + kPointerSize, 7085 kLastPointerFieldOffset + kPointerSize,
7066 kSize> BodyDescriptor; 7086 kSize> BodyDescriptor;
7067 7087
7068 // Bit positions in start_position_and_type. 7088 // Bit positions in start_position_and_type.
7069 // The source code start position is in the 30 most significant bits of 7089 // The source code start position is in the 30 most significant bits of
7070 // the start_position_and_type field. 7090 // the start_position_and_type field.
7071 static const int kIsExpressionBit = 0; 7091 static const int kIsExpressionBit = 0;
7072 static const int kIsTopLevelBit = 1; 7092 static const int kIsTopLevelBit = 1;
7073 static const int kStartPositionShift = 2; 7093 static const int kStartPositionShift = 2;
7074 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); 7094 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1);
7075 7095
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
8571 8591
8572 // Conversion. 8592 // Conversion.
8573 inline bool AsArrayIndex(uint32_t* index); 8593 inline bool AsArrayIndex(uint32_t* index);
8574 8594
8575 // Whether name can only name own properties. 8595 // Whether name can only name own properties.
8576 inline bool IsOwn(); 8596 inline bool IsOwn();
8577 8597
8578 DECLARE_CAST(Name) 8598 DECLARE_CAST(Name)
8579 8599
8580 DECLARE_PRINTER(Name) 8600 DECLARE_PRINTER(Name)
8601 #if TRACE_MAPS
8602 void NameShortPrint();
8603 int NameShortPrint(Vector<char> str);
8604 #endif
8581 8605
8582 // Layout description. 8606 // Layout description.
8583 static const int kHashFieldSlot = HeapObject::kHeaderSize; 8607 static const int kHashFieldSlot = HeapObject::kHeaderSize;
8584 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT 8608 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT
8585 static const int kHashFieldOffset = kHashFieldSlot; 8609 static const int kHashFieldOffset = kHashFieldSlot;
8586 #else 8610 #else
8587 static const int kHashFieldOffset = kHashFieldSlot + kIntSize; 8611 static const int kHashFieldOffset = kHashFieldSlot + kIntSize;
8588 #endif 8612 #endif
8589 static const int kSize = kHashFieldSlot + kPointerSize; 8613 static const int kSize = kHashFieldSlot + kPointerSize;
8590 8614
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
8673 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; 8697 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor;
8674 8698
8675 void SymbolShortPrint(std::ostream& os); 8699 void SymbolShortPrint(std::ostream& os);
8676 8700
8677 private: 8701 private:
8678 static const int kPrivateBit = 0; 8702 static const int kPrivateBit = 0;
8679 static const int kOwnBit = 1; 8703 static const int kOwnBit = 1;
8680 8704
8681 const char* PrivateSymbolToName() const; 8705 const char* PrivateSymbolToName() const;
8682 8706
8707 #if TRACE_MAPS
8708 friend class Name; // For PrivateSymbolToName.
8709 #endif
8710
8683 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); 8711 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol);
8684 }; 8712 };
8685 8713
8686 8714
8687 class ConsString; 8715 class ConsString;
8688 8716
8689 // The String abstract class captures JavaScript string values: 8717 // The String abstract class captures JavaScript string values:
8690 // 8718 //
8691 // Ecma-262: 8719 // Ecma-262:
8692 // 4.3.16 String Value 8720 // 4.3.16 String Value
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
10933 } else { 10961 } else {
10934 value &= ~(1 << bit_position); 10962 value &= ~(1 << bit_position);
10935 } 10963 }
10936 return value; 10964 return value;
10937 } 10965 }
10938 }; 10966 };
10939 10967
10940 } } // namespace v8::internal 10968 } } // namespace v8::internal
10941 10969
10942 #endif // V8_OBJECTS_H_ 10970 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698