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

Unified Diff: test/cctest/test-heap.cc

Issue 1202173002: Remove --pretenuring-call-new (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix 64 bit release build break. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/cctest/test-mementos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index fd85b023be6dff3e7863817fde736fbfaffbfbcd..4c286f2c1c14e38eb22694ac933850ab7d27099c 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -3312,106 +3312,6 @@ TEST(OptimizedPretenuringNestedDoubleLiterals) {
}
-// Make sure pretenuring feedback is gathered for constructed objects as well
-// as for literals.
-TEST(OptimizedPretenuringConstructorCalls) {
- if (!i::FLAG_pretenuring_call_new) {
- // FLAG_pretenuring_call_new needs to be synced with the snapshot.
- return;
- }
- i::FLAG_allow_natives_syntax = true;
- i::FLAG_expose_gc = true;
- CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
- if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
- v8::HandleScope scope(CcTest::isolate());
-
- // Grow new space unitl maximum capacity reached.
- while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) {
- CcTest::heap()->new_space()->Grow();
- }
-
- i::ScopedVector<char> source(1024);
- // Call new is doing slack tracking for the first
- // JSFunction::kGenerousAllocationCount allocations, and we can't find
- // mementos during that time.
- i::SNPrintF(
- source,
- "var number_elements = %d;"
- "var elements = new Array(number_elements);"
- "function foo() {"
- " this.a = 3;"
- " this.b = {};"
- "}"
- "function f() {"
- " for (var i = 0; i < number_elements; i++) {"
- " elements[i] = new foo();"
- " }"
- " return elements[number_elements - 1];"
- "};"
- "f(); gc();"
- "f(); f();"
- "%%OptimizeFunctionOnNextCall(f);"
- "f();",
- AllocationSite::kPretenureMinimumCreated +
- JSFunction::kGenerousAllocationCount);
-
- v8::Local<v8::Value> res = CompileRun(source.start());
-
- Handle<JSObject> o =
- v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res));
-
- CHECK(CcTest::heap()->InOldSpace(*o));
-}
-
-
-TEST(OptimizedPretenuringCallNew) {
- if (!i::FLAG_pretenuring_call_new) {
- // FLAG_pretenuring_call_new needs to be synced with the snapshot.
- return;
- }
- i::FLAG_allow_natives_syntax = true;
- i::FLAG_expose_gc = true;
- CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
- if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
- v8::HandleScope scope(CcTest::isolate());
-
- // Grow new space unitl maximum capacity reached.
- while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) {
- CcTest::heap()->new_space()->Grow();
- }
-
- i::ScopedVector<char> source(1024);
- // Call new is doing slack tracking for the first
- // JSFunction::kGenerousAllocationCount allocations, and we can't find
- // mementos during that time.
- i::SNPrintF(
- source,
- "var number_elements = %d;"
- "var elements = new Array(number_elements);"
- "function g() { this.a = 0; }"
- "function f() {"
- " for (var i = 0; i < number_elements; i++) {"
- " elements[i] = new g();"
- " }"
- " return elements[number_elements - 1];"
- "};"
- "f(); gc();"
- "f(); f();"
- "%%OptimizeFunctionOnNextCall(f);"
- "f();",
- AllocationSite::kPretenureMinimumCreated +
- JSFunction::kGenerousAllocationCount);
-
- v8::Local<v8::Value> res = CompileRun(source.start());
-
- Handle<JSObject> o =
- v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res));
- CHECK(CcTest::heap()->InOldSpace(*o));
-}
-
-
// Test regular array literals allocation.
TEST(OptimizedAllocationArrayLiterals) {
i::FLAG_allow_natives_syntax = true;
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/cctest/test-mementos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698