* src/vm/jit/i386/emit.c (emit_verbosecall_enter): Check for
[cacao.git] / src / vm / builtin.h
index c1ee7f1a7071315c0c6faaf4a9aeab0d693b12c4..3886016e983b5129ca80e8c0684e7c04d1b728e7 100644 (file)
    Contact: cacao@cacaojvm.org
 
    Authors: Reinhard Grafl
-
-   Changes: Edwin Steiner
+            Edwin Steiner
             Christian Thalinger
 
-   $Id: builtin.h 5049 2006-06-23 12:07:26Z twisti $
+   $Id: builtin.h 6013 2006-11-16 22:14:10Z twisti $
 
 */
 
@@ -77,8 +76,13 @@ typedef struct builtintable_entry builtintable_entry;
 struct builtintable_entry {
        s4           opcode;                /* opcode which is replaced           */
        functionptr  fp;                    /* function pointer of builtin        */
-       char        *descriptor;
-       char        *name;
+       char        *cclassname;            /* char name of the class             */
+       char        *cname;                 /* char name of the function          */
+       char        *cdescriptor;           /* char name of the descriptor        */
+       utf         *classname;             /* class of the function              */
+       utf         *name;                  /* name of the function               */
+       utf         *descriptor;            /* descriptor of the function         */
+       bool         checkexception;        /* check for exception after return   */
        methoddesc  *md;
 };
 
@@ -90,6 +94,8 @@ bool builtin_init(void);
 builtintable_entry *builtintable_get_internal(functionptr fp);
 builtintable_entry *builtintable_get_automatic(s4 opcode);
 
+bool builtintable_replace_function(instruction *iptr);
+
 
 /**********************************************************************/
 /* BUILTIN FUNCTIONS                                                  */
@@ -188,21 +194,6 @@ void builtin_trace_args(s8 a0, s8 a1,
 void builtin_displaymethodstop(methodinfo *m, s8 l, double d, float f);
 /* NOT AN OP */
 
-#if defined(ENABLE_THREADS)
-void builtin_monitorenter(java_objectheader *o);
-#define BUILTIN_monitorenter (functionptr) builtin_monitorenter
-void builtin_staticmonitorenter(classinfo *c);
-#define BUILTIN_staticmonitorenter (functionptr) builtin_staticmonitorenter
-void builtin_monitorexit(java_objectheader *o);
-#define BUILTIN_monitorexit (functionptr) builtin_monitorexit
-
-# define BUILTIN_MONITOR_ENTER(o) builtin_monitorenter((java_objectheader *) o)
-# define BUILTIN_MONITOR_EXIT(o)  builtin_monitorexit((java_objectheader *) o)
-#else
-# define BUILTIN_MONITOR_ENTER(o) /* noop */
-# define BUILTIN_MONITOR_EXIT(o)  /* noop */
-#endif
-
 s4 builtin_idiv(s4 a, s4 b);
 #define BUILTIN_idiv (functionptr) builtin_idiv
 s4 builtin_irem(s4 a, s4 b);
@@ -308,20 +299,15 @@ s8       asm_builtin_d2l(double a);
 float    builtin_d2f(double a);
 #define BUILTIN_d2f (functionptr) builtin_d2f
 
-java_arrayheader *builtin_clone_array(void *env, java_arrayheader *o);
-/* NOT AN OP */
-
-/* this is a wrapper for calls from asmpart */
-java_objectheader **builtin_asm_get_exceptionptrptr(void);
+java_objectheader *builtin_clone(void *env, java_objectheader *o);
+#define BUILTIN_clone (functionptr) builtin_clone
 
-#if defined(ENABLE_THREADS)
-static inline java_objectheader **builtin_get_exceptionptrptr(void);
+bool builtin_arraycopy(java_arrayheader *src, s4 srcStart,
+                                          java_arrayheader *dest, s4 destStart, s4 len);
+#define BUILTIN_arraycopy (functionptr) builtin_arraycopy
 
-inline java_objectheader **builtin_get_exceptionptrptr(void)
-{
-       return &(THREADOBJECT->_exceptionptr);
-}
-#endif
+s8 builtin_currenttimemillis(void);
+#define BUILTIN_currenttimemillis (functionptr) builtin_currenttimemillis
 
 #if defined(ENABLE_CYCLES_STATS)
 void builtin_print_cycles_stats(FILE *file);