Chromium Code Reviews

Side by Side Diff: src/heap/objects-visiting-inl.h

Issue 1233073005: Debugger: prepare code for debugging on a per-function basis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_VISITING_INL_H_ 5 #ifndef V8_OBJECTS_VISITING_INL_H_
6 #define V8_OBJECTS_VISITING_INL_H_ 6 #define V8_OBJECTS_VISITING_INL_H_
7 7
8 #include "src/heap/objects-visiting.h" 8 #include "src/heap/objects-visiting.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 641 matching lines...)
652 template <typename StaticVisitor> 652 template <typename StaticVisitor>
653 bool StaticMarkingVisitor<StaticVisitor>::IsFlushable( 653 bool StaticMarkingVisitor<StaticVisitor>::IsFlushable(
654 Heap* heap, SharedFunctionInfo* shared_info) { 654 Heap* heap, SharedFunctionInfo* shared_info) {
655 // Code is either on stack, in compilation cache or referenced 655 // Code is either on stack, in compilation cache or referenced
656 // by optimized version of function. 656 // by optimized version of function.
657 MarkBit code_mark = Marking::MarkBitFrom(shared_info->code()); 657 MarkBit code_mark = Marking::MarkBitFrom(shared_info->code());
658 if (Marking::IsBlackOrGrey(code_mark)) { 658 if (Marking::IsBlackOrGrey(code_mark)) {
659 return false; 659 return false;
660 } 660 }
661 661
662 // Function is subject to debugging, do not flush.
663 if (shared_info->HasDebugInfo()) {
Michael Starzinger 2015/07/20 11:33:41 Ouch, this is scary! Is this a hard requirement? I
Yang 2015/07/20 12:13:47 Done.
664 return false;
665 }
666
662 // The function must be compiled and have the source code available, 667 // The function must be compiled and have the source code available,
663 // to be able to recompile it in case we need the function again. 668 // to be able to recompile it in case we need the function again.
664 if (!(shared_info->is_compiled() && HasSourceCode(heap, shared_info))) { 669 if (!(shared_info->is_compiled() && HasSourceCode(heap, shared_info))) {
665 return false; 670 return false;
666 } 671 }
667 672
668 // We never flush code for API functions. 673 // We never flush code for API functions.
669 Object* function_data = shared_info->function_data(); 674 Object* function_data = shared_info->function_data();
670 if (function_data->IsFunctionTemplateInfo()) { 675 if (function_data->IsFunctionTemplateInfo()) {
671 return false; 676 return false;
(...skipping 163 matching lines...)
835 840
836 RelocIterator it(this, mode_mask); 841 RelocIterator it(this, mode_mask);
837 for (; !it.done(); it.next()) { 842 for (; !it.done(); it.next()) {
838 it.rinfo()->template Visit<StaticVisitor>(heap); 843 it.rinfo()->template Visit<StaticVisitor>(heap);
839 } 844 }
840 } 845 }
841 } 846 }
842 } // namespace v8::internal 847 } // namespace v8::internal
843 848
844 #endif // V8_OBJECTS_VISITING_INL_H_ 849 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« src/debug.cc ('K') | « src/heap/mark-compact.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine