comparison src/main/gov/nasa/jpf/vm/StackFrame.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
497 */ 497 */
498 public <T> T getOperandAttr (Class<T> attrType){ 498 public <T> T getOperandAttr (Class<T> attrType){
499 assert (top >= stackBase); 499 assert (top >= stackBase);
500 500
501 if ((attrs != null)){ 501 if ((attrs != null)){
502 return ObjectList.getFirst( attrs[top], attrType); 502 return ObjectList.getFirst(attrs[top], attrType);
503 } 503 }
504 return null; 504 return null;
505 } 505 }
506 public <T> T getNextOperandAttr (Class<T> attrType, Object prev){ 506 public <T> T getNextOperandAttr (Class<T> attrType, Object prev){
507 assert (top >= stackBase); 507 assert (top >= stackBase);
602 * this only returns the first attr of this type, there can be more 602 * this only returns the first attr of this type, there can be more
603 * if you don't use client private types or the provided type is too general 603 * if you don't use client private types or the provided type is too general
604 */ 604 */
605 public <T> T getOperandAttr (int offset, Class<T> attrType){ 605 public <T> T getOperandAttr (int offset, Class<T> attrType){
606 int i = top-offset; 606 int i = top-offset;
607 assert (i >= stackBase); 607 assert (i >= stackBase) : this;
608 if (attrs != null){ 608 if (attrs != null){
609 return ObjectList.getFirst( attrs[i], attrType); 609 return ObjectList.getFirst(attrs[i], attrType);
610 } 610 }
611 return null; 611 return null;
612 } 612 }
613 public <T> T getNextOperandAttr (int offset, Class<T> attrType, Object prev){ 613 public <T> T getNextOperandAttr (int offset, Class<T> attrType, Object prev){
614 int i = top-offset; 614 int i = top-offset;