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

Side by Side Diff: src/heap/heap.h

Issue 1127993002: Move double alignment logic into memory allocator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | src/heap/heap.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_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 bool CanExpandOldGeneration(int size) { 707 bool CanExpandOldGeneration(int size) {
708 return (CommittedOldGenerationMemory() + size) < MaxOldGenerationSize(); 708 return (CommittedOldGenerationMemory() + size) < MaxOldGenerationSize();
709 } 709 }
710 710
711 // Returns a deep copy of the JavaScript object. 711 // Returns a deep copy of the JavaScript object.
712 // Properties and elements are copied too. 712 // Properties and elements are copied too.
713 // Optionally takes an AllocationSite to be appended in an AllocationMemento. 713 // Optionally takes an AllocationSite to be appended in an AllocationMemento.
714 MUST_USE_RESULT AllocationResult 714 MUST_USE_RESULT AllocationResult
715 CopyJSObject(JSObject* source, AllocationSite* site = NULL); 715 CopyJSObject(JSObject* source, AllocationSite* site = NULL);
716 716
717 // This method assumes overallocation of one word. It will store a filler
718 // before the object if the given object is not double aligned, otherwise
719 // it will place the filler after the object.
720 MUST_USE_RESULT HeapObject* EnsureDoubleAligned(HeapObject* object, int size);
721
717 // Clear the Instanceof cache (used when a prototype changes). 722 // Clear the Instanceof cache (used when a prototype changes).
718 inline void ClearInstanceofCache(); 723 inline void ClearInstanceofCache();
719 724
720 // Iterates the whole code space to clear all ICs of the given kind. 725 // Iterates the whole code space to clear all ICs of the given kind.
721 void ClearAllICsByKind(Code::Kind kind); 726 void ClearAllICsByKind(Code::Kind kind);
722 727
723 // FreeSpace objects have a null map after deserialization. Update the map. 728 // FreeSpace objects have a null map after deserialization. Update the map.
724 void RepairFreeListsAfterDeserialization(); 729 void RepairFreeListsAfterDeserialization();
725 730
726 template <typename T> 731 template <typename T>
(...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2608 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2613 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2609 2614
2610 private: 2615 private:
2611 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2616 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2612 }; 2617 };
2613 #endif // DEBUG 2618 #endif // DEBUG
2614 } 2619 }
2615 } // namespace v8::internal 2620 } // namespace v8::internal
2616 2621
2617 #endif // V8_HEAP_HEAP_H_ 2622 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698