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

Side by Side Diff: src/objects.h

Issue 96783002: Allocation site pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/hydrogen.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 8139 matching lines...) Expand 10 before | Expand all | Expand 10 after
8150 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {}; 8150 class ElementsKindBits: public BitField<ElementsKind, 0, 15> {};
8151 class UnusedBits: public BitField<int, 15, 14> {}; 8151 class UnusedBits: public BitField<int, 15, 14> {};
8152 class DoNotInlineBit: public BitField<bool, 29, 1> {}; 8152 class DoNotInlineBit: public BitField<bool, 29, 1> {};
8153 8153
8154 // Increments the mementos found counter and returns true when the first 8154 // Increments the mementos found counter and returns true when the first
8155 // memento was found for a given allocation site. 8155 // memento was found for a given allocation site.
8156 inline bool IncrementMementoFoundCount(); 8156 inline bool IncrementMementoFoundCount();
8157 8157
8158 inline void IncrementMementoCreateCount(); 8158 inline void IncrementMementoCreateCount();
8159 8159
8160 PretenureFlag GetPretenureMode() { 8160 PretenureFlag GetPretenureMode();
8161 int mode = pretenure_decision()->value(); 8161
8162 // Zombie objects "decide" to be untenured. 8162 void ResetPretenureDecision();
8163 return (mode == kTenure) ? TENURED : NOT_TENURED;
8164 }
8165 8163
8166 // The pretenuring decision is made during gc, and the zombie state allows 8164 // The pretenuring decision is made during gc, and the zombie state allows
8167 // us to recognize when an allocation site is just being kept alive because 8165 // us to recognize when an allocation site is just being kept alive because
8168 // a later traversal of new space may discover AllocationMementos that point 8166 // a later traversal of new space may discover AllocationMementos that point
8169 // to this AllocationSite. 8167 // to this AllocationSite.
8170 bool IsZombie() { 8168 bool IsZombie() {
8171 return pretenure_decision()->value() == kZombie; 8169 return pretenure_decision()->value() == kZombie;
8172 } 8170 }
8173 8171
8174 inline void MarkZombie(); 8172 inline void MarkZombie();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
8270 AllocationSite* GetAllocationSite() { 8268 AllocationSite* GetAllocationSite() {
8271 ASSERT(IsValid()); 8269 ASSERT(IsValid());
8272 return AllocationSite::cast(allocation_site()); 8270 return AllocationSite::cast(allocation_site());
8273 } 8271 }
8274 8272
8275 DECLARE_PRINTER(AllocationMemento) 8273 DECLARE_PRINTER(AllocationMemento)
8276 DECLARE_VERIFIER(AllocationMemento) 8274 DECLARE_VERIFIER(AllocationMemento)
8277 8275
8278 // Returns NULL if no AllocationMemento is available for object. 8276 // Returns NULL if no AllocationMemento is available for object.
8279 static AllocationMemento* FindForHeapObject(HeapObject* object, 8277 static AllocationMemento* FindForHeapObject(HeapObject* object,
8278 Heap* heap,
8280 bool in_GC = false); 8279 bool in_GC = false);
8281 static inline AllocationMemento* cast(Object* obj); 8280 static inline AllocationMemento* cast(Object* obj);
8282 8281
8283 private: 8282 private:
8284 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento); 8283 DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento);
8285 }; 8284 };
8286 8285
8287 8286
8288 // Representation of a slow alias as part of a non-strict arguments objects. 8287 // Representation of a slow alias as part of a non-strict arguments objects.
8289 // For fast aliases (if HasNonStrictArgumentsElements()): 8288 // For fast aliases (if HasNonStrictArgumentsElements()):
(...skipping 2337 matching lines...) Expand 10 before | Expand all | Expand 10 after
10627 } else { 10626 } else {
10628 value &= ~(1 << bit_position); 10627 value &= ~(1 << bit_position);
10629 } 10628 }
10630 return value; 10629 return value;
10631 } 10630 }
10632 }; 10631 };
10633 10632
10634 } } // namespace v8::internal 10633 } } // namespace v8::internal
10635 10634
10636 #endif // V8_OBJECTS_H_ 10635 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698