Fixes build for newer gcc (at least 4.4), breaks older gcc. We don't care.
[cacao.git] / src / vm / jit / builtin.hpp
index 3a7747dc291bf6702747dfd5b0ffec69f1615a05..0be24ea74bb2be5a3f4be7ff511dafacb35deb5c 100644 (file)
@@ -36,9 +36,9 @@ typedef struct builtintable_entry builtintable_entry;
 #include "arch.h"
 #include "md-abi.h"
 
-#include "toolbox/logging.h"
+#include "toolbox/logging.hpp"
 
-#include "vm/descriptor.h"
+#include "vm/descriptor.hpp"
 #include "vm/utf8.h"
 
 
@@ -77,6 +77,7 @@ struct builtintable_entry {
        utf         *name;                  /* name of the function               */
        utf         *descriptor;            /* descriptor of the function         */
        methoddesc  *md;
+       functionptr  emit_fastpath;         /* emitter for fast-path code         */
 };
 
 
@@ -94,8 +95,6 @@ extern "C" {
 
 bool builtin_init(void);
 
-s4                                     builtintable_get_key(builtintable_entry *);
-builtintable_entry *builtintable_get_by_key(s4 key);
 builtintable_entry *builtintable_get_internal(functionptr fp);
 builtintable_entry *builtintable_get_automatic(s4 opcode);
 
@@ -117,7 +116,7 @@ bool builtintable_replace_function(void *iptr);
  *
  * IMPORTANT:
  * For each builtin function which is used in a BUILTIN* opcode there
- * must be an entry in the tables in vm/builtintable.inc.
+ * must be an entry in the builtin_desc table in jit/jit.c.
  *
  * Below each prototype is either the BUILTIN_ macro definition or a
  * comment specifiying that this function is not used in BUILTIN*
@@ -127,6 +126,26 @@ bool builtintable_replace_function(void *iptr);
  * ICMD_BUILTIN3.)
  */
 
+#if USES_NEW_SUBTYPE
+bool fast_subtype_check(struct _vftbl *, struct _vftbl *);
+#endif
+
+/* From lock.hpp: bool lock_monitor_enter(java_handle_t *); */
+#define LOCK_monitor_enter          (functionptr) lock_monitor_enter
+#if defined(__X86_64__)
+# define EMIT_FASTPATH_monitor_enter (functionptr) emit_fastpath_monitor_enter
+#else
+# define EMIT_FASTPATH_monitor_enter (functionptr) NULL
+#endif
+
+/* From lock.hpp: bool lock_monitor_exit(java_handle_t *); */
+#define LOCK_monitor_exit          (functionptr) lock_monitor_exit
+#if defined(__X86_64__)
+# define EMIT_FASTPATH_monitor_exit (functionptr) emit_fastpath_monitor_exit
+#else
+# define EMIT_FASTPATH_monitor_exit (functionptr) NULL
+#endif
+
 bool builtin_instanceof(java_handle_t *obj, classinfo *c);
 /* NOT AN OP */
 bool builtin_checkcast(java_handle_t *obj, classinfo *c);
@@ -166,14 +185,9 @@ java_handle_t *builtin_escape_reason_new(classinfo *c);
 java_object_t *builtin_fast_new(classinfo *c);
 #define BUILTIN_FAST_new (functionptr) builtin_fast_new
 
-java_handle_t *builtin_newarray(int32_t size, classinfo *arrayclass);
-/* NOT AN OP */
-java_handle_t *builtin_java_newarray(int32_t size, java_handle_t *arrayclass);
+java_handle_array_t *builtin_java_newarray(int32_t size, java_handle_t *arrayclass);
 #define BUILTIN_newarray (functionptr) builtin_java_newarray
 
-java_handle_objectarray_t *builtin_anewarray(int32_t size, classinfo *componentclass);
-/* NOT AN OP */
-
 java_handle_booleanarray_t *builtin_newarray_boolean(int32_t size);
 #define BUILTIN_newarray_boolean (functionptr) builtin_newarray_boolean
 java_handle_chararray_t *builtin_newarray_char(int32_t size);