summaryrefslogtreecommitdiff
path: root/gcc/type-walker.hpp
blob: 0f775d170e83a0ea842426b9b58317aefaafd705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#pragma once

#include <set>

class TypeWalker {
protected:
  typedef std::set<const_tree> tset_t;
private:
  tset_t tset;

  void _walk(const_tree t, tset_t &tset);
  void _walk_wrapper(const_tree t, tset_t &tset);
  void _walk_record_or_union(const_tree t, tset_t &tset);
  void _walk_function_or_method(const_tree t, tset_t &tset);
  virtual bool is_memoized(const_tree t) { return false; };

  virtual void _walk_void_pre(const_tree t) {};
  void walk_void(const_tree t, tset_t &tset);
  void _walk_void(const_tree t, tset_t &tset);
  virtual void _walk_void_post(const_tree t) {};
  virtual void _walk_integer_pre(const_tree t) {};
  void walk_integer(const_tree t, tset_t &tset);
  void _walk_integer(const_tree t, tset_t &tset);
  virtual void _walk_integer_post(const_tree t) {};
  virtual void _walk_real_pre(const_tree t) {};
  void walk_real(const_tree t, tset_t &tset);
  void _walk_real(const_tree t, tset_t &tset);
  virtual void _walk_real_post(const_tree t) {};
  virtual void _walk_fixed_point_pre(const_tree t) {};
  void walk_fixed_point(const_tree t, tset_t &tset);
  void _walk_fixed_point(const_tree t, tset_t &tset);
  virtual void _walk_fixed_point_post(const_tree t) {};
  virtual void _walk_complex_pre(const_tree t) {};
  void _walk_complex(const_tree t, tset_t &tset);
  void walk_complex(const_tree t, tset_t &tset);
  virtual void _walk_complex_post(const_tree t) {};
  virtual void _walk_enumeral_pre(const_tree t) {};
  void walk_enumeral(const_tree t, tset_t &tset);
  void _walk_enumeral(const_tree t, tset_t &tset);
  virtual void _walk_enumeral_post(const_tree t) {};
  virtual void _walk_boolean_pre(const_tree t) {};
  void walk_boolean(const_tree t, tset_t &tset);
  void _walk_boolean(const_tree t, tset_t &tset);
  virtual void _walk_boolean_post(const_tree t) {};
  virtual void _walk_offset_pre(const_tree t) {};
  void walk_offset(const_tree t, tset_t &tset);
  void _walk_offset(const_tree t, tset_t &tset);
  virtual void _walk_offset_post(const_tree t) {};
  virtual void _walk_record_pre(const_tree t) {};
  void walk_record(const_tree t, tset_t &tset);
  void _walk_record(const_tree t, tset_t &tset);
  virtual void _walk_record_post(const_tree t) {};
  virtual void _walk_pointer_pre(const_tree t) {};
  void walk_pointer(const_tree t, tset_t &tset);
  void _walk_pointer(const_tree t, tset_t &tset);
  virtual void _walk_pointer_post(const_tree t) {};
  virtual void _walk_reference_pre(const_tree t) {};
  void walk_reference(const_tree t, tset_t &tset);
  void _walk_reference(const_tree t, tset_t &tset);
  virtual void _walk_reference_post(const_tree t) {};
  virtual void _walk_array_pre(const_tree t) {};
  void walk_array(const_tree t, tset_t &tset);
  void _walk_array(const_tree t, tset_t &tset);
  virtual void _walk_array_post(const_tree t) {};
  virtual void _walk_union_pre(const_tree t) {};
  void walk_union(const_tree t, tset_t &tset);
  void _walk_union(const_tree t, tset_t &tset);
  virtual void _walk_union_post(const_tree t) {};
  virtual void _walk_field_pre(const_tree) {};
  void walk_field(const_tree t, tset_t &tset);
  void _walk_field(const_tree t, tset_t &tset);
  virtual void _walk_field_post(const_tree t) {};
  virtual void _walk_return_pre(const_tree t) {};
  void walk_return(const_tree, tset_t &tset);
  void _walk_return(const_tree, tset_t &tset);
  virtual void _walk_return_post(const_tree t) {};
  virtual void _walk_args_pre(const_tree t) {};
  void walk_args(const_tree t, tset_t &tset);
  void _walk_args(const_tree t, tset_t &tset);
  virtual void _walk_args_post(const_tree t) {};
  virtual void _walk_arg_pre(const_tree t) {};
  void walk_arg(const_tree t, tset_t &tset);
  void _walk_arg(const_tree t, tset_t &tset);
  virtual void _walk_arg_post(const_tree t) {};
  virtual void _walk_function_pre(const_tree t) {};
  void walk_function(const_tree t, tset_t &tset);
  void _walk_function(const_tree t, tset_t &tset);
  virtual void _walk_function_post(const_tree t) {};
  virtual void _walk_method_pre(const_tree t) {};
  void walk_method(const_tree t, tset_t &tset);
  void _walk_method(const_tree t, tset_t &tset);
  virtual void _walk_method_post(const_tree t) {};
public:
  void walk(const_tree t);
  TypeWalker() {};
};