Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Unified Diff: tools/clang/blink_gc_plugin/Edge.h

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/blink_gc_plugin/Config.cpp ('k') | tools/clang/blink_gc_plugin/JsonWriter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « tools/clang/blink_gc_plugin/Config.cpp ('k') | tools/clang/blink_gc_plugin/JsonWriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698