Index: src/ast-this-access-visitor.h |
diff --git a/src/ast-this-access-visitor.h b/src/ast-this-access-visitor.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3317922ca5b8191911eab8ac14fe857f25e35a48 |
--- /dev/null |
+++ b/src/ast-this-access-visitor.h |
@@ -0,0 +1,34 @@ |
+// Copyright 2014 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef V8_AST_THIS_ACCESS_VISITOR_H_ |
+#define V8_AST_THIS_ACCESS_VISITOR_H_ |
+#include "src/ast.h" |
+ |
+namespace v8 { |
+namespace internal { |
+ |
+class AstThisAccessVisitor : public AstVisitor { |
+ public: |
+ explicit AstThisAccessVisitor(Zone* zone); |
+ |
+ bool UsesThis() { return uses_this_; } |
+ |
+#define DECLARE_VISIT(type) virtual void Visit##type(type* node); |
+ AST_NODE_LIST(DECLARE_VISIT) |
+#undef DECLARE_VISIT |
+ |
+ private: |
+ bool uses_this_; |
+ |
+ void VisitIfNotNull(AstNode* node) { |
+ if (node != NULL) Visit(node); |
+ } |
+ |
+ DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
+ DISALLOW_COPY_AND_ASSIGN(AstThisAccessVisitor); |
+}; |
+} |
+} // namespace v8::intrenal |
arv (Not doing code reviews)
2014/12/01 15:14:07
typo
|
+#endif // V8_AST_THIS_ACCESS_VISITOR_H_ |