comparison src/main/gov/nasa/jpf/vm/NativePeer.java @ 25:3517702bd768

added class name to warning for ambiguous native methods (without MJI signatures) fixed VarTracker, which was utterly unaware of new instruction type hierarchy. added JVMArrayElementInstruction.get{Array/Index}Attr(ti) since listeners most likely use attrs which otherwise would have to be retrieved/cached in executeInstruction() notifications (e.g. variable name for array) fixed ReadInstruction, which somehow extended StoreInstruction
author Peter Mehlitz <pcmehlitz@gmail.com>
date Wed, 22 Apr 2015 15:54:26 -0700
parents 61d41facf527
children
comparison
equal deleted inserted replaced
24:6774e2e08d37 25:3517702bd768
405 protected boolean ignoreOrphan (Method m){ 405 protected boolean ignoreOrphan (Method m){
406 MJI annotation = m.getAnnotation(MJI.class); 406 MJI annotation = m.getAnnotation(MJI.class);
407 return annotation.noOrphanWarning(); 407 return annotation.noOrphanWarning();
408 } 408 }
409 409
410 private static MethodInfo searchMethod (String mname, MethodInfo[] methods) { 410 private MethodInfo searchMethod (String mname, MethodInfo[] methods) {
411 int idx = -1; 411 int idx = -1;
412 412
413 for (int j = 0; j < methods.length; j++) { 413 for (int j = 0; j < methods.length; j++) {
414 if (methods[j].getName().equals(mname)) { 414 if (methods[j].getName().equals(mname)) {
415 // if this is actually a overloaded method, and the first one 415 // if this is actually a overloaded method, and the first one
417 // hence we have to go on and make sure it's not overloaded 417 // hence we have to go on and make sure it's not overloaded
418 418
419 if (idx == -1) { 419 if (idx == -1) {
420 idx = j; 420 idx = j;
421 } else { 421 } else {
422 throw new JPFException("overloaded native method without signature: " + mname); 422 throw new JPFException("overloaded native method without signature: " + ci.getName() + '.' + mname);
423 } 423 }
424 } 424 }
425 } 425 }
426 426
427 if (idx >= 0) { 427 if (idx >= 0) {