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

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

Issue 1878063004: Revert of Visit the Optimized Code Map on first call rather than closure creation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/cctest.status ('k') | test/cctest/test-compiler.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 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 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 Handle<Object> f_value = 1539 Handle<Object> f_value =
1540 Object::GetProperty(isolate->global_object(), f_name).ToHandleChecked(); 1540 Object::GetProperty(isolate->global_object(), f_name).ToHandleChecked();
1541 Handle<JSFunction> f_function = Handle<JSFunction>::cast(f_value); 1541 Handle<JSFunction> f_function = Handle<JSFunction>::cast(f_value);
1542 CHECK(f_function->is_compiled()); 1542 CHECK(f_function->is_compiled());
1543 1543
1544 // Check g is not compiled. 1544 // Check g is not compiled.
1545 Handle<String> g_name = factory->InternalizeUtf8String("g"); 1545 Handle<String> g_name = factory->InternalizeUtf8String("g");
1546 Handle<Object> g_value = 1546 Handle<Object> g_value =
1547 Object::GetProperty(isolate->global_object(), g_name).ToHandleChecked(); 1547 Object::GetProperty(isolate->global_object(), g_name).ToHandleChecked();
1548 Handle<JSFunction> g_function = Handle<JSFunction>::cast(g_value); 1548 Handle<JSFunction> g_function = Handle<JSFunction>::cast(g_value);
1549 CHECK(!g_function->is_compiled()); 1549 // TODO(mvstanton): change to check that g is *not* compiled when optimized
1550 // cache
1551 // map lookup moves to the compile lazy builtin.
1552 CHECK(g_function->is_compiled());
1550 1553
1551 SimulateIncrementalMarking(heap); 1554 SimulateIncrementalMarking(heap);
1552 CompileRun("%OptimizeFunctionOnNextCall(f); f();"); 1555 CompileRun("%OptimizeFunctionOnNextCall(f); f();");
1553 1556
1554 // g should now have available an optimized function, unmarked by gc. The 1557 // g should now have available an optimized function, unmarked by gc. The
1555 // CompileLazy built-in will discover it and install it in the closure, and 1558 // CompileLazy built-in will discover it and install it in the closure, and
1556 // the incremental write barrier should be used. 1559 // the incremental write barrier should be used.
1557 CompileRun("g();"); 1560 CompileRun("g();");
1558 CHECK(g_function->is_compiled()); 1561 CHECK(g_function->is_compiled());
1559 } 1562 }
(...skipping 5038 matching lines...) Expand 10 before | Expand all | Expand 10 after
6598 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1); 6601 heap->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>(arrays[j], N - 1);
6599 } 6602 }
6600 } 6603 }
6601 // Force allocation from the free list. 6604 // Force allocation from the free list.
6602 heap->set_force_oom(true); 6605 heap->set_force_oom(true);
6603 heap->CollectGarbage(OLD_SPACE); 6606 heap->CollectGarbage(OLD_SPACE);
6604 } 6607 }
6605 6608
6606 } // namespace internal 6609 } // namespace internal
6607 } // namespace v8 6610 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698