@@ -1731,44 +1731,6 @@ void Debug::PrepareForBreakPoints() {
17311731 // functions as debugging does not work with optimized code.
17321732 if (!has_break_points_) {
17331733 Deoptimizer::DeoptimizeAll ();
1734-
1735- AssertNoAllocation no_allocation;
1736- Builtins* builtins = isolate_->builtins ();
1737- Code* lazy_compile = builtins->builtin (Builtins::kLazyCompile );
1738-
1739- // Find all non-optimized code functions with activation frames on
1740- // the stack.
1741- List<JSFunction*> active_functions (100 );
1742- for (JavaScriptFrameIterator it (isolate_); !it.done (); it.Advance ()) {
1743- JavaScriptFrame* frame = it.frame ();
1744- if (frame->function ()->IsJSFunction ()) {
1745- JSFunction* function = JSFunction::cast (frame->function ());
1746- if (function->code ()->kind () == Code::FUNCTION)
1747- active_functions.Add (function);
1748- }
1749- }
1750- active_functions.Sort ();
1751-
1752- // Scan the heap for all non-optimized functions which has no
1753- // debug break slots.
1754- HeapIterator iterator;
1755- HeapObject* obj = NULL ;
1756- while (((obj = iterator.next ()) != NULL )) {
1757- if (obj->IsJSFunction ()) {
1758- JSFunction* function = JSFunction::cast (obj);
1759- if (function->shared ()->allows_lazy_compilation () &&
1760- function->shared ()->script ()->IsScript () &&
1761- function->code ()->kind () == Code::FUNCTION &&
1762- !function->code ()->has_debug_break_slots ()) {
1763- bool has_activation =
1764- SortedListBSearch<JSFunction*>(active_functions, function) != -1 ;
1765- if (!has_activation) {
1766- function->set_code (lazy_compile);
1767- function->shared ()->set_code (lazy_compile);
1768- }
1769- }
1770- }
1771- }
17721734 }
17731735}
17741736
0 commit comments