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

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

Issue 129783006: Increase the number of allocations in OptimizedPretenuringdoubleArrayLiterals test to make sure tha… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 2367
2368 TEST(OptimizedPretenuringdoubleArrayLiterals) { 2368 TEST(OptimizedPretenuringdoubleArrayLiterals) {
2369 i::FLAG_allow_natives_syntax = true; 2369 i::FLAG_allow_natives_syntax = true;
2370 i::FLAG_max_new_space_size = 2048; 2370 i::FLAG_max_new_space_size = 2048;
2371 CcTest::InitializeVM(); 2371 CcTest::InitializeVM();
2372 if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return; 2372 if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
2373 if (i::FLAG_gc_global || i::FLAG_stress_compaction) return; 2373 if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
2374 v8::HandleScope scope(CcTest::isolate()); 2374 v8::HandleScope scope(CcTest::isolate());
2375 2375
2376 v8::Local<v8::Value> res = CompileRun( 2376 v8::Local<v8::Value> res = CompileRun(
2377 "var number_elements = 20000;" 2377 "var number_elements = 30000;"
2378 "var elements = new Array(number_elements);" 2378 "var elements = new Array(number_elements);"
2379 "function f() {" 2379 "function f() {"
2380 " for (var i = 0; i < number_elements; i++) {" 2380 " for (var i = 0; i < number_elements; i++) {"
2381 " elements[i] = [1.1, 2.2, 3.3];" 2381 " elements[i] = [1.1, 2.2, 3.3];"
2382 " }" 2382 " }"
2383 " return elements[number_elements - 1];" 2383 " return elements[number_elements - 1];"
2384 "};" 2384 "};"
2385 "f(); f(); f();" 2385 "f(); f(); f();"
2386 "%OptimizeFunctionOnNextCall(f);" 2386 "%OptimizeFunctionOnNextCall(f);"
2387 "f();"); 2387 "f();");
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
3740 code = scope.CloseAndEscape(Handle<Code>(bar->code())); 3740 code = scope.CloseAndEscape(Handle<Code>(bar->code()));
3741 } 3741 }
3742 3742
3743 // Now make sure that a gc should get rid of the function 3743 // Now make sure that a gc should get rid of the function
3744 for (int i = 0; i < 4; i++) { 3744 for (int i = 0; i < 4; i++) {
3745 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); 3745 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
3746 } 3746 }
3747 3747
3748 ASSERT(code->marked_for_deoptimization()); 3748 ASSERT(code->marked_for_deoptimization());
3749 } 3749 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698