* merged with tip (040f180a056b)
[cacao.git] / src / vm / builtin.h
index 9177c32e427d6649e0cca5a8730c98410e835b60..8856520a17b60a132f6a3ba62cd981a3342d8d34 100644 (file)
 #ifndef _BUILTIN_H
 #define _BUILTIN_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* forward typedefs ***********************************************************/
 
 typedef struct builtintable_entry builtintable_entry;
@@ -38,7 +42,8 @@ typedef struct builtintable_entry builtintable_entry;
 
 #include "toolbox/logging.h"
 
-#include "vmcore/utf8.h"
+#include "vm/descriptor.h"
+#include "vm/utf8.h"
 
 
 /* define infinity for floating point numbers */
@@ -89,6 +94,8 @@ struct builtintable_entry {
 
 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);
 
@@ -110,7 +117,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 builtin_desc table in jit/jit.c.
+ * must be an entry in the tables in vm/builtintable.inc.
  *
  * Below each prototype is either the BUILTIN_ macro definition or a
  * comment specifiying that this function is not used in BUILTIN*
@@ -145,6 +152,17 @@ java_handle_t *builtin_new(classinfo *c);
 /* NOT AN OP */
 java_handle_t *builtin_java_new(java_handle_t *c);
 #define BUILTIN_new (functionptr) builtin_java_new
+
+#if defined(ENABLE_TLH)
+#define BUILTIN_tlh_new (functionptr) builtin_tlh_new
+java_handle_t *builtin_tlh_new(classinfo *c);
+#endif
+
+#if defined(ENABLE_ESCAPE_REASON)
+#define BUILTIN_escape_reason_new (functionptr)builtin_escape_reason_new
+java_handle_t *builtin_escape_reason_new(classinfo *c);
+#endif
+
 java_object_t *builtin_fast_new(classinfo *c);
 #define BUILTIN_FAST_new (functionptr) builtin_fast_new
 
@@ -316,6 +334,10 @@ s8 builtin_currenttimemillis(void);
 void builtin_print_cycles_stats(FILE *file);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _BUILTIN_H */