Browse files

INVOKESTATIC correction

  • Loading branch information...
1 parent 7dbc651 commit cd53e4023e641e2ee4293fd8ef4b15e4f662d8ff @nurv committed Nov 17, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/intrp.def
View
8 src/intrp.def
@@ -940,18 +940,18 @@ DEFOP(INVOKESTATIC)
LOG("Calling " + className + " " + method.name_ref.str + method.descriptor_ref.str)
LOG("!! NATIVE !!")
if (xl.jvm.internalJNITable[className] && methodId in xl.jvm.internalJNITable[className]){
- result = xl.jvm.internalJNITable[className][methodId].apply(cl,args);
+ result = {return_object: xl.jvm.internalJNITable[className][methodId].apply(cl,args)};
}else if (xl.jvm.JNITable[className] && methodId in xl.jvm.JNITable[className]){
- result = xl.jvm.JNITable[className][methodId].apply(cl,args)
+ result = {return_object: xl.jvm.JNITable[className][methodId].apply(cl,args)};s
}else{
PANIC(methodId + " declared as native but not mapped");
}
LOG("Returing from " + className + " " + method.name_ref.str + method.descriptor_ref.str)
}else{
result = method.invoke(args,cl);
}
- if (result != undefined){
- OPPUSH(result);
+ if (result != undefined && result.return_object!= undefined){
+ OPPUSH(result.return_object);
}
ENDDEF

0 comments on commit cd53e40

Please sign in to comment.