OLD | NEW |
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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1899 ThreadLocalTop* top, | 1899 ThreadLocalTop* top, |
1900 List<Handle<JSFunction> >* active_functions, | 1900 List<Handle<JSFunction> >* active_functions, |
1901 Object* active_code_marker) { | 1901 Object* active_code_marker) { |
1902 // Find all non-optimized code functions with activation frames | 1902 // Find all non-optimized code functions with activation frames |
1903 // on the stack. This includes functions which have optimized | 1903 // on the stack. This includes functions which have optimized |
1904 // activations (including inlined functions) on the stack as the | 1904 // activations (including inlined functions) on the stack as the |
1905 // non-optimized code is needed for the lazy deoptimization. | 1905 // non-optimized code is needed for the lazy deoptimization. |
1906 for (JavaScriptFrameIterator it(isolate, top); !it.done(); it.Advance()) { | 1906 for (JavaScriptFrameIterator it(isolate, top); !it.done(); it.Advance()) { |
1907 JavaScriptFrame* frame = it.frame(); | 1907 JavaScriptFrame* frame = it.frame(); |
1908 if (frame->is_optimized()) { | 1908 if (frame->is_optimized()) { |
1909 List<JSFunction*> functions(Compiler::kMaxInliningLevels + 1); | 1909 List<JSFunction*> functions(FLAG_max_inlining_levels + 1); |
1910 frame->GetFunctions(&functions); | 1910 frame->GetFunctions(&functions); |
1911 for (int i = 0; i < functions.length(); i++) { | 1911 for (int i = 0; i < functions.length(); i++) { |
1912 JSFunction* function = functions[i]; | 1912 JSFunction* function = functions[i]; |
1913 active_functions->Add(Handle<JSFunction>(function)); | 1913 active_functions->Add(Handle<JSFunction>(function)); |
1914 function->shared()->code()->set_gc_metadata(active_code_marker); | 1914 function->shared()->code()->set_gc_metadata(active_code_marker); |
1915 } | 1915 } |
1916 } else if (frame->function()->IsJSFunction()) { | 1916 } else if (frame->function()->IsJSFunction()) { |
1917 JSFunction* function = frame->function(); | 1917 JSFunction* function = frame->function(); |
1918 ASSERT(frame->LookupCode()->kind() == Code::FUNCTION); | 1918 ASSERT(frame->LookupCode()->kind() == Code::FUNCTION); |
1919 active_functions->Add(Handle<JSFunction>(function)); | 1919 active_functions->Add(Handle<JSFunction>(function)); |
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3858 { | 3858 { |
3859 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3859 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
3860 isolate_->debugger()->CallMessageDispatchHandler(); | 3860 isolate_->debugger()->CallMessageDispatchHandler(); |
3861 } | 3861 } |
3862 } | 3862 } |
3863 } | 3863 } |
3864 | 3864 |
3865 #endif // ENABLE_DEBUGGER_SUPPORT | 3865 #endif // ENABLE_DEBUGGER_SUPPORT |
3866 | 3866 |
3867 } } // namespace v8::internal | 3867 } } // namespace v8::internal |
OLD | NEW |