Add Jack modifier.
Bug: 7419545
Change-Id: I58f40e11f3b3256ca7f7922f12b7bdeef724930f
diff --git a/src/class_linker.cc b/src/class_linker.cc
index a76c9c8..d28d729 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -1584,7 +1584,8 @@
klass->SetClass(GetClassRoot(kJavaLangClass));
uint32_t access_flags = dex_class_def.access_flags_;
// Make sure that none of our runtime-only flags are set.
- CHECK_EQ(access_flags & ~kAccJavaFlagsMask, 0U);
+ // TODO: JACK CLASS ACCESS (HACK TO BE REMOVED)
+ CHECK_EQ(access_flags & ~(kAccJavaFlagsMask | kAccClassJack), 0U);
klass->SetAccessFlags(access_flags);
klass->SetClassLoader(class_loader);
DCHECK_EQ(klass->GetPrimitiveType(), Primitive::kPrimNot);
diff --git a/src/modifiers.h b/src/modifiers.h
index 070130f..ee2d4ff 100644
--- a/src/modifiers.h
+++ b/src/modifiers.h
@@ -43,6 +43,8 @@
static const uint32_t kAccConstructor = 0x00010000; // method (dex only)
static const uint32_t kAccDeclaredSynchronized = 0x00020000; // method (dex only)
static const uint32_t kAccClassIsProxy = 0x00040000; // class (dex only)
+// TODO: JACK CLASS ACCESS (HACK TO BE REMOVED)
+static const uint32_t kAccClassJack = 0x000080000; // class (dex only)
// Special runtime-only flags.
// Note: if only kAccClassIsReference is set, we have a soft reference.
diff --git a/src/oatdump.cc b/src/oatdump.cc
index 4231ecf..0db71c9 100644
--- a/src/oatdump.cc
+++ b/src/oatdump.cc
@@ -247,7 +247,10 @@
UniquePtr<const OatFile::OatClass> oat_class(oat_dex_file.GetOatClass(class_def_index));
CHECK(oat_class.get() != NULL);
os << StringPrintf("%zd: %s (type_idx=%d) (", class_def_index, descriptor, class_def.class_idx_)
- << oat_class->GetStatus() << ")\n";
+ << oat_class->GetStatus() << ")"
+ // TODO: JACK CLASS ACCESS (HACK TO BE REMOVED)
+ << ( (class_def.access_flags_ & kAccClassJack) == kAccClassJack ? " (Jack)" : "" )
+ << "\n";
DumpOatClass(os, *oat_class.get(), *(dex_file.get()), class_def);
}