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/cctest.h

Issue 11299098: Make test-dictionary work for GC stress builder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 | « no previous file | test/cctest/test-alloc.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 228
229 // Pick a slightly different port to allow tests to be run in parallel. 229 // Pick a slightly different port to allow tests to be run in parallel.
230 static inline int FlagDependentPortOffset() { 230 static inline int FlagDependentPortOffset() {
231 return ::v8::internal::FLAG_crankshaft == false ? 100 : 231 return ::v8::internal::FLAG_crankshaft == false ? 100 :
232 ::v8::internal::FLAG_always_opt ? 200 : 0; 232 ::v8::internal::FLAG_always_opt ? 200 : 0;
233 } 233 }
234 234
235 235
236 // Helper function that simulates a fill new-space in the heap.
237 static inline void SimulateFullSpace(v8::internal::NewSpace* space) {
238 int new_linear_size = static_cast<int>(
239 *space->allocation_limit_address() - *space->allocation_top_address());
240 v8::internal::MaybeObject* maybe = space->AllocateRaw(new_linear_size);
241 v8::internal::FreeListNode* node = v8::internal::FreeListNode::cast(maybe);
242 node->set_size(space->heap(), new_linear_size);
243 }
244
245
246 // Helper function that simulates a full old-space in the heap.
247 static inline void SimulateFullSpace(v8::internal::PagedSpace* space) {
248 int old_linear_size = static_cast<int>(space->limit() - space->top());
249 space->Free(space->top(), old_linear_size);
250 space->SetTop(space->limit(), space->limit());
251 space->ResetFreeList();
252 space->ClearStats();
253 }
254
255
236 #endif // ifndef CCTEST_H_ 256 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698