A64: Decoder should not inherit from DecoderVisitor
authorjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Feb 2014 11:54:55 +0000 (11:54 +0000)
committerjochen@chromium.org <jochen@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 26 Feb 2014 11:54:55 +0000 (11:54 +0000)
BUG=none
R=ulan@chromium.org, rodolph.perfetta@arm.com
LOG=n

Review URL: https://codereview.chromium.org/177073013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19560 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/a64/decoder-a64.h

index 0f53c34..1a7f6c4 100644 (file)
@@ -89,23 +89,17 @@ namespace internal {
 // must provide implementations for all of these functions.
 class DecoderVisitor {
  public:
+  virtual ~DecoderVisitor() {}
+
   #define DECLARE(A) virtual void Visit##A(Instruction* instr) = 0;
   VISITOR_LIST(DECLARE)
   #undef DECLARE
-
-  virtual ~DecoderVisitor() {}
-
- private:
-  // Visitors are registered in a list.
-  std::list<DecoderVisitor*> visitors_;
-
-  friend class Decoder;
 };
 
 
-class Decoder: public DecoderVisitor {
+class Decoder {
  public:
-  explicit Decoder() {}
+  Decoder() {}
 
   // Top-level instruction decoder function. Decodes an instruction and calls
   // the visitor functions registered with the Decoder class.
@@ -194,6 +188,9 @@ class Decoder: public DecoderVisitor {
   // tree, and call the corresponding visitors.
   // On entry, instruction bits 27:25 = 0x7.
   void DecodeAdvSIMDDataProcessing(Instruction* instr);
+
+  // Visitors are registered in a list.
+  std::list<DecoderVisitor*> visitors_;
 };