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

Side by Side Diff: test/cctest/test-spaces.cc

Issue 5745005: Provide baseline GC version. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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
« src/ia32/codegen-ia32.cc ('K') | « test/cctest/test-mark-compact.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 15 matching lines...) Expand all
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include <stdlib.h> 28 #include <stdlib.h>
29 29
30 #include "v8.h" 30 #include "v8.h"
31 #include "cctest.h" 31 #include "cctest.h"
32 32
33 using namespace v8::internal; 33 using namespace v8::internal;
34 34
35 static void VerifyRegionMarking(Address page_start) { 35 static void VerifyRegionMarking(Address page_start) {
36 #ifndef BASELINE_GC
36 Page* p = Page::FromAddress(page_start); 37 Page* p = Page::FromAddress(page_start);
37 38
38 p->SetRegionMarks(Page::kAllRegionsCleanMarks); 39 p->SetRegionMarks(Page::kAllRegionsCleanMarks);
39 40
40 for (Address addr = p->ObjectAreaStart(); 41 for (Address addr = p->ObjectAreaStart();
41 addr < p->ObjectAreaEnd(); 42 addr < p->ObjectAreaEnd();
42 addr += kPointerSize) { 43 addr += kPointerSize) {
43 CHECK(!Page::FromAddress(addr)->IsRegionDirty(addr)); 44 CHECK(!Page::FromAddress(addr)->IsRegionDirty(addr));
44 } 45 }
45 46
46 for (Address addr = p->ObjectAreaStart(); 47 for (Address addr = p->ObjectAreaStart();
47 addr < p->ObjectAreaEnd(); 48 addr < p->ObjectAreaEnd();
48 addr += kPointerSize) { 49 addr += kPointerSize) {
49 Page::FromAddress(addr)->MarkRegionDirty(addr); 50 Page::FromAddress(addr)->MarkRegionDirty(addr);
50 } 51 }
51 52
52 for (Address addr = p->ObjectAreaStart(); 53 for (Address addr = p->ObjectAreaStart();
53 addr < p->ObjectAreaEnd(); 54 addr < p->ObjectAreaEnd();
54 addr += kPointerSize) { 55 addr += kPointerSize) {
55 CHECK(Page::FromAddress(addr)->IsRegionDirty(addr)); 56 CHECK(Page::FromAddress(addr)->IsRegionDirty(addr));
56 } 57 }
58 #endif
57 } 59 }
58 60
59 61
60 TEST(Page) { 62 TEST(Page) {
61 byte* mem = NewArray<byte>(2*Page::kPageSize); 63 byte* mem = NewArray<byte>(2*Page::kPageSize);
62 CHECK(mem != NULL); 64 CHECK(mem != NULL);
63 65
64 Address start = reinterpret_cast<Address>(mem); 66 Address start = reinterpret_cast<Address>(mem);
65 Address page_start = RoundUp(start, Page::kPageSize); 67 Address page_start = RoundUp(start, Page::kPageSize);
66 68
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 230
229 CHECK(!lo->IsEmpty()); 231 CHECK(!lo->IsEmpty());
230 232
231 CHECK(lo->AllocateRaw(lo_size)->IsFailure()); 233 CHECK(lo->AllocateRaw(lo_size)->IsFailure());
232 234
233 lo->TearDown(); 235 lo->TearDown();
234 delete lo; 236 delete lo;
235 237
236 MemoryAllocator::TearDown(); 238 MemoryAllocator::TearDown();
237 } 239 }
OLDNEW
« src/ia32/codegen-ia32.cc ('K') | « test/cctest/test-mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698