ART: Change access flag behavior in verifier
Note: this moves the miranda modifier to the upper 16 bit.
Bug: 16161620
(cherry picked from commit 7fc8f90b7160e879143be5cfd6ea3df866398884)
Change-Id: I2f591d53b7d1559171e70aaaf22225d94b4882f5
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index bbd1939..01e0ac4 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1605,7 +1605,7 @@
// We require a constructor barrier if there are final instance fields.
requires_constructor_barrier = false;
while (it.HasNextInstanceField()) {
- if ((it.GetMemberAccessFlags() & kAccFinal) != 0) {
+ if (it.MemberIsFinal()) {
requires_constructor_barrier = true;
}
if (resolve_fields_and_methods) {
@@ -1946,7 +1946,7 @@
continue;
}
previous_direct_method_idx = method_idx;
- driver->CompileMethod(it.GetMethodCodeItem(), it.GetMemberAccessFlags(),
+ driver->CompileMethod(it.GetMethodCodeItem(), it.GetMethodAccessFlags(),
it.GetMethodInvokeType(class_def), class_def_index,
method_idx, jclass_loader, dex_file, dex_to_dex_compilation_level);
it.Next();
@@ -1962,7 +1962,7 @@
continue;
}
previous_virtual_method_idx = method_idx;
- driver->CompileMethod(it.GetMethodCodeItem(), it.GetMemberAccessFlags(),
+ driver->CompileMethod(it.GetMethodCodeItem(), it.GetMethodAccessFlags(),
it.GetMethodInvokeType(class_def), class_def_index,
method_idx, jclass_loader, dex_file, dex_to_dex_compilation_level);
it.Next();
diff --git a/compiler/oat_writer.cc b/compiler/oat_writer.cc
index c5d1478..e74d6de 100644
--- a/compiler/oat_writer.cc
+++ b/compiler/oat_writer.cc
@@ -437,7 +437,7 @@
std::vector<uint8_t> const * gc_map = compiled_method->GetGcMap();
if (gc_map != nullptr) {
size_t gc_map_size = gc_map->size() * sizeof(gc_map[0]);
- bool is_native = (it.GetMemberAccessFlags() & kAccNative) != 0;
+ bool is_native = it.MemberIsNative();
CHECK(gc_map_size != 0 || is_native || status < mirror::Class::kStatusVerified)
<< gc_map << " " << gc_map_size << " " << (is_native ? "true" : "false") << " "
<< (status < mirror::Class::kStatusVerified) << " " << status << " "