Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when dvmObject instanceof DvmClass, there is no need to call getObjectType(). #640

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetObjectField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1425,7 +1425,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetBooleanField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1470,7 +1470,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetIntField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1494,7 +1494,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetLongField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1519,7 +1519,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetFloatField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1555,7 +1555,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetObjectField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1581,7 +1581,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetBooleanField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1628,7 +1628,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetIntField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1654,7 +1654,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetLongField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1683,7 +1683,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetFloatField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1709,7 +1709,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetDoubleField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetObjectField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1452,7 +1452,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetBooleanField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1476,7 +1476,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetByteField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1514,7 +1514,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetIntField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1538,7 +1538,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetLongField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1562,7 +1562,7 @@ public long handle(Emulator<?> emulator) {
log.debug("GetFloatField object=" + object + ", jfieldID=" + jfieldID);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1598,7 +1598,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetObjectField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1624,7 +1624,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetBooleanField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1671,7 +1671,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetIntField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand All @@ -1696,7 +1696,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetLongField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1725,7 +1725,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetFloatField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down Expand Up @@ -1754,7 +1754,7 @@ public long handle(Emulator<?> emulator) {
log.debug("SetDoubleField object=" + object + ", jfieldID=" + jfieldID + ", value=" + value);
}
DvmObject<?> dvmObject = getObject(object.toIntPeer());
DvmClass dvmClass = dvmObject == null ? null : dvmObject.getObjectType();
DvmClass dvmClass = dvmObject == null ? null : dvmObject instanceof DvmClass ? (DvmClass) dvmObject : dvmObject.getObjectType();
DvmField dvmField = dvmClass == null ? null : dvmClass.getField(jfieldID.toIntPeer());
if (dvmField == null) {
throw new BackendException();
Expand Down