Signed-off-by: Tomek Grabiec <[email protected]>
---
include/vm/types.h | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/include/vm/types.h b/include/vm/types.h
index 9b5c2f6..e7b3c42 100644
--- a/include/vm/types.h
+++ b/include/vm/types.h
@@ -1,6 +1,7 @@
#ifndef __VM_TYPES_H
#define __VM_TYPES_H
+#include <assert.h>
#include <stdbool.h>
enum vm_type {
@@ -18,6 +19,19 @@ enum vm_type {
VM_TYPE_MAX,
};
+/**
+ * Returns the vm type which has the same size as native pointers.
+ */
+static inline enum vm_type vm_pointer_type(void)
+{
+ if (sizeof(long) == 4)
+ return J_INT;
+
+ assert(sizeof(long) == 8);
+
+ return J_LONG;
+}
+
extern enum vm_type str_to_type(const char *);
extern enum vm_type get_method_return_type(char *);
extern unsigned int vm_type_size(enum vm_type);
--
1.6.0.6
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel