From c519ec27ba900d5422c5a0d40388fb6620981564 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Thu, 25 Sep 2014 11:49:01 -0700 Subject: Update Class.primitiveType field uses. This goes with the array allocation path optimization CL 108967. Bug: 9986565 Change-Id: I96de4725d4517d84af34ad05792fce8aa322f57a --- libart/src/main/java/java/lang/Class.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libart') 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 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 implements Serializable, AnnotatedElement, GenericDe * Tests whether this {@code Class} represents a primitive type. */ public boolean isPrimitive() { - return primitiveType != 0; + return (primitiveType & 0xFFFF) != 0; } /** -- cgit v1.1