Change dex cache to be java object instead of array, add pointer to dex file in dex cache.
Generic clean up to facilitate having GDB macros for Pretty* helper functions.
Improved cleanliness of DexCache since having it as an object array was not the best solution.
Fixed a bug in InOrderWalk caused by ResolveType sometimes allocating classes.
Rename C++ Method to AbstractMethod and add two new classes Constructor, Method which both inherit from AbstractMethod.
Rename done to have the C++ code be closer to the java code.
Change-Id: I4995b4c5e47a3822192b08afa24a639d3b1f4da9
diff --git a/src/common_test.h b/src/common_test.h
index dee40e3..6994ac3 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -193,7 +193,7 @@
const uint32_t* mapping_table,
const uint16_t* vmap_table,
const uint8_t* gc_map,
- const Method::InvokeStub* invoke_stub) {
+ const AbstractMethod::InvokeStub* invoke_stub) {
return OatFile::OatMethod(NULL,
reinterpret_cast<uint32_t>(code),
frame_size_in_bytes,
@@ -209,7 +209,7 @@
);
}
- void MakeExecutable(Method* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ void MakeExecutable(AbstractMethod* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
CHECK(method != NULL);
MethodHelper mh(method);
@@ -219,8 +219,8 @@
const std::vector<uint8_t>& invoke_stub = compiled_invoke_stub->GetCode();
MakeExecutable(invoke_stub);
- const Method::InvokeStub* method_invoke_stub =
- reinterpret_cast<const Method::InvokeStub*>(
+ const AbstractMethod::InvokeStub* method_invoke_stub =
+ reinterpret_cast<const AbstractMethod::InvokeStub*>(
CompiledCode::CodePointer(&invoke_stub[0],
compiled_invoke_stub->GetInstructionSet()));
@@ -479,7 +479,7 @@
}
}
- void CompileMethod(Method* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ void CompileMethod(AbstractMethod* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
CHECK(method != NULL);
compiler_->CompileOne(method);
MakeExecutable(method);
@@ -495,7 +495,7 @@
std::string class_descriptor(DotToDescriptor(class_name));
Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader);
CHECK(klass != NULL) << "Class not found " << class_name;
- Method* method = klass->FindDirectMethod(method_name, signature);
+ AbstractMethod* method = klass->FindDirectMethod(method_name, signature);
CHECK(method != NULL) << "Direct method not found: "
<< class_name << "." << method_name << signature;
CompileMethod(method);
@@ -509,7 +509,7 @@
std::string class_descriptor(DotToDescriptor(class_name));
Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader);
CHECK(klass != NULL) << "Class not found " << class_name;
- Method* method = klass->FindVirtualMethod(method_name, signature);
+ AbstractMethod* method = klass->FindVirtualMethod(method_name, signature);
CHECK(method != NULL) << "Virtual method not found: "
<< class_name << "." << method_name << signature;
CompileMethod(method);