[project @ 2000-12-14 15:19:47 by sewardj]
[ghc-hetmet.git] / ghc / rts / Evaluator.h
index 0ed9888..84a44b8 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Evaluator.h,v 1.4 1999/02/05 16:02:40 simonm Exp $
+ * $Id: Evaluator.h,v 1.9 2000/12/14 15:19:47 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
  * 
  * ------------------------------------------------------------------------*/
 
-extern StgThreadReturnCode enter        ( StgClosurePtr obj );
+extern StgThreadReturnCode interpretBCO ( Capability* cap );
 
 extern nat marshall   ( char arg_ty, void* arg );
 extern nat unmarshall ( char res_ty, void* res );
 extern nat argSize    ( const char* ks );
 
+
+extern StgInt          PopTaggedInt        ( void ) ;
+extern StgWord         PopTaggedWord       ( void ) ;
+extern StgAddr         PopTaggedAddr       ( void ) ;
+extern StgStablePtr    PopTaggedStablePtr  ( void ) ;
+extern StgChar         PopTaggedChar       ( void ) ;
+extern StgFloat        PopTaggedFloat      ( void ) ;
+extern StgDouble       PopTaggedDouble     ( void ) ;
+
+extern void   PushTaggedInt        ( StgInt       );
+extern void   PushTaggedWord       ( StgWord      );
+extern void   PushTaggedAddr       ( StgAddr      );
+extern void   PushTaggedStablePtr  ( StgStablePtr );
+extern void   PushTaggedChar       ( StgChar      );
+extern void   PushTaggedFloat      ( StgFloat     );
+extern void   PushTaggedDouble     ( StgDouble    );
+
+extern void   PushPtr        ( StgPtr );
+extern StgPtr PopPtr         ( void );
+
+extern int    numEnters;
+
+/*-------------------------------------------------------------------------*/
+#ifdef XMLAMBDA
+
+#define MAX_CALL_VALUES  100
+
+/* Self contained CallInfo structure for the i_ccall instruction */
+typedef struct _CallInfo {
+  unsigned int  argCount;
+  unsigned int  resultCount;
+  char          callConv;     /* 's'=stdcall, 'c'=ccall */
+  
+/* The strings arg_tys and result_tys reside here. 
+   This allows us to put the complete CallInfo in the nonptrwords of a BCO */
+  char          data[MAX_CALL_VALUES+2];  
+} CallInfo;
+
+#endif