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

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

Issue 2310143002: [heap] Introduce enum of garbage collection reasons. (Closed)
Patch Set: rebase Created 4 years, 3 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 | « test/cctest/test-serialize.cc ('k') | test/cctest/test-unboxed-doubles.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 CHECK_GT(symbols[i]->Hash(), 0u); 64 CHECK_GT(symbols[i]->Hash(), 0u);
65 os << Brief(*symbols[i]) << "\n"; 65 os << Brief(*symbols[i]) << "\n";
66 #if OBJECT_PRINT 66 #if OBJECT_PRINT
67 symbols[i]->Print(os); 67 symbols[i]->Print(os);
68 #endif 68 #endif
69 #if VERIFY_HEAP 69 #if VERIFY_HEAP
70 symbols[i]->ObjectVerify(); 70 symbols[i]->ObjectVerify();
71 #endif 71 #endif
72 } 72 }
73 73
74 CcTest::heap()->CollectGarbage(i::NEW_SPACE); 74 CcTest::CollectGarbage(i::NEW_SPACE);
75 CcTest::heap()->CollectAllGarbage(); 75 CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
76 76
77 // All symbols should be distinct. 77 // All symbols should be distinct.
78 for (int i = 0; i < kNumSymbols; ++i) { 78 for (int i = 0; i < kNumSymbols; ++i) {
79 CHECK(symbols[i]->SameValue(*symbols[i])); 79 CHECK(symbols[i]->SameValue(*symbols[i]));
80 for (int j = i + 1; j < kNumSymbols; ++j) { 80 for (int j = i + 1; j < kNumSymbols; ++j) {
81 CHECK(!symbols[i]->SameValue(*symbols[j])); 81 CHECK(!symbols[i]->SameValue(*symbols[j]));
82 } 82 }
83 } 83 }
84 } 84 }
OLDNEW
« no previous file with comments | « test/cctest/test-serialize.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698