diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-09-25 11:49:01 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-09-25 15:42:09 -0700 |
commit | c519ec27ba900d5422c5a0d40388fb6620981564 (patch) | |
tree | 53735b791e84c2d3e01b59f63a26e3f4299a252f /libart | |
parent | c5152705f26bc21f27d09107c645f47e730e8762 (diff) | |
download | libcore-c519ec27ba900d5422c5a0d40388fb6620981564.zip libcore-c519ec27ba900d5422c5a0d40388fb6620981564.tar.gz libcore-c519ec27ba900d5422c5a0d40388fb6620981564.tar.bz2 |
Update Class.primitiveType field uses.
This goes with the array allocation path optimization CL 108967.
Bug: 9986565
Change-Id: I96de4725d4517d84af34ad05792fce8aa322f57a
Diffstat (limited to 'libart')
-rw-r--r-- | libart/src/main/java/java/lang/Class.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libart/src/main/java/java/lang/Class.java b/libart/src/main/java/java/lang/Class.java index 681107f..c004fa0 100644 --- a/libart/src/main/java/java/lang/Class.java +++ b/libart/src/main/java/java/lang/Class.java @@ -232,7 +232,10 @@ public final class Class<T> implements Serializable, AnnotatedElement, GenericDe */ private transient int objectSize; - /** Primitive type value, or 0 if not a primitive type; set for generated primitive classes. */ + /** + * The lower 16 bits is the primitive type value, or 0 if not a primitive type; set for + * generated primitive classes. + */ private transient int primitiveType; /** Bitmap of offsets of iFields. */ @@ -1510,7 +1513,7 @@ public final class Class<T> implements Serializable, AnnotatedElement, GenericDe * Tests whether this {@code Class} represents a primitive type. */ public boolean isPrimitive() { - return primitiveType != 0; + return (primitiveType & 0xFFFF) != 0; } /** |