diff options
author | Jeff Hao <jeffhao@google.com> | 2015-07-14 10:56:40 -0700 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2015-07-14 14:05:17 -0700 |
commit | 86ea497b965fe86d084e109e6d2d1ff560e8f4bf (patch) | |
tree | e9b27b2233518f1e21cc4d61cd37348e8ca6f566 /libart | |
parent | 8337fa4e58ee38757a707d2d4829abe761f89a78 (diff) | |
download | libcore-86ea497b965fe86d084e109e6d2d1ff560e8f4bf.zip libcore-86ea497b965fe86d084e109e6d2d1ff560e8f4bf.tar.gz libcore-86ea497b965fe86d084e109e6d2d1ff560e8f4bf.tar.bz2 |
Make isAssignableFrom not cast iftable entries to class.
The cast is unnecessary, and this change speeds up isAssignableFrom by
about 5%.
Bug: 22409569
Change-Id: I212f0302e007f1bbb6189d6e419db4d0d048b7ed
Diffstat (limited to 'libart')
-rw-r--r-- | libart/src/main/java/java/lang/Class.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libart/src/main/java/java/lang/Class.java b/libart/src/main/java/java/lang/Class.java index 388f34c..fc6a0f8 100644 --- a/libart/src/main/java/java/lang/Class.java +++ b/libart/src/main/java/java/lang/Class.java @@ -1276,8 +1276,7 @@ public final class Class<T> implements Serializable, AnnotatedElement, GenericDe Object[] iftable = c.ifTable; if (iftable != null) { for (int i = 0; i < iftable.length; i += 2) { - Class<?> ifc = (Class<?>) iftable[i]; - if (ifc == this) { + if (iftable[i] == this) { return true; } } |