summaryrefslogtreecommitdiffstats
path: root/runtime/mirror
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-03-25 17:19:53 -0700
committerAndreas Gampe <agampe@google.com>2015-03-27 21:43:21 -0700
commit81c6f8db12b203878a7d72444ead2bc7cf5c47ad (patch)
tree11caae30b75b700ac648356fd30759a6154be997 /runtime/mirror
parentcac51526bbd03947676a8d49700425b19a57e447 (diff)
downloadart-81c6f8db12b203878a7d72444ead2bc7cf5c47ad.tar.gz
art-81c6f8db12b203878a7d72444ead2bc7cf5c47ad.tar.bz2
art-81c6f8db12b203878a7d72444ead2bc7cf5c47ad.zip
ART: PathClassLoader for compiler
Use an actual PathClassLoader when compiling apps, instead of a side structure and cutout. This CL sets up a minimal object 'cluster' that recreates the Java side of a regular ClassLoader such that the Class-Linker will recognize it and use the internal native fast-path. This CL removes the now unnecessary compile-time-classpath and replaces it with a single 'compiling-the-boot-image' flag in the compiler callbacks. Note: This functionality is *only* intended for the compiler, as the objects have not been completely initialized. Bug: 19781184 Change-Id: I7f36af12dd7852d21281110a25c119e8c0669c1d
Diffstat (limited to 'runtime/mirror')
-rw-r--r--runtime/mirror/art_field.cc2
-rw-r--r--runtime/mirror/object_test.cc3
2 files changed, 2 insertions, 3 deletions
diff --git a/runtime/mirror/art_field.cc b/runtime/mirror/art_field.cc
index 3cea4a1b9b..5d543a178c 100644
--- a/runtime/mirror/art_field.cc
+++ b/runtime/mirror/art_field.cc
@@ -45,7 +45,7 @@ void ArtField::ResetClass() {
void ArtField::SetOffset(MemberOffset num_bytes) {
DCHECK(GetDeclaringClass()->IsLoaded() || GetDeclaringClass()->IsErroneous());
if (kIsDebugBuild && Runtime::Current()->IsAotCompiler() &&
- !Runtime::Current()->UseCompileTimeClassPath()) {
+ Runtime::Current()->GetCompilerCallbacks()->IsBootImage()) {
Primitive::Type type = GetTypeAsPrimitiveType();
if (type == Primitive::kPrimDouble || type == Primitive::kPrimLong) {
DCHECK_ALIGNED(num_bytes.Uint32Value(), 8);
diff --git a/runtime/mirror/object_test.cc b/runtime/mirror/object_test.cc
index 21972a1ccf..1ce298d848 100644
--- a/runtime/mirror/object_test.cc
+++ b/runtime/mirror/object_test.cc
@@ -360,8 +360,7 @@ TEST_F(ObjectTest, StaticFieldFromCode) {
// pretend we are trying to access 'Static.s0' from StaticsFromCode.<clinit>
ScopedObjectAccess soa(Thread::Current());
jobject class_loader = LoadDex("StaticsFromCode");
- const DexFile* dex_file = Runtime::Current()->GetCompileTimeClassPath(class_loader)[0];
- CHECK(dex_file != NULL);
+ const DexFile* dex_file = GetFirstDexFile(class_loader);
StackHandleScope<2> hs(soa.Self());
Handle<mirror::ClassLoader> loader(hs.NewHandle(soa.Decode<ClassLoader*>(class_loader)));