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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 5429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5440 explicit AdvanceTracingActions(ForceCompletionAction force_completion_) | 5440 explicit AdvanceTracingActions(ForceCompletionAction force_completion_) |
5441 : force_completion(force_completion_) {} | 5441 : force_completion(force_completion_) {} |
5442 | 5442 |
5443 ForceCompletionAction force_completion; | 5443 ForceCompletionAction force_completion; |
5444 }; | 5444 }; |
5445 /** | 5445 /** |
5446 * V8 will call this method with internal fields of found wrappers. | 5446 * V8 will call this method with internal fields of found wrappers. |
5447 * Embedder is expected to store them in it's marking deque and trace | 5447 * Embedder is expected to store them in it's marking deque and trace |
5448 * reachable wrappers from them when asked by AdvanceTracing method. | 5448 * reachable wrappers from them when asked by AdvanceTracing method. |
5449 */ | 5449 */ |
5450 // TODO(hlopko): Make pure virtual after migration | |
5451 virtual void RegisterV8References( | 5450 virtual void RegisterV8References( |
5452 const std::vector<std::pair<void*, void*> >& internal_fields) {} | 5451 const std::vector<std::pair<void*, void*> >& internal_fields) = 0; |
5453 /** | |
5454 * **Deprecated** | |
5455 */ | |
5456 // TODO(hlopko): Remove after migration | |
5457 virtual void TraceWrappersFrom( | |
5458 const std::vector<std::pair<void*, void*> >& internal_fields) {} | |
5459 /** | 5452 /** |
5460 * V8 will call this method at the beginning of the gc cycle. | 5453 * V8 will call this method at the beginning of the gc cycle. |
5461 */ | 5454 */ |
5462 virtual void TracePrologue() = 0; | 5455 virtual void TracePrologue() = 0; |
5463 /** | 5456 /** |
5464 * Embedder is expected to trace its heap starting from wrappers reported by | 5457 * Embedder is expected to trace its heap starting from wrappers reported by |
5465 * RegisterV8References method, and call | 5458 * RegisterV8References method, and call |
5466 * PersistentBase::RegisterExternalReference() on all reachable wrappers. | 5459 * PersistentBase::RegisterExternalReference() on all reachable wrappers. |
5467 * Embedder is expected to stop tracing by the given deadline. | 5460 * Embedder is expected to stop tracing by the given deadline. |
5468 * | 5461 * |
5469 * Returns true if there is still work to do. | 5462 * Returns true if there is still work to do. |
5470 */ | 5463 */ |
5471 // TODO(hlopko): Make pure virtual after migration | |
5472 virtual bool AdvanceTracing(double deadline_in_ms, | 5464 virtual bool AdvanceTracing(double deadline_in_ms, |
5473 AdvanceTracingActions actions) { | 5465 AdvanceTracingActions actions) = 0; |
5474 return false; | |
5475 } | |
5476 /** | 5466 /** |
5477 * V8 will call this method at the end of the gc cycle. Allocation is *not* | 5467 * V8 will call this method at the end of the gc cycle. Allocation is *not* |
5478 * allowed in the TraceEpilogue. | 5468 * allowed in the TraceEpilogue. |
5479 */ | 5469 */ |
5480 virtual void TraceEpilogue() = 0; | 5470 virtual void TraceEpilogue() = 0; |
5481 | 5471 |
5482 protected: | 5472 protected: |
5483 virtual ~EmbedderHeapTracer() = default; | 5473 virtual ~EmbedderHeapTracer() = default; |
5484 }; | 5474 }; |
5485 | 5475 |
(...skipping 3328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8814 */ | 8804 */ |
8815 | 8805 |
8816 | 8806 |
8817 } // namespace v8 | 8807 } // namespace v8 |
8818 | 8808 |
8819 | 8809 |
8820 #undef TYPE_CHECK | 8810 #undef TYPE_CHECK |
8821 | 8811 |
8822 | 8812 |
8823 #endif // INCLUDE_V8_H_ | 8813 #endif // INCLUDE_V8_H_ |
OLD | NEW |