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

Side by Side Diff: src/objects.h

Issue 12114054: Supporting AllocationSiteInfo for Nested arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing a port compile failure Created 7 years, 9 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/ia32/lithium-codegen-ia32.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 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 inline bool HasExternalShortElements(); 1703 inline bool HasExternalShortElements();
1704 inline bool HasExternalUnsignedShortElements(); 1704 inline bool HasExternalUnsignedShortElements();
1705 inline bool HasExternalIntElements(); 1705 inline bool HasExternalIntElements();
1706 inline bool HasExternalUnsignedIntElements(); 1706 inline bool HasExternalUnsignedIntElements();
1707 inline bool HasExternalFloatElements(); 1707 inline bool HasExternalFloatElements();
1708 inline bool HasExternalDoubleElements(); 1708 inline bool HasExternalDoubleElements();
1709 bool HasFastArgumentsElements(); 1709 bool HasFastArgumentsElements();
1710 bool HasDictionaryArgumentsElements(); 1710 bool HasDictionaryArgumentsElements();
1711 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements. 1711 inline SeededNumberDictionary* element_dictionary(); // Gets slow elements.
1712 1712
1713 inline bool ShouldTrackAllocationInfo();
1714
1713 inline void set_map_and_elements( 1715 inline void set_map_and_elements(
1714 Map* map, 1716 Map* map,
1715 FixedArrayBase* value, 1717 FixedArrayBase* value,
1716 WriteBarrierMode mode = UPDATE_WRITE_BARRIER); 1718 WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
1717 1719
1718 // Requires: HasFastElements(). 1720 // Requires: HasFastElements().
1719 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); 1721 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements();
1720 1722
1721 // Collects elements starting at index 0. 1723 // Collects elements starting at index 0.
1722 // Undefined values are placed after non-undefined values. 1724 // Undefined values are placed after non-undefined values.
(...skipping 5435 matching lines...) Expand 10 before | Expand all | Expand 10 after
7158 public: 7160 public:
7159 DECL_ACCESSORS(payload, Object) 7161 DECL_ACCESSORS(payload, Object)
7160 7162
7161 static inline AllocationSiteInfo* cast(Object* obj); 7163 static inline AllocationSiteInfo* cast(Object* obj);
7162 7164
7163 DECLARE_PRINTER(AllocationSiteInfo) 7165 DECLARE_PRINTER(AllocationSiteInfo)
7164 DECLARE_VERIFIER(AllocationSiteInfo) 7166 DECLARE_VERIFIER(AllocationSiteInfo)
7165 7167
7166 // Returns NULL if no AllocationSiteInfo is available for object. 7168 // Returns NULL if no AllocationSiteInfo is available for object.
7167 static AllocationSiteInfo* FindForJSObject(JSObject* object); 7169 static AllocationSiteInfo* FindForJSObject(JSObject* object);
7168 7170 static inline AllocationSiteMode GetMode(
7169 static AllocationSiteMode GetMode(ElementsKind boilerplate_elements_kind); 7171 ElementsKind boilerplate_elements_kind);
7170 static AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); 7172 static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to);
7171 7173
7172 static const int kPayloadOffset = HeapObject::kHeaderSize; 7174 static const int kPayloadOffset = HeapObject::kHeaderSize;
7173 static const int kSize = kPayloadOffset + kPointerSize; 7175 static const int kSize = kPayloadOffset + kPointerSize;
7174 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; 7176 static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024;
7175 7177
7176 bool GetElementsKindPayload(ElementsKind* kind); 7178 bool GetElementsKindPayload(ElementsKind* kind);
7177 private: 7179 private:
7178 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo); 7180 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSiteInfo);
7179 }; 7181 };
7180 7182
(...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after
9262 } else { 9264 } else {
9263 value &= ~(1 << bit_position); 9265 value &= ~(1 << bit_position);
9264 } 9266 }
9265 return value; 9267 return value;
9266 } 9268 }
9267 }; 9269 };
9268 9270
9269 } } // namespace v8::internal 9271 } } // namespace v8::internal
9270 9272
9271 #endif // V8_OBJECTS_H_ 9273 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698