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

Side by Side Diff: src/objects.h

Issue 11817017: Additional work to get array literal allocation tracking working, even with --always-opt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Quick adjustment to bit fields Created 7 years, 11 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
« no previous file with comments | « src/ic.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4963 matching lines...) Expand 10 before | Expand all | Expand 10 after
4974 4974
4975 void SetEnumLength(int length) { 4975 void SetEnumLength(int length) {
4976 if (length != kInvalidEnumCache) { 4976 if (length != kInvalidEnumCache) {
4977 ASSERT(length >= 0); 4977 ASSERT(length >= 0);
4978 ASSERT(length == 0 || instance_descriptors()->HasEnumCache()); 4978 ASSERT(length == 0 || instance_descriptors()->HasEnumCache());
4979 ASSERT(length <= NumberOfOwnDescriptors()); 4979 ASSERT(length <= NumberOfOwnDescriptors());
4980 } 4980 }
4981 set_bit_field3(EnumLengthBits::update(bit_field3(), length)); 4981 set_bit_field3(EnumLengthBits::update(bit_field3(), length));
4982 } 4982 }
4983 4983
4984 4984 inline bool CanTrackAllocationSite();
4985 inline bool owns_descriptors(); 4985 inline bool owns_descriptors();
4986 inline void set_owns_descriptors(bool is_shared); 4986 inline void set_owns_descriptors(bool is_shared);
4987 inline bool is_observed(); 4987 inline bool is_observed();
4988 inline void set_is_observed(bool is_observed); 4988 inline void set_is_observed(bool is_observed);
4989 4989
4990 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size); 4990 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size);
4991 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors(); 4991 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors();
4992 MUST_USE_RESULT MaybeObject* CopyDropDescriptors(); 4992 MUST_USE_RESULT MaybeObject* CopyDropDescriptors();
4993 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors( 4993 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors(
4994 DescriptorArray* descriptors, 4994 DescriptorArray* descriptors,
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
6898 class ICsWithTypeInfoCountField: public BitField<int, 0, 6898 class ICsWithTypeInfoCountField: public BitField<int, 0,
6899 kSmiValueSize - kTypeChangeChecksumBits> {}; // NOLINT 6899 kSmiValueSize - kTypeChangeChecksumBits> {}; // NOLINT
6900 class InlinedTypeChangeChecksum: public BitField<int, 6900 class InlinedTypeChangeChecksum: public BitField<int,
6901 kSmiValueSize - kTypeChangeChecksumBits, 6901 kSmiValueSize - kTypeChangeChecksumBits,
6902 kTypeChangeChecksumBits> {}; // NOLINT 6902 kTypeChangeChecksumBits> {}; // NOLINT
6903 6903
6904 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackInfo); 6904 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackInfo);
6905 }; 6905 };
6906 6906
6907 6907
6908 enum AllocationSiteInfoMode { 6908 enum AllocationSiteMode {
6909 DONT_TRACK_ALLOCATION_SITE_INFO, 6909 DONT_TRACK_ALLOCATION_SITE,
6910 TRACK_ALLOCATION_SITE_INFO 6910 TRACK_ALLOCATION_SITE,
6911 LAST_ALLOCATION_SITE_MODE = TRACK_ALLOCATION_SITE
6911 }; 6912 };
6912 6913
6913 6914
6914 class AllocationSiteInfo: public Struct { 6915 class AllocationSiteInfo: public Struct {
6915 public: 6916 public:
6916 DECL_ACCESSORS(payload, Object) 6917 DECL_ACCESSORS(payload, Object)
6917 6918
6918 static inline AllocationSiteInfo* cast(Object* obj); 6919 static inline AllocationSiteInfo* cast(Object* obj);
6919 6920
6920 DECLARE_PRINTER(AllocationSiteInfo) 6921 DECLARE_PRINTER(AllocationSiteInfo)
6921 DECLARE_VERIFIER(AllocationSiteInfo) 6922 DECLARE_VERIFIER(AllocationSiteInfo)
6922 6923
6923 // Returns NULL if no AllocationSiteInfo is available for object. 6924 // Returns NULL if no AllocationSiteInfo is available for object.
6924 static AllocationSiteInfo* FindForJSObject(JSObject* object); 6925 static AllocationSiteInfo* FindForJSObject(JSObject* object);
6925 6926
6927 static AllocationSiteMode GetMode(ElementsKind boilerplate_elements_kind);
6928 static AllocationSiteMode GetMode(ElementsKind from, ElementsKind to);
6929
6926 static const int kPayloadOffset = HeapObject::kHeaderSize; 6930 static const int kPayloadOffset = HeapObject::kHeaderSize;
6927 static const int kSize = kPayloadOffset + kPointerSize; 6931 static const int kSize = kPayloadOffset + kPointerSize;
6928 6932
6929 private: 6933 private:
6930 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo); 6934 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo);
6931 }; 6935 };
6932 6936
6933 6937
6934 // Representation of a slow alias as part of a non-strict arguments objects. 6938 // Representation of a slow alias as part of a non-strict arguments objects.
6935 // For fast aliases (if HasNonStrictArgumentsElements()): 6939 // For fast aliases (if HasNonStrictArgumentsElements()):
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
8827 } else { 8831 } else {
8828 value &= ~(1 << bit_position); 8832 value &= ~(1 << bit_position);
8829 } 8833 }
8830 return value; 8834 return value;
8831 } 8835 }
8832 }; 8836 };
8833 8837
8834 } } // namespace v8::internal 8838 } } // namespace v8::internal
8835 8839
8836 #endif // V8_OBJECTS_H_ 8840 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698