/// hooks.h -- declarations for Interpreter/compiler glue
///
/// Author: ian.piumarta@inria.fr
///
/// Last edited: Tue Feb 23 19:34:54 1999 by piumarta (Ian Piumarta) on pingu

#ifndef _hooks_h_
#define _hooks_h_

// the version of VM proxy that we know how to talk to
#define HOOK_MAJOR	1
#define HOOK_MINOR	1

class CompiledMethod;
class Object;
typedef Object *oop;

extern "C" {
  // module initialiser
  int setInterpreter(struct VirtualMachine *squeak);
  // compiler entry points
  int j_activateMethodHook(void);
  int j_flushCacheHook(oop target);
  int j_preGCHook(int fullGCFlag);
  int j_mapHook(int memStart, int memEnd);
  int j_postGCHook(void);
  int j_processChangeHook(void);
  int j_preSnapshotHook(void);
  int j_postSnapshotHook(void);
  int j_markHook(void);
  // module entry points
  void j_initialiseHook(void);
  void j_releaseHook(void);
  // named primitives
  int squeakCompilerDisable(void);
  int squeakCompilerEnable(void);
};

#endif _hooks_h_

