MethodImpl currentMethod = (MethodImpl)location.method();
if (currentMethod.isStatic() || currentMethod.isNative()) {
return null;
}
if (thisObject == null) {
StackValueCollection values = saFrame.getLocals();
if (Assert.ASSERTS_ENABLED) {
Assert.that(values.size() > 0, "this is missing");
}
// 'this' at index 0.
if (values.get(0).getType() == BasicType.getTConflict()) {
return null;
}
OopHandle handle = values.oopHandleAt(0);
ObjectHeap heap = vm.saObjectHeap();
thisObject = vm.objectMirror(heap.newOop(handle));
}
return thisObject;
}