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

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: Removed unnecessary class specifiers 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
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 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
6904 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackInfo); 6904 DISALLOW_IMPLICIT_CONSTRUCTORS(TypeFeedbackInfo);
6905 }; 6905 };
6906 6906
6907 6907
6908 enum AllocationSiteInfoMode { 6908 enum AllocationSiteInfoMode {
6909 DONT_TRACK_ALLOCATION_SITE_INFO, 6909 DONT_TRACK_ALLOCATION_SITE_INFO,
6910 TRACK_ALLOCATION_SITE_INFO 6910 TRACK_ALLOCATION_SITE_INFO
6911 }; 6911 };
6912 6912
6913 6913
6914
Toon Verwaest 2013/01/16 10:53:42 Trim empty lines down to 2.
mvstanton 2013/01/16 13:01:56 Done.
6915
6914 class AllocationSiteInfo: public Struct { 6916 class AllocationSiteInfo: public Struct {
6915 public: 6917 public:
6916 DECL_ACCESSORS(payload, Object) 6918 DECL_ACCESSORS(payload, Object)
6917 6919
6918 static inline AllocationSiteInfo* cast(Object* obj); 6920 static inline AllocationSiteInfo* cast(Object* obj);
6919 6921
6920 DECLARE_PRINTER(AllocationSiteInfo) 6922 DECLARE_PRINTER(AllocationSiteInfo)
6921 DECLARE_VERIFIER(AllocationSiteInfo) 6923 DECLARE_VERIFIER(AllocationSiteInfo)
6922 6924
6923 // Returns NULL if no AllocationSiteInfo is available for object. 6925 // Returns NULL if no AllocationSiteInfo is available for object.
6924 static AllocationSiteInfo* FindForJSObject(JSObject* object); 6926 static AllocationSiteInfo* FindForJSObject(JSObject* object);
6925 6927
6928 static AllocationSiteInfoMode GetMode();
Toon Verwaest 2013/01/16 10:53:42 Just use the flag if no other arguments are requir
mvstanton 2013/01/16 13:01:56 Done.
6929 static AllocationSiteInfoMode GetMode(ElementsKind boilerplate_elements_kind);
6930 static AllocationSiteInfoMode GetMode(ElementsKind from, ElementsKind to);
6931
6926 static const int kPayloadOffset = HeapObject::kHeaderSize; 6932 static const int kPayloadOffset = HeapObject::kHeaderSize;
6927 static const int kSize = kPayloadOffset + kPointerSize; 6933 static const int kSize = kPayloadOffset + kPointerSize;
6928 6934
6929 private: 6935 private:
6930 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo); 6936 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo);
6931 }; 6937 };
6932 6938
6933 6939
6934 // Representation of a slow alias as part of a non-strict arguments objects. 6940 // Representation of a slow alias as part of a non-strict arguments objects.
6935 // For fast aliases (if HasNonStrictArgumentsElements()): 6941 // For fast aliases (if HasNonStrictArgumentsElements()):
(...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after
8827 } else { 8833 } else {
8828 value &= ~(1 << bit_position); 8834 value &= ~(1 << bit_position);
8829 } 8835 }
8830 return value; 8836 return value;
8831 } 8837 }
8832 }; 8838 };
8833 8839
8834 } } // namespace v8::internal 8840 } } // namespace v8::internal
8835 8841
8836 #endif // V8_OBJECTS_H_ 8842 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698