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

Unified Diff: runtime/vm/program_visitor.h

Issue 2572423004: Reapply "Save and restore feedback from JIT." (Closed)
Patch Set: Created 4 years 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
Index: runtime/vm/program_visitor.h
diff --git a/runtime/vm/program_visitor.h b/runtime/vm/program_visitor.h
new file mode 100644
index 0000000000000000000000000000000000000000..5ac81308622799902692944f32bed8a640e0f925
--- /dev/null
+++ b/runtime/vm/program_visitor.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_VM_PROGRAM_VISITOR_H_
+#define RUNTIME_VM_PROGRAM_VISITOR_H_
+
+#include "vm/allocation.h"
+
+namespace dart {
+
+class Function;
+class Class;
+
+template <typename T>
+class Visitor : public ValueObject {
+ public:
+ virtual ~Visitor() {}
+ virtual void Visit(const T& obj) = 0;
+};
+
+typedef Visitor<Function> FunctionVisitor;
+typedef Visitor<Class> ClassVisitor;
+
+class ProgramVisitor : public AllStatic {
+ public:
+ static void VisitFunctions(FunctionVisitor* visitor);
+ static void VisitClasses(ClassVisitor* visitor);
+};
+
+} // namespace dart
+
+#endif // RUNTIME_VM_PROGRAM_VISITOR_H_

Powered by Google App Engine
This is Rietveld 408576698