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

Side by Side Diff: test/cctest/test-mark-compact.cc

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 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
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | test/cctest/test-profile-generator.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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 address -= kPointerSize; 63 address -= kPointerSize;
64 CHECK_EQ(address, value); 64 CHECK_EQ(address, value);
65 } 65 }
66 66
67 CHECK_EQ(NULL, address); 67 CHECK_EQ(NULL, address);
68 DeleteArray(mem); 68 DeleteArray(mem);
69 } 69 }
70 70
71 71
72 TEST(Promotion) { 72 TEST(Promotion) {
73 // This test requires compaction. If compaction is turned off, we
74 // skip the entire test.
75 if (FLAG_never_compact) return;
76
73 // Ensure that we get a compacting collection so that objects are promoted 77 // Ensure that we get a compacting collection so that objects are promoted
74 // from new space. 78 // from new space.
75 FLAG_gc_global = true; 79 FLAG_gc_global = true;
76 FLAG_always_compact = true; 80 FLAG_always_compact = true;
77 HEAP->ConfigureHeap(2*256*KB, 4*MB, 4*MB); 81 HEAP->ConfigureHeap(2*256*KB, 4*MB, 4*MB);
78 82
79 InitializeVM(); 83 InitializeVM();
80 84
81 v8::HandleScope sc; 85 v8::HandleScope sc;
82 86
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 Object** g2_objects[] = { g2s1.location(), g2s2.location() }; 353 Object** g2_objects[] = { g2s1.location(), g2s2.location() };
350 global_handles->AddGroup(g1_objects, 2); 354 global_handles->AddGroup(g1_objects, 2);
351 global_handles->AddGroup(g2_objects, 2); 355 global_handles->AddGroup(g2_objects, 2);
352 } 356 }
353 357
354 HEAP->CollectGarbage(OLD_POINTER_SPACE); 358 HEAP->CollectGarbage(OLD_POINTER_SPACE);
355 359
356 // All objects should be gone. 5 global handles in total. 360 // All objects should be gone. 5 global handles in total.
357 CHECK_EQ(5, NumberOfWeakCalls); 361 CHECK_EQ(5, NumberOfWeakCalls);
358 } 362 }
OLDNEW
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698