Index: tools/clang/blink_gc_plugin/Edge.h |
diff --git a/tools/clang/blink_gc_plugin/Edge.h b/tools/clang/blink_gc_plugin/Edge.h |
index 2ea8e544e8e6905ada5f967321683fde0ed8a89a..eca3158d75f925e1b7430991838ad4bea890c058 100644 |
--- a/tools/clang/blink_gc_plugin/Edge.h |
+++ b/tools/clang/blink_gc_plugin/Edge.h |
@@ -5,7 +5,9 @@ |
#ifndef TOOLS_BLINK_GC_PLUGIN_EDGE_H_ |
#define TOOLS_BLINK_GC_PLUGIN_EDGE_H_ |
+#include <cassert> |
#include <deque> |
+#include <vector> |
#include "TracingStatus.h" |
@@ -124,8 +126,14 @@ class PtrEdge : public Edge { |
class RawPtr : public PtrEdge { |
public: |
- explicit RawPtr(Edge* ptr, bool is_ptr_class) |
- : PtrEdge(ptr), is_ptr_class_(is_ptr_class) { } |
+ RawPtr(Edge* ptr, bool is_ptr_class, bool is_ref_type) |
+ : PtrEdge(ptr) |
+ , is_ptr_class_(is_ptr_class) |
+ , is_ref_type_(is_ref_type) |
+ { |
+ assert(!(is_ptr_class_ && is_ref_type_)); |
+ } |
+ |
bool IsRawPtr() { return true; } |
bool IsRawPtrClass() { return is_ptr_class_; } |
LivenessKind Kind() { return kWeak; } |
@@ -134,8 +142,11 @@ class RawPtr : public PtrEdge { |
return TracingStatus::Unneeded(); |
} |
void Accept(EdgeVisitor* visitor) { visitor->VisitRawPtr(this); } |
+ |
+ bool HasReferenceType() { return is_ref_type_; } |
private: |
bool is_ptr_class_; |
+ bool is_ref_type_; |
}; |
class RefPtr : public PtrEdge { |