diff options
Diffstat (limited to 'deps/v8/src/compiler/js-heap-broker.h')
-rw-r--r-- | deps/v8/src/compiler/js-heap-broker.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/deps/v8/src/compiler/js-heap-broker.h b/deps/v8/src/compiler/js-heap-broker.h index 8c2622bf48..c9667a2fed 100644 --- a/deps/v8/src/compiler/js-heap-broker.h +++ b/deps/v8/src/compiler/js-heap-broker.h @@ -34,6 +34,12 @@ std::ostream& operator<<(std::ostream& os, const ObjectRef& ref); broker->Trace() << x << '\n'; \ } while (false) +#define TRACE_BROKER_MEMORY(broker, x) \ + do { \ + if (broker->tracing_enabled() && FLAG_trace_heap_broker_memory) \ + broker->Trace() << x << std::endl; \ + } while (false) + #define TRACE_BROKER_MISSING(broker, x) \ do { \ if (broker->tracing_enabled()) \ @@ -86,6 +92,10 @@ class V8_EXPORT_PRIVATE JSHeapBroker { void Retire(); bool SerializingAllowed() const; +#ifdef DEBUG + void PrintRefsAnalysis() const; +#endif // DEBUG + // Returns nullptr iff handle unknown. ObjectData* GetData(Handle<Object>) const; // Never returns nullptr. @@ -125,6 +135,12 @@ class V8_EXPORT_PRIVATE JSHeapBroker { FeedbackSource const& source); ProcessedFeedback const& GetFeedbackForInstanceOf( FeedbackSource const& source); + ProcessedFeedback const& GetFeedbackForArrayOrObjectLiteral( + FeedbackSource const& source); + ProcessedFeedback const& GetFeedbackForRegExpLiteral( + FeedbackSource const& source); + ProcessedFeedback const& GetFeedbackForTemplateObject( + FeedbackSource const& source); ProcessedFeedback const& GetFeedbackForPropertyAccess( FeedbackSource const& source, AccessMode mode, base::Optional<NameRef> static_name); @@ -143,6 +159,12 @@ class V8_EXPORT_PRIVATE JSHeapBroker { ProcessedFeedback const& ProcessFeedbackForPropertyAccess( FeedbackSource const& source, AccessMode mode, base::Optional<NameRef> static_name); + ProcessedFeedback const& ProcessFeedbackForArrayOrObjectLiteral( + FeedbackSource const& source); + ProcessedFeedback const& ProcessFeedbackForRegExpLiteral( + FeedbackSource const& source); + ProcessedFeedback const& ProcessFeedbackForTemplateObject( + FeedbackSource const& source); bool FeedbackIsInsufficient(FeedbackSource const& source) const; @@ -157,7 +179,7 @@ class V8_EXPORT_PRIVATE JSHeapBroker { StringRef GetTypedArrayStringTag(ElementsKind kind); - std::ostream& Trace(); + std::ostream& Trace() const; void IncrementTracingIndentation(); void DecrementTracingIndentation(); @@ -182,6 +204,12 @@ class V8_EXPORT_PRIVATE JSHeapBroker { ProcessedFeedback const& ReadFeedbackForPropertyAccess( FeedbackSource const& source, AccessMode mode, base::Optional<NameRef> static_name); + ProcessedFeedback const& ReadFeedbackForArrayOrObjectLiteral( + FeedbackSource const& source); + ProcessedFeedback const& ReadFeedbackForRegExpLiteral( + FeedbackSource const& source); + ProcessedFeedback const& ReadFeedbackForTemplateObject( + FeedbackSource const& source); void InitializeRefsMap(); void CollectArrayAndObjectPrototypes(); @@ -199,7 +227,7 @@ class V8_EXPORT_PRIVATE JSHeapBroker { array_and_object_prototypes_; BrokerMode mode_ = kDisabled; bool const tracing_enabled_; - StdoutStream trace_out_; + mutable StdoutStream trace_out_; unsigned trace_indentation_ = 0; PerIsolateCompilerCache* compiler_cache_ = nullptr; ZoneUnorderedMap<FeedbackSource, ProcessedFeedback const*, |