java_handle_t *exceptions_get_exception(void)
{
+ java_handle_t *e;
+
+ /* get the exception */
+
+ LLNI_CRITICAL_START;
+
+ e = LLNI_WRAP(*exceptionptr);
+
+ LLNI_CRITICAL_END;
+
/* return the exception */
- return *exceptionptr;
+ return e;
}
{
/* set the exception */
- *exceptionptr = o;
+ LLNI_CRITICAL_START;
+
+ *exceptionptr = LLNI_UNWRAP(o);
+
+ LLNI_CRITICAL_END;
}
java_handle_t *exceptions_new_classcastexception(java_handle_t *o)
{
java_handle_t *e;
+ classinfo *c;
utf *classname;
- classname = o->vftbl->class->name;
+ LLNI_class_get(o, c);
+
+ classname = c->name;
e = exceptions_new_class_utf(class_java_lang_ClassCastException, classname);
java_handle_t *exceptions_fillinstacktrace(void)
{
java_handle_t *o;
+ classinfo *c;
methodinfo *m;
/* get exception */
/* resolve methodinfo pointer from exception object */
+ LLNI_class_get(o, c);
+
#if defined(ENABLE_JAVASE)
- m = class_resolvemethod(o->vftbl->class,
+ m = class_resolvemethod(c,
utf_fillInStackTrace,
utf_void__java_lang_Throwable);
#elif defined(ENABLE_JAVAME_CLDC1_1)
- m = class_resolvemethod(o->vftbl->class,
+ m = class_resolvemethod(c,
utf_fillInStackTrace,
utf_void__void);
#else
/* clear exception, because we are calling jit code again */
- c = oxptr->vftbl->class;
+ LLNI_class_get(oxptr, c);
/* find the printStackTrace() method */
/* get Main Attributes */
- m = class_resolveclassmethod(o->vftbl->class,
+ LLNI_class_get(o, c);
+
+ m = class_resolveclassmethod(c,
utf_new_char("getMainAttributes"),
utf_new_char("()Ljava/util/jar/Attributes;"),
class_java_lang_Object,
/* get property Main-Class */
- m = class_resolveclassmethod(o->vftbl->class,
+ LLNI_class_get(o, c);
+
+ m = class_resolveclassmethod(c,
utf_new_char("getValue"),
utf_new_char("(Ljava/lang/String;)Ljava/lang/String;"),
class_java_lang_Object,
*******************************************************************************/
-uint64_t *vm_array_from_valist(methodinfo *m, java_object_t *o, va_list ap)
+uint64_t *vm_array_from_valist(methodinfo *m, java_handle_t *o, va_list ap)
{
methoddesc *md;
paramdesc *pd;
*******************************************************************************/
-static uint64_t *vm_array_from_jvalue(methodinfo *m, java_object_t *o,
+static uint64_t *vm_array_from_jvalue(methodinfo *m, java_handle_t *o,
const jvalue *args)
{
methoddesc *md;
*******************************************************************************/
-uint64_t *vm_array_from_objectarray(methodinfo *m, java_object_t *o,
+uint64_t *vm_array_from_objectarray(methodinfo *m, java_handle_t *o,
java_handle_objectarray_t *params)
{
methoddesc *md;
/* convert the value according to its declared type */
- c = param->vftbl->class;
+ LLNI_class_get(param, c);
type = primitive_type_get_by_wrapperclass(c);
switch (td->decltype) {
if (param == NULL)
goto illegal_arg;
- c = param->vftbl->class;
- type = primitive_type_get_by_wrapperclass(c);
-
+ LLNI_class_get(param, c);
assert(td->decltype == PRIMITIVETYPE_LONG);
switch (type) {
if (param == NULL)
goto illegal_arg;
- c = param->vftbl->class;
+ LLNI_class_get(param, c);
type = primitive_type_get_by_wrapperclass(c);
assert(td->decltype == PRIMITIVETYPE_FLOAT);
if (param == NULL)
goto illegal_arg;
- c = param->vftbl->class;
+ LLNI_class_get(param, c);
type = primitive_type_get_by_wrapperclass(c);
assert(td->decltype == PRIMITIVETYPE_DOUBLE);
if (!jit_compile(m)) \
return 0; \
\
- pv = m->code->entrypoint; \
+ pv = m->code->entrypoint; \
\
STATISTICS(count_calls_native_to_java++); \
\
* c-basic-offset: 4
* tab-width: 4
* End:
+ * vim:noexpandtab:sw=4:ts=4:
*/