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

Side by Side Diff: test/cctest/cctest.h

Issue 49633004: Add --optimize_for_size to tests flag matrix. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | tools/run-tests.py » ('j') | tools/run-tests.py » ('J')
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 v8::ScriptOrigin origin(v8::String::New(origin_url), 317 v8::ScriptOrigin origin(v8::String::New(origin_url),
318 v8::Integer::New(line_number), 318 v8::Integer::New(line_number),
319 v8::Integer::New(column_number)); 319 v8::Integer::New(column_number));
320 return v8::Script::Compile(v8::String::New(source), &origin)->Run(); 320 return v8::Script::Compile(v8::String::New(source), &origin)->Run();
321 } 321 }
322 322
323 323
324 // Pick a slightly different port to allow tests to be run in parallel. 324 // Pick a slightly different port to allow tests to be run in parallel.
325 static inline int FlagDependentPortOffset() { 325 static inline int FlagDependentPortOffset() {
326 return ::v8::internal::FLAG_crankshaft == false ? 100 : 326 return ::v8::internal::FLAG_crankshaft == false ? 100 :
327 ::v8::internal::FLAG_always_opt ? 200 : 0; 327 ::v8::internal::FLAG_always_opt ? 200 :
328 ::v8::internal::FLAG_optimize_for_size ? 300 : 0;
328 } 329 }
329 330
330 331
331 // Helper function that simulates a full new-space in the heap. 332 // Helper function that simulates a full new-space in the heap.
332 static inline void SimulateFullSpace(v8::internal::NewSpace* space) { 333 static inline void SimulateFullSpace(v8::internal::NewSpace* space) {
333 int new_linear_size = static_cast<int>( 334 int new_linear_size = static_cast<int>(
334 *space->allocation_limit_address() - *space->allocation_top_address()); 335 *space->allocation_limit_address() - *space->allocation_top_address());
335 v8::internal::MaybeObject* maybe = space->AllocateRaw(new_linear_size); 336 v8::internal::MaybeObject* maybe = space->AllocateRaw(new_linear_size);
336 v8::internal::FreeListNode* node = v8::internal::FreeListNode::cast(maybe); 337 v8::internal::FreeListNode* node = v8::internal::FreeListNode::cast(maybe);
337 node->set_size(space->heap(), new_linear_size); 338 node->set_size(space->heap(), new_linear_size);
(...skipping 26 matching lines...) Expand all
364 CHECK_EQ(0, heap_profiler_->FindUntrackedObjects()); 365 CHECK_EQ(0, heap_profiler_->FindUntrackedObjects());
365 heap_profiler_->StopHeapAllocationsRecording(); 366 heap_profiler_->StopHeapAllocationsRecording();
366 } 367 }
367 368
368 private: 369 private:
369 i::HeapProfiler* heap_profiler_; 370 i::HeapProfiler* heap_profiler_;
370 }; 371 };
371 372
372 373
373 #endif // ifndef CCTEST_H_ 374 #endif // ifndef CCTEST_H_
OLDNEW
« no previous file with comments | « no previous file | tools/run-tests.py » ('j') | tools/run-tests.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698