Revert changes.
[repair.git] / Repair / RepairCompiler / MCC / Runtime / tmap.h
index 535ecc56ec383f9d984560795c820f0de3d57852..85f8619f044d5acc251178c42e3133470578f97d 100755 (executable)
@@ -1,49 +1,36 @@
 #ifndef TMAP_H
 #define TMAP_H
 #include "classlist.h"
 #ifndef TMAP_H
 #define TMAP_H
 #include "classlist.h"
-#include "redblack.h"
 
 
-#ifndef bool
-#define bool int
-#endif
-
-#ifndef true
-#define true 1
-#endif
-
-#ifndef false
-#define false 0
-#endif
-
-struct typemap * allocatetypemap();
-void freetypemap(struct typemap *);
-void typemapreset(struct typemap *);
-void initializetypemapstack(struct typemap *, void *high);
-
-void typemapallocate(struct typemap *, void *, int);
-void typemapdeallocate(struct typemap *, void *);
-bool typemapassertvalidmemoryB(struct typemap *, void* low, void* high);
-bool typemapasserttypeB(struct typemap *, void *ptr, void *high, int structure);
-bool typemapassertvalidmemory(struct typemap *, void* low, int structure);
-bool typemapasserttype(struct typemap *, void *ptr, int structure);
-bool typemapistype(struct typemap *, void *ptr, void *high, int structure);
-bool typemapcheckmemory(struct typemap *, void* low, void* high);
-bool typemapchecktype(struct typemap *, bool doaction,void *ptr, int structure);
-bool typemapchecktypeB(struct typemap *, bool doaction, void *low, void *high,int structure, struct rbtree *ttree);
-int typemapfindoffsetstructure(struct typemap *, int s, int offset);
-
-
-struct typemap {
+class typemap {
+ public:
+  typemap(typeobject *);
+  ~typemap();
+  void allocate(void *, int);
+  void deallocate(void *);
+  bool assertvalidmemory(void* low, void* high);
+  bool asserttype(void *ptr, void *high, int structure);
+  bool assertvalidmemory(void* low, int structure);
+  bool asserttype(void *ptr, int structure);
+  bool istype(void *ptr, void *high, int structure);
+  void reset();
+  typeobject *size;
+  void initializestack(void *high);
+ private:
   void *low;
   void *high;
   void *low;
   void *high;
+  bool checkmemory(void* low, void* high);
+  bool checktype(bool doaction,void *ptr, int structure);
+  bool checktype(bool doaction, void *low, void *high,int structure, struct rbtree *ttree);
+  int findoffsetstructure(int s, int offset);
   struct rbtree *alloctree;
   struct rbtree *typetree;
 };
 
   struct rbtree *alloctree;
   struct rbtree *typetree;
 };
 
-struct structuremap * allocatestructuremap(int s);
-void freestructuremap(struct structuremap *);
-
-struct structuremap {
+class structuremap {
+  public:
+  structuremap(int s);
+  ~structuremap();
   int str;
   struct rbtree *typetree;
 };
   int str;
   struct rbtree *typetree;
 };