| OLD | NEW | 
|---|
| 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/array-buffer-tracker.h" | 8 #include "src/heap/array-buffer-tracker.h" | 
| 9 #include "src/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" | 
| 10 #include "src/ic/ic-state.h" | 10 #include "src/ic/ic-state.h" | 
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 465       // the decision until we see all functions that point to the same | 465       // the decision until we see all functions that point to the same | 
| 466       // SharedFunctionInfo because some of them might be optimized. | 466       // SharedFunctionInfo because some of them might be optimized. | 
| 467       // That would also make the non-optimized version of the code | 467       // That would also make the non-optimized version of the code | 
| 468       // non-flushable, because it is required for bailing out from | 468       // non-flushable, because it is required for bailing out from | 
| 469       // optimized code. | 469       // optimized code. | 
| 470       collector->code_flusher()->AddCandidate(shared); | 470       collector->code_flusher()->AddCandidate(shared); | 
| 471       // Treat the reference to the code object weakly. | 471       // Treat the reference to the code object weakly. | 
| 472       VisitSharedFunctionInfoWeakCode(heap, object); | 472       VisitSharedFunctionInfoWeakCode(heap, object); | 
| 473       return; | 473       return; | 
| 474     } | 474     } | 
| 475   } else { |  | 
| 476     // TODO(mstarzinger): Drop this case, it shouldn't be done here! |  | 
| 477     if (!shared->optimized_code_map()->IsSmi()) { |  | 
| 478       // Flush optimized code map on major GCs without code flushing, |  | 
| 479       // needed because cached code doesn't contain breakpoints. |  | 
| 480       shared->ClearOptimizedCodeMap(); |  | 
| 481     } |  | 
| 482   } | 475   } | 
| 483   VisitSharedFunctionInfoStrongCode(heap, object); | 476   VisitSharedFunctionInfoStrongCode(heap, object); | 
| 484 } | 477 } | 
| 485 | 478 | 
| 486 | 479 | 
| 487 template <typename StaticVisitor> | 480 template <typename StaticVisitor> | 
| 488 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(Map* map, | 481 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(Map* map, | 
| 489                                                           HeapObject* object) { | 482                                                           HeapObject* object) { | 
| 490   Heap* heap = map->GetHeap(); | 483   Heap* heap = map->GetHeap(); | 
| 491   JSFunction* function = JSFunction::cast(object); | 484   JSFunction* function = JSFunction::cast(object); | 
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 899 | 892 | 
| 900   RelocIterator it(this, mode_mask); | 893   RelocIterator it(this, mode_mask); | 
| 901   for (; !it.done(); it.next()) { | 894   for (; !it.done(); it.next()) { | 
| 902     it.rinfo()->template Visit<StaticVisitor>(heap); | 895     it.rinfo()->template Visit<StaticVisitor>(heap); | 
| 903   } | 896   } | 
| 904 } | 897 } | 
| 905 }  // namespace internal | 898 }  // namespace internal | 
| 906 }  // namespace v8 | 899 }  // namespace v8 | 
| 907 | 900 | 
| 908 #endif  // V8_OBJECTS_VISITING_INL_H_ | 901 #endif  // V8_OBJECTS_VISITING_INL_H_ | 
| OLD | NEW | 
|---|