New ClassLinker::CreateArrayClass
- Added ClassLinker::CreateArrayClass for use by ClassLinker::FindClass
- Replaced hand crafted ClassLinker::char_array_class_ initialization with call to FindClass
- Removed ClassLinker::LoadClass public interfaces, kept only one internally
- Removed JType
- Cleanedup gtest naming convention
- Added RuntimeTest for common test initialization such as Thread::Init
- Switched from assert to DCHECK which found some bit rotted code
- Expanded class_linker_test to array classes and also also array rank
and interface count in existing cases
Change-Id: Ie3d71c8b434c8521f4ea8d2f07b1c4c905ee1d90
diff --git a/src/object.h b/src/object.h
index aec8c34..4f0a50c 100644
--- a/src/object.h
+++ b/src/object.h
@@ -33,20 +33,6 @@
Object* l;
};
-enum JType {
- kTypeByte = 'B',
- kTypeChar = 'C',
- kTypeDouble = 'D',
- kTypeFloat = 'F',
- kTypeInt = 'I',
- kTypeLong = 'J',
- kTypeShort = 'S',
- kTypeBoolean = 'Z',
- kTypeClass = 'L',
- kTypeArray= '[',
- kTypeVoid = 'V',
-};
-
static const uint32_t kAccPublic = 0x0001; // class, field, method, ic
static const uint32_t kAccPrivate = 0x0002; // field, method, ic
static const uint32_t kAccProtected = 0x0004; // field, method, ic
@@ -68,12 +54,13 @@
static const uint32_t kAccMiranda = 0x8000; // method
+static const uint32_t kAccJavaFlagsMask = 0xffff; // bits set from Java sources (low 16)
+
static const uint32_t kAccConstructor = 0x00010000; // method (Dalvik only)
static const uint32_t kAccDeclaredSynchronized = 0x00020000; // method (Dalvik only)
-
/*
- * Definitions for packing refOffsets in ClassObject.
+ * Definitions for packing refOffsets in Class.
*/
/*
* A magic value for refOffsets. Ignore the bits and walk the super
@@ -622,7 +609,7 @@
// Proxy classes have their descriptor allocated on the native heap.
// When this field is non-NULL it must be explicitly freed.
- char* descriptor_alloc_;
+ std::string* descriptor_alloc_;
// access flags; low 16 bits are defined by VM spec
uint32_t access_flags_; // TODO: make an instance field?
@@ -714,7 +701,7 @@
// These describe the layout of the contents of a
// DataObject-compatible Object. Note that only the fields directly
// declared by this class are listed in ifields; fields declared by
- // a superclass are listed in the superclass's ClassObject.ifields.
+ // a superclass are listed in the superclass's Class.ifields.
//
// All instance fields that refer to objects are guaranteed to be at
// the beginning of the field list. ifieldRefCount specifies the