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

Side by Side Diff: src/spaces.h

Issue 9315032: ARM: Use ubfx and movw instructions to avoid a PC-relative load on Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 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/platform-linux.cc ('k') | src/spaces.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 bool WasSweptPrecisely() { return IsFlagSet(WAS_SWEPT_PRECISELY); } 713 bool WasSweptPrecisely() { return IsFlagSet(WAS_SWEPT_PRECISELY); }
714 bool WasSweptConservatively() { return IsFlagSet(WAS_SWEPT_CONSERVATIVELY); } 714 bool WasSweptConservatively() { return IsFlagSet(WAS_SWEPT_CONSERVATIVELY); }
715 bool WasSwept() { return WasSweptPrecisely() || WasSweptConservatively(); } 715 bool WasSwept() { return WasSweptPrecisely() || WasSweptConservatively(); }
716 716
717 void MarkSweptPrecisely() { SetFlag(WAS_SWEPT_PRECISELY); } 717 void MarkSweptPrecisely() { SetFlag(WAS_SWEPT_PRECISELY); }
718 void MarkSweptConservatively() { SetFlag(WAS_SWEPT_CONSERVATIVELY); } 718 void MarkSweptConservatively() { SetFlag(WAS_SWEPT_CONSERVATIVELY); }
719 719
720 void ClearSweptPrecisely() { ClearFlag(WAS_SWEPT_PRECISELY); } 720 void ClearSweptPrecisely() { ClearFlag(WAS_SWEPT_PRECISELY); }
721 void ClearSweptConservatively() { ClearFlag(WAS_SWEPT_CONSERVATIVELY); } 721 void ClearSweptConservatively() { ClearFlag(WAS_SWEPT_CONSERVATIVELY); }
722 722
723 static Map* MapFromIntraPageOffset(int32_t offset);
724
725 Address RoundUpToObjectAlignment(Address a);
726
723 #ifdef DEBUG 727 #ifdef DEBUG
724 void Print(); 728 void Print();
725 #endif // DEBUG 729 #endif // DEBUG
726 730
727 friend class MemoryAllocator; 731 friend class MemoryAllocator;
728 }; 732 };
729 733
730 734
731 STATIC_CHECK(sizeof(Page) <= MemoryChunk::kHeaderSize); 735 STATIC_CHECK(sizeof(Page) <= MemoryChunk::kHeaderSize);
732 736
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 // Reports statistic info of the space. 986 // Reports statistic info of the space.
983 void ReportStatistics(); 987 void ReportStatistics();
984 #endif 988 #endif
985 989
986 MemoryChunk* AllocateChunk(intptr_t body_size, 990 MemoryChunk* AllocateChunk(intptr_t body_size,
987 Executability executable, 991 Executability executable,
988 Space* space); 992 Space* space);
989 993
990 Address ReserveAlignedMemory(size_t requested, 994 Address ReserveAlignedMemory(size_t requested,
991 size_t alignment, 995 size_t alignment,
992 VirtualMemory* controller); 996 VirtualMemory* controller,
997 intptr_t preferred_placement = 0);
993 Address AllocateAlignedMemory(size_t requested, 998 Address AllocateAlignedMemory(size_t requested,
994 size_t alignment, 999 size_t alignment,
995 Executability executable, 1000 Executability executable,
996 VirtualMemory* controller); 1001 VirtualMemory* controller,
1002 intptr_t preferred_placement = 0);
997 1003
998 void FreeMemory(VirtualMemory* reservation, Executability executable); 1004 void FreeMemory(VirtualMemory* reservation, Executability executable);
999 void FreeMemory(Address addr, size_t size, Executability executable); 1005 void FreeMemory(Address addr, size_t size, Executability executable);
1000 1006
1001 // Commit a contiguous block of memory from the initial chunk. Assumes that 1007 // Commit a contiguous block of memory from the initial chunk. Assumes that
1002 // the address is not NULL, the size is greater than zero, and that the 1008 // the address is not NULL, the size is greater than zero, and that the
1003 // block is contained in the initial chunk. Returns true if it succeeded 1009 // block is contained in the initial chunk. Returns true if it succeeded
1004 // and false otherwise. 1010 // and false otherwise.
1005 bool CommitBlock(Address start, size_t size, Executability executable); 1011 bool CommitBlock(Address start, size_t size, Executability executable);
1006 1012
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2656 } 2662 }
2657 // Must be small, since an iteration is used for lookup. 2663 // Must be small, since an iteration is used for lookup.
2658 static const int kMaxComments = 64; 2664 static const int kMaxComments = 64;
2659 }; 2665 };
2660 #endif 2666 #endif
2661 2667
2662 2668
2663 } } // namespace v8::internal 2669 } } // namespace v8::internal
2664 2670
2665 #endif // V8_SPACES_H_ 2671 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/platform-linux.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698