Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "unstarted_runtime.h" |
| 18 | |
| 19 | #include <cmath> |
| 20 | #include <unordered_map> |
| 21 | |
| 22 | #include "base/logging.h" |
| 23 | #include "base/macros.h" |
| 24 | #include "class_linker.h" |
| 25 | #include "common_throws.h" |
| 26 | #include "entrypoints/entrypoint_utils-inl.h" |
| 27 | #include "handle_scope-inl.h" |
| 28 | #include "interpreter/interpreter_common.h" |
| 29 | #include "mirror/array-inl.h" |
| 30 | #include "mirror/art_method-inl.h" |
| 31 | #include "mirror/class.h" |
| 32 | #include "mirror/object-inl.h" |
| 33 | #include "mirror/object_array-inl.h" |
| 34 | #include "mirror/string-inl.h" |
| 35 | #include "nth_caller_visitor.h" |
| 36 | #include "thread.h" |
| 37 | #include "well_known_classes.h" |
| 38 | |
| 39 | namespace art { |
| 40 | namespace interpreter { |
| 41 | |
Andreas Gampe | 068b0c0 | 2015-03-11 12:44:47 -0700 | [diff] [blame] | 42 | static void AbortTransactionOrFail(Thread* self, const char* fmt, ...) |
| 43 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 44 | va_list args; |
| 45 | va_start(args, fmt); |
| 46 | if (Runtime::Current()->IsActiveTransaction()) { |
| 47 | AbortTransaction(self, fmt, args); |
| 48 | va_end(args); |
| 49 | } else { |
| 50 | LOG(FATAL) << "Trying to abort, but not in transaction mode: " << StringPrintf(fmt, args); |
| 51 | UNREACHABLE(); |
| 52 | } |
| 53 | } |
| 54 | |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 55 | // Helper function to deal with class loading in an unstarted runtime. |
| 56 | static void UnstartedRuntimeFindClass(Thread* self, Handle<mirror::String> className, |
| 57 | Handle<mirror::ClassLoader> class_loader, JValue* result, |
| 58 | const std::string& method_name, bool initialize_class, |
| 59 | bool abort_if_not_found) |
| 60 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 61 | CHECK(className.Get() != nullptr); |
| 62 | std::string descriptor(DotToDescriptor(className->ToModifiedUtf8().c_str())); |
| 63 | ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); |
| 64 | |
| 65 | mirror::Class* found = class_linker->FindClass(self, descriptor.c_str(), class_loader); |
| 66 | if (found == nullptr && abort_if_not_found) { |
| 67 | if (!self->IsExceptionPending()) { |
Andreas Gampe | 068b0c0 | 2015-03-11 12:44:47 -0700 | [diff] [blame] | 68 | AbortTransactionOrFail(self, "%s failed in un-started runtime for class: %s", |
| 69 | method_name.c_str(), PrettyDescriptor(descriptor.c_str()).c_str()); |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 70 | } |
| 71 | return; |
| 72 | } |
| 73 | if (found != nullptr && initialize_class) { |
| 74 | StackHandleScope<1> hs(self); |
| 75 | Handle<mirror::Class> h_class(hs.NewHandle(found)); |
| 76 | if (!class_linker->EnsureInitialized(self, h_class, true, true)) { |
| 77 | CHECK(self->IsExceptionPending()); |
| 78 | return; |
| 79 | } |
| 80 | } |
| 81 | result->SetL(found); |
| 82 | } |
| 83 | |
| 84 | // Common helper for class-loading cutouts in an unstarted runtime. We call Runtime methods that |
| 85 | // rely on Java code to wrap errors in the correct exception class (i.e., NoClassDefFoundError into |
| 86 | // ClassNotFoundException), so need to do the same. The only exception is if the exception is |
| 87 | // actually InternalError. This must not be wrapped, as it signals an initialization abort. |
| 88 | static void CheckExceptionGenerateClassNotFound(Thread* self) |
| 89 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 90 | if (self->IsExceptionPending()) { |
| 91 | // If it is not an InternalError, wrap it. |
| 92 | std::string type(PrettyTypeOf(self->GetException())); |
| 93 | if (type != "java.lang.InternalError") { |
| 94 | self->ThrowNewWrappedException("Ljava/lang/ClassNotFoundException;", |
| 95 | "ClassNotFoundException"); |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | static void UnstartedClassForName(Thread* self, ShadowFrame* shadow_frame, JValue* result, |
| 101 | size_t arg_offset) |
| 102 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 103 | mirror::String* class_name = shadow_frame->GetVRegReference(arg_offset)->AsString(); |
| 104 | StackHandleScope<1> hs(self); |
| 105 | Handle<mirror::String> h_class_name(hs.NewHandle(class_name)); |
| 106 | UnstartedRuntimeFindClass(self, h_class_name, NullHandle<mirror::ClassLoader>(), result, |
| 107 | "Class.forName", true, false); |
| 108 | CheckExceptionGenerateClassNotFound(self); |
| 109 | } |
| 110 | |
| 111 | static void UnstartedClassForNameLong(Thread* self, ShadowFrame* shadow_frame, JValue* result, |
| 112 | size_t arg_offset) |
| 113 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 114 | mirror::String* class_name = shadow_frame->GetVRegReference(arg_offset)->AsString(); |
| 115 | bool initialize_class = shadow_frame->GetVReg(arg_offset + 1) != 0; |
| 116 | mirror::ClassLoader* class_loader = |
| 117 | down_cast<mirror::ClassLoader*>(shadow_frame->GetVRegReference(arg_offset + 2)); |
| 118 | StackHandleScope<2> hs(self); |
| 119 | Handle<mirror::String> h_class_name(hs.NewHandle(class_name)); |
| 120 | Handle<mirror::ClassLoader> h_class_loader(hs.NewHandle(class_loader)); |
| 121 | UnstartedRuntimeFindClass(self, h_class_name, h_class_loader, result, "Class.forName", |
| 122 | initialize_class, false); |
| 123 | CheckExceptionGenerateClassNotFound(self); |
| 124 | } |
| 125 | |
| 126 | static void UnstartedClassClassForName(Thread* self, ShadowFrame* shadow_frame, JValue* result, |
| 127 | size_t arg_offset) |
| 128 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 129 | mirror::String* class_name = shadow_frame->GetVRegReference(arg_offset)->AsString(); |
| 130 | bool initialize_class = shadow_frame->GetVReg(arg_offset + 1) != 0; |
| 131 | mirror::ClassLoader* class_loader = |
| 132 | down_cast<mirror::ClassLoader*>(shadow_frame->GetVRegReference(arg_offset + 2)); |
| 133 | StackHandleScope<2> hs(self); |
| 134 | Handle<mirror::String> h_class_name(hs.NewHandle(class_name)); |
| 135 | Handle<mirror::ClassLoader> h_class_loader(hs.NewHandle(class_loader)); |
| 136 | UnstartedRuntimeFindClass(self, h_class_name, h_class_loader, result, "Class.classForName", |
| 137 | initialize_class, false); |
| 138 | CheckExceptionGenerateClassNotFound(self); |
| 139 | } |
| 140 | |
| 141 | static void UnstartedClassNewInstance(Thread* self, ShadowFrame* shadow_frame, JValue* result, |
| 142 | size_t arg_offset) |
| 143 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 144 | StackHandleScope<3> hs(self); // Class, constructor, object. |
| 145 | mirror::Class* klass = shadow_frame->GetVRegReference(arg_offset)->AsClass(); |
| 146 | Handle<mirror::Class> h_klass(hs.NewHandle(klass)); |
Andreas Gampe | 0f7e3d6 | 2015-03-11 13:24:35 -0700 | [diff] [blame] | 147 | |
| 148 | // Check that it's not null. |
| 149 | if (h_klass.Get() == nullptr) { |
| 150 | AbortTransactionOrFail(self, "Class reference is null for newInstance"); |
| 151 | return; |
| 152 | } |
| 153 | |
| 154 | // If we're in a transaction, class must not be finalizable (it or a superclass has a finalizer). |
| 155 | if (Runtime::Current()->IsActiveTransaction()) { |
| 156 | if (h_klass.Get()->IsFinalizable()) { |
| 157 | AbortTransaction(self, "Class for newInstance is finalizable: '%s'", |
| 158 | PrettyClass(h_klass.Get()).c_str()); |
| 159 | return; |
| 160 | } |
| 161 | } |
| 162 | |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 163 | // There are two situations in which we'll abort this run. |
| 164 | // 1) If the class isn't yet initialized and initialization fails. |
| 165 | // 2) If we can't find the default constructor. We'll postpone the exception to runtime. |
| 166 | // Note that 2) could likely be handled here, but for safety abort the transaction. |
| 167 | bool ok = false; |
| 168 | if (Runtime::Current()->GetClassLinker()->EnsureInitialized(self, h_klass, true, true)) { |
| 169 | Handle<mirror::ArtMethod> h_cons(hs.NewHandle( |
| 170 | h_klass->FindDeclaredDirectMethod("<init>", "()V"))); |
| 171 | if (h_cons.Get() != nullptr) { |
| 172 | Handle<mirror::Object> h_obj(hs.NewHandle(klass->AllocObject(self))); |
| 173 | CHECK(h_obj.Get() != nullptr); // We don't expect OOM at compile-time. |
| 174 | EnterInterpreterFromInvoke(self, h_cons.Get(), h_obj.Get(), nullptr, nullptr); |
| 175 | if (!self->IsExceptionPending()) { |
| 176 | result->SetL(h_obj.Get()); |
| 177 | ok = true; |
| 178 | } |
| 179 | } else { |
| 180 | self->ThrowNewExceptionF("Ljava/lang/InternalError;", |
| 181 | "Could not find default constructor for '%s'", |
| 182 | PrettyClass(h_klass.Get()).c_str()); |
| 183 | } |
| 184 | } |
| 185 | if (!ok) { |
Andreas Gampe | 068b0c0 | 2015-03-11 12:44:47 -0700 | [diff] [blame] | 186 | AbortTransactionOrFail(self, "Failed in Class.newInstance for '%s' with %s", |
| 187 | PrettyClass(h_klass.Get()).c_str(), |
| 188 | PrettyTypeOf(self->GetException()).c_str()); |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 189 | } |
| 190 | } |
| 191 | |
| 192 | static void UnstartedClassGetDeclaredField(Thread* self, ShadowFrame* shadow_frame, JValue* result, |
| 193 | size_t arg_offset) |
| 194 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 195 | // Special managed code cut-out to allow field lookup in a un-started runtime that'd fail |
| 196 | // going the reflective Dex way. |
| 197 | mirror::Class* klass = shadow_frame->GetVRegReference(arg_offset)->AsClass(); |
| 198 | mirror::String* name2 = shadow_frame->GetVRegReference(arg_offset + 1)->AsString(); |
| 199 | mirror::ArtField* found = nullptr; |
| 200 | mirror::ObjectArray<mirror::ArtField>* fields = klass->GetIFields(); |
| 201 | for (int32_t i = 0; i < fields->GetLength() && found == nullptr; ++i) { |
| 202 | mirror::ArtField* f = fields->Get(i); |
| 203 | if (name2->Equals(f->GetName())) { |
| 204 | found = f; |
| 205 | } |
| 206 | } |
| 207 | if (found == nullptr) { |
| 208 | fields = klass->GetSFields(); |
| 209 | for (int32_t i = 0; i < fields->GetLength() && found == nullptr; ++i) { |
| 210 | mirror::ArtField* f = fields->Get(i); |
| 211 | if (name2->Equals(f->GetName())) { |
| 212 | found = f; |
| 213 | } |
| 214 | } |
| 215 | } |
Andreas Gampe | 068b0c0 | 2015-03-11 12:44:47 -0700 | [diff] [blame] | 216 | if (found == nullptr) { |
| 217 | AbortTransactionOrFail(self, "Failed to find field in Class.getDeclaredField in un-started " |
| 218 | " runtime. name=%s class=%s", name2->ToModifiedUtf8().c_str(), |
| 219 | PrettyDescriptor(klass).c_str()); |
| 220 | return; |
| 221 | } |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 222 | // TODO: getDeclaredField calls GetType once the field is found to ensure a |
| 223 | // NoClassDefFoundError is thrown if the field's type cannot be resolved. |
| 224 | mirror::Class* jlr_Field = self->DecodeJObject( |
| 225 | WellKnownClasses::java_lang_reflect_Field)->AsClass(); |
| 226 | StackHandleScope<1> hs(self); |
| 227 | Handle<mirror::Object> field(hs.NewHandle(jlr_Field->AllocNonMovableObject(self))); |
| 228 | CHECK(field.Get() != nullptr); |
| 229 | mirror::ArtMethod* c = jlr_Field->FindDeclaredDirectMethod("<init>", |
| 230 | "(Ljava/lang/reflect/ArtField;)V"); |
| 231 | uint32_t args[1]; |
| 232 | args[0] = StackReference<mirror::Object>::FromMirrorPtr(found).AsVRegValue(); |
| 233 | EnterInterpreterFromInvoke(self, c, field.Get(), args, nullptr); |
| 234 | result->SetL(field.Get()); |
| 235 | } |
| 236 | |
| 237 | static void UnstartedVmClassLoaderFindLoadedClass(Thread* self, ShadowFrame* shadow_frame, |
| 238 | JValue* result, size_t arg_offset) |
| 239 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 240 | mirror::String* class_name = shadow_frame->GetVRegReference(arg_offset + 1)->AsString(); |
| 241 | mirror::ClassLoader* class_loader = |
| 242 | down_cast<mirror::ClassLoader*>(shadow_frame->GetVRegReference(arg_offset)); |
| 243 | StackHandleScope<2> hs(self); |
| 244 | Handle<mirror::String> h_class_name(hs.NewHandle(class_name)); |
| 245 | Handle<mirror::ClassLoader> h_class_loader(hs.NewHandle(class_loader)); |
| 246 | UnstartedRuntimeFindClass(self, h_class_name, h_class_loader, result, |
| 247 | "VMClassLoader.findLoadedClass", false, false); |
| 248 | // This might have an error pending. But semantics are to just return null. |
| 249 | if (self->IsExceptionPending()) { |
| 250 | // If it is an InternalError, keep it. See CheckExceptionGenerateClassNotFound. |
| 251 | std::string type(PrettyTypeOf(self->GetException())); |
| 252 | if (type != "java.lang.InternalError") { |
| 253 | self->ClearException(); |
| 254 | } |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | static void UnstartedVoidLookupType(Thread* self ATTRIBUTE_UNUSED, |
| 259 | ShadowFrame* shadow_frame ATTRIBUTE_UNUSED, |
| 260 | JValue* result, |
| 261 | size_t arg_offset ATTRIBUTE_UNUSED) |
| 262 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 263 | result->SetL(Runtime::Current()->GetClassLinker()->FindPrimitiveClass('V')); |
| 264 | } |
| 265 | |
| 266 | static void UnstartedSystemArraycopy(Thread* self, ShadowFrame* shadow_frame, |
| 267 | JValue* result ATTRIBUTE_UNUSED, size_t arg_offset) |
| 268 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 269 | // Special case array copying without initializing System. |
| 270 | mirror::Class* ctype = shadow_frame->GetVRegReference(arg_offset)->GetClass()->GetComponentType(); |
| 271 | jint srcPos = shadow_frame->GetVReg(arg_offset + 1); |
| 272 | jint dstPos = shadow_frame->GetVReg(arg_offset + 3); |
| 273 | jint length = shadow_frame->GetVReg(arg_offset + 4); |
| 274 | if (!ctype->IsPrimitive()) { |
| 275 | mirror::ObjectArray<mirror::Object>* src = shadow_frame->GetVRegReference(arg_offset)-> |
| 276 | AsObjectArray<mirror::Object>(); |
| 277 | mirror::ObjectArray<mirror::Object>* dst = shadow_frame->GetVRegReference(arg_offset + 2)-> |
| 278 | AsObjectArray<mirror::Object>(); |
| 279 | for (jint i = 0; i < length; ++i) { |
| 280 | dst->Set(dstPos + i, src->Get(srcPos + i)); |
| 281 | } |
| 282 | } else if (ctype->IsPrimitiveChar()) { |
| 283 | mirror::CharArray* src = shadow_frame->GetVRegReference(arg_offset)->AsCharArray(); |
| 284 | mirror::CharArray* dst = shadow_frame->GetVRegReference(arg_offset + 2)->AsCharArray(); |
| 285 | for (jint i = 0; i < length; ++i) { |
| 286 | dst->Set(dstPos + i, src->Get(srcPos + i)); |
| 287 | } |
| 288 | } else if (ctype->IsPrimitiveInt()) { |
| 289 | mirror::IntArray* src = shadow_frame->GetVRegReference(arg_offset)->AsIntArray(); |
| 290 | mirror::IntArray* dst = shadow_frame->GetVRegReference(arg_offset + 2)->AsIntArray(); |
| 291 | for (jint i = 0; i < length; ++i) { |
| 292 | dst->Set(dstPos + i, src->Get(srcPos + i)); |
| 293 | } |
| 294 | } else { |
Andreas Gampe | 068b0c0 | 2015-03-11 12:44:47 -0700 | [diff] [blame] | 295 | AbortTransactionOrFail(self, "Unimplemented System.arraycopy for type '%s'", |
| 296 | PrettyDescriptor(ctype).c_str()); |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 297 | } |
| 298 | } |
| 299 | |
| 300 | static void UnstartedThreadLocalGet(Thread* self, ShadowFrame* shadow_frame, JValue* result, |
| 301 | size_t arg_offset ATTRIBUTE_UNUSED) |
| 302 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 303 | std::string caller(PrettyMethod(shadow_frame->GetLink()->GetMethod())); |
| 304 | bool ok = false; |
| 305 | if (caller == "java.lang.String java.lang.IntegralToString.convertInt" |
| 306 | "(java.lang.AbstractStringBuilder, int)") { |
| 307 | // Allocate non-threadlocal buffer. |
| 308 | result->SetL(mirror::CharArray::Alloc(self, 11)); |
| 309 | ok = true; |
| 310 | } else if (caller == "java.lang.RealToString java.lang.RealToString.getInstance()") { |
| 311 | // Note: RealToString is implemented and used in a different fashion than IntegralToString. |
| 312 | // Conversion is done over an actual object of RealToString (the conversion method is an |
| 313 | // instance method). This means it is not as clear whether it is correct to return a new |
| 314 | // object each time. The caller needs to be inspected by hand to see whether it (incorrectly) |
| 315 | // stores the object for later use. |
| 316 | // See also b/19548084 for a possible rewrite and bringing it in line with IntegralToString. |
| 317 | if (shadow_frame->GetLink()->GetLink() != nullptr) { |
| 318 | std::string caller2(PrettyMethod(shadow_frame->GetLink()->GetLink()->GetMethod())); |
| 319 | if (caller2 == "java.lang.String java.lang.Double.toString(double)") { |
| 320 | // Allocate new object. |
| 321 | StackHandleScope<2> hs(self); |
| 322 | Handle<mirror::Class> h_real_to_string_class(hs.NewHandle( |
| 323 | shadow_frame->GetLink()->GetMethod()->GetDeclaringClass())); |
| 324 | Handle<mirror::Object> h_real_to_string_obj(hs.NewHandle( |
| 325 | h_real_to_string_class->AllocObject(self))); |
| 326 | if (h_real_to_string_obj.Get() != nullptr) { |
| 327 | mirror::ArtMethod* init_method = |
| 328 | h_real_to_string_class->FindDirectMethod("<init>", "()V"); |
| 329 | if (init_method == nullptr) { |
| 330 | h_real_to_string_class->DumpClass(LOG(FATAL), mirror::Class::kDumpClassFullDetail); |
| 331 | } else { |
| 332 | JValue invoke_result; |
| 333 | EnterInterpreterFromInvoke(self, init_method, h_real_to_string_obj.Get(), nullptr, |
| 334 | nullptr); |
| 335 | if (!self->IsExceptionPending()) { |
| 336 | result->SetL(h_real_to_string_obj.Get()); |
| 337 | ok = true; |
| 338 | } |
| 339 | } |
| 340 | } |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 341 | } |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | if (!ok) { |
Andreas Gampe | 068b0c0 | 2015-03-11 12:44:47 -0700 | [diff] [blame] | 346 | AbortTransactionOrFail(self, "Could not create RealToString object"); |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 347 | } |
| 348 | } |
| 349 | |
| 350 | static void UnstartedMathCeil(Thread* self ATTRIBUTE_UNUSED, ShadowFrame* shadow_frame, |
| 351 | JValue* result, size_t arg_offset) { |
| 352 | double in = shadow_frame->GetVRegDouble(arg_offset); |
| 353 | double out; |
| 354 | // Special cases: |
| 355 | // 1) NaN, infinity, +0, -0 -> out := in. All are guaranteed by cmath. |
| 356 | // -1 < in < 0 -> out := -0. |
| 357 | if (-1.0 < in && in < 0) { |
| 358 | out = -0.0; |
| 359 | } else { |
| 360 | out = ceil(in); |
| 361 | } |
| 362 | result->SetD(out); |
| 363 | } |
| 364 | |
| 365 | static void UnstartedArtMethodGetMethodName(Thread* self, ShadowFrame* shadow_frame, |
| 366 | JValue* result, size_t arg_offset) |
| 367 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 368 | mirror::ArtMethod* method = shadow_frame->GetVRegReference(arg_offset)->AsArtMethod(); |
| 369 | result->SetL(method->GetNameAsString(self)); |
| 370 | } |
| 371 | |
| 372 | static void UnstartedObjectHashCode(Thread* self ATTRIBUTE_UNUSED, ShadowFrame* shadow_frame, |
| 373 | JValue* result, size_t arg_offset) |
| 374 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 375 | mirror::Object* obj = shadow_frame->GetVRegReference(arg_offset); |
| 376 | result->SetI(obj->IdentityHashCode()); |
| 377 | } |
| 378 | |
| 379 | static void UnstartedDoubleDoubleToRawLongBits(Thread* self ATTRIBUTE_UNUSED, |
| 380 | ShadowFrame* shadow_frame, JValue* result, |
| 381 | size_t arg_offset) { |
| 382 | double in = shadow_frame->GetVRegDouble(arg_offset); |
| 383 | result->SetJ(bit_cast<int64_t>(in)); |
| 384 | } |
| 385 | |
| 386 | static void UnstartedJNIVMRuntimeNewUnpaddedArray(Thread* self, |
| 387 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 388 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 389 | uint32_t* args, |
| 390 | JValue* result) |
| 391 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 392 | int32_t length = args[1]; |
| 393 | DCHECK_GE(length, 0); |
| 394 | mirror::Class* element_class = reinterpret_cast<mirror::Object*>(args[0])->AsClass(); |
| 395 | Runtime* runtime = Runtime::Current(); |
| 396 | mirror::Class* array_class = runtime->GetClassLinker()->FindArrayClass(self, &element_class); |
| 397 | DCHECK(array_class != nullptr); |
| 398 | gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentAllocator(); |
| 399 | result->SetL(mirror::Array::Alloc<true, true>(self, array_class, length, |
| 400 | array_class->GetComponentSizeShift(), allocator)); |
| 401 | } |
| 402 | |
| 403 | static void UnstartedJNIVMStackGetCallingClassLoader(Thread* self ATTRIBUTE_UNUSED, |
| 404 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 405 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 406 | uint32_t* args ATTRIBUTE_UNUSED, |
| 407 | JValue* result) { |
| 408 | result->SetL(nullptr); |
| 409 | } |
| 410 | |
| 411 | static void UnstartedJNIVMStackGetStackClass2(Thread* self, |
| 412 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 413 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 414 | uint32_t* args ATTRIBUTE_UNUSED, |
| 415 | JValue* result) |
| 416 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 417 | NthCallerVisitor visitor(self, 3); |
| 418 | visitor.WalkStack(); |
| 419 | if (visitor.caller != nullptr) { |
| 420 | result->SetL(visitor.caller->GetDeclaringClass()); |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | static void UnstartedJNIMathLog(Thread* self ATTRIBUTE_UNUSED, |
| 425 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 426 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 427 | uint32_t* args, |
| 428 | JValue* result) { |
| 429 | JValue value; |
| 430 | value.SetJ((static_cast<uint64_t>(args[1]) << 32) | args[0]); |
| 431 | result->SetD(log(value.GetD())); |
| 432 | } |
| 433 | |
| 434 | static void UnstartedJNIMathExp(Thread* self ATTRIBUTE_UNUSED, |
| 435 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 436 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 437 | uint32_t* args, |
| 438 | JValue* result) { |
| 439 | JValue value; |
| 440 | value.SetJ((static_cast<uint64_t>(args[1]) << 32) | args[0]); |
| 441 | result->SetD(exp(value.GetD())); |
| 442 | } |
| 443 | |
| 444 | static void UnstartedJNIClassGetNameNative(Thread* self, |
| 445 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 446 | mirror::Object* receiver, |
| 447 | uint32_t* args ATTRIBUTE_UNUSED, |
| 448 | JValue* result) |
| 449 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 450 | StackHandleScope<1> hs(self); |
| 451 | result->SetL(mirror::Class::ComputeName(hs.NewHandle(receiver->AsClass()))); |
| 452 | } |
| 453 | |
| 454 | static void UnstartedJNIFloatFloatToRawIntBits(Thread* self ATTRIBUTE_UNUSED, |
| 455 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 456 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 457 | uint32_t* args, |
| 458 | JValue* result) { |
| 459 | result->SetI(args[0]); |
| 460 | } |
| 461 | |
| 462 | static void UnstartedJNIFloatIntBitsToFloat(Thread* self ATTRIBUTE_UNUSED, |
| 463 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 464 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 465 | uint32_t* args, |
| 466 | JValue* result) { |
| 467 | result->SetI(args[0]); |
| 468 | } |
| 469 | |
| 470 | static void UnstartedJNIObjectInternalClone(Thread* self ATTRIBUTE_UNUSED, |
| 471 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 472 | mirror::Object* receiver, |
| 473 | uint32_t* args ATTRIBUTE_UNUSED, |
| 474 | JValue* result) |
| 475 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 476 | result->SetL(receiver->Clone(self)); |
| 477 | } |
| 478 | |
| 479 | static void UnstartedJNIObjectNotifyAll(Thread* self ATTRIBUTE_UNUSED, |
| 480 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 481 | mirror::Object* receiver, |
| 482 | uint32_t* args ATTRIBUTE_UNUSED, |
| 483 | JValue* result ATTRIBUTE_UNUSED) |
| 484 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 485 | receiver->NotifyAll(self); |
| 486 | } |
| 487 | |
| 488 | static void UnstartedJNIStringCompareTo(Thread* self, |
| 489 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 490 | mirror::Object* receiver, |
| 491 | uint32_t* args, |
| 492 | JValue* result) |
| 493 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 494 | mirror::String* rhs = reinterpret_cast<mirror::Object*>(args[0])->AsString(); |
| 495 | if (rhs == nullptr) { |
Andreas Gampe | 068b0c0 | 2015-03-11 12:44:47 -0700 | [diff] [blame] | 496 | AbortTransactionOrFail(self, "String.compareTo with null object"); |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 497 | } |
| 498 | result->SetI(receiver->AsString()->CompareTo(rhs)); |
| 499 | } |
| 500 | |
| 501 | static void UnstartedJNIStringIntern(Thread* self ATTRIBUTE_UNUSED, |
| 502 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 503 | mirror::Object* receiver, |
| 504 | uint32_t* args ATTRIBUTE_UNUSED, |
| 505 | JValue* result) |
| 506 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 507 | result->SetL(receiver->AsString()->Intern()); |
| 508 | } |
| 509 | |
| 510 | static void UnstartedJNIStringFastIndexOf(Thread* self ATTRIBUTE_UNUSED, |
| 511 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 512 | mirror::Object* receiver, |
| 513 | uint32_t* args, |
| 514 | JValue* result) |
| 515 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 516 | result->SetI(receiver->AsString()->FastIndexOf(args[0], args[1])); |
| 517 | } |
| 518 | |
| 519 | static void UnstartedJNIArrayCreateMultiArray(Thread* self, |
| 520 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 521 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 522 | uint32_t* args, |
| 523 | JValue* result) |
| 524 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 525 | StackHandleScope<2> hs(self); |
| 526 | auto h_class(hs.NewHandle(reinterpret_cast<mirror::Class*>(args[0])->AsClass())); |
| 527 | auto h_dimensions(hs.NewHandle(reinterpret_cast<mirror::IntArray*>(args[1])->AsIntArray())); |
| 528 | result->SetL(mirror::Array::CreateMultiArray(self, h_class, h_dimensions)); |
| 529 | } |
| 530 | |
| 531 | static void UnstartedJNIThrowableNativeFillInStackTrace(Thread* self, |
| 532 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 533 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 534 | uint32_t* args ATTRIBUTE_UNUSED, |
| 535 | JValue* result) |
| 536 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 537 | ScopedObjectAccessUnchecked soa(self); |
| 538 | if (Runtime::Current()->IsActiveTransaction()) { |
| 539 | result->SetL(soa.Decode<mirror::Object*>(self->CreateInternalStackTrace<true>(soa))); |
| 540 | } else { |
| 541 | result->SetL(soa.Decode<mirror::Object*>(self->CreateInternalStackTrace<false>(soa))); |
| 542 | } |
| 543 | } |
| 544 | |
| 545 | static void UnstartedJNISystemIdentityHashCode(Thread* self ATTRIBUTE_UNUSED, |
| 546 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 547 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 548 | uint32_t* args, |
| 549 | JValue* result) |
| 550 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 551 | mirror::Object* obj = reinterpret_cast<mirror::Object*>(args[0]); |
| 552 | result->SetI((obj != nullptr) ? obj->IdentityHashCode() : 0); |
| 553 | } |
| 554 | |
| 555 | static void UnstartedJNIByteOrderIsLittleEndian(Thread* self ATTRIBUTE_UNUSED, |
| 556 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 557 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 558 | uint32_t* args ATTRIBUTE_UNUSED, |
| 559 | JValue* result) { |
| 560 | result->SetZ(JNI_TRUE); |
| 561 | } |
| 562 | |
| 563 | static void UnstartedJNIUnsafeCompareAndSwapInt(Thread* self ATTRIBUTE_UNUSED, |
| 564 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 565 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 566 | uint32_t* args, |
| 567 | JValue* result) |
| 568 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 569 | mirror::Object* obj = reinterpret_cast<mirror::Object*>(args[0]); |
| 570 | jlong offset = (static_cast<uint64_t>(args[2]) << 32) | args[1]; |
| 571 | jint expectedValue = args[3]; |
| 572 | jint newValue = args[4]; |
| 573 | bool success; |
| 574 | if (Runtime::Current()->IsActiveTransaction()) { |
| 575 | success = obj->CasFieldStrongSequentiallyConsistent32<true>(MemberOffset(offset), |
| 576 | expectedValue, newValue); |
| 577 | } else { |
| 578 | success = obj->CasFieldStrongSequentiallyConsistent32<false>(MemberOffset(offset), |
| 579 | expectedValue, newValue); |
| 580 | } |
| 581 | result->SetZ(success ? JNI_TRUE : JNI_FALSE); |
| 582 | } |
| 583 | |
| 584 | static void UnstartedJNIUnsafePutObject(Thread* self ATTRIBUTE_UNUSED, |
| 585 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 586 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 587 | uint32_t* args, |
| 588 | JValue* result ATTRIBUTE_UNUSED) |
| 589 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 590 | mirror::Object* obj = reinterpret_cast<mirror::Object*>(args[0]); |
| 591 | jlong offset = (static_cast<uint64_t>(args[2]) << 32) | args[1]; |
| 592 | mirror::Object* newValue = reinterpret_cast<mirror::Object*>(args[3]); |
| 593 | if (Runtime::Current()->IsActiveTransaction()) { |
| 594 | obj->SetFieldObject<true>(MemberOffset(offset), newValue); |
| 595 | } else { |
| 596 | obj->SetFieldObject<false>(MemberOffset(offset), newValue); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | static void UnstartedJNIUnsafeGetArrayBaseOffsetForComponentType( |
| 601 | Thread* self ATTRIBUTE_UNUSED, |
| 602 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 603 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 604 | uint32_t* args, |
| 605 | JValue* result) |
| 606 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 607 | mirror::Class* component = reinterpret_cast<mirror::Object*>(args[0])->AsClass(); |
| 608 | Primitive::Type primitive_type = component->GetPrimitiveType(); |
| 609 | result->SetI(mirror::Array::DataOffset(Primitive::ComponentSize(primitive_type)).Int32Value()); |
| 610 | } |
| 611 | |
| 612 | static void UnstartedJNIUnsafeGetArrayIndexScaleForComponentType( |
| 613 | Thread* self ATTRIBUTE_UNUSED, |
| 614 | mirror::ArtMethod* method ATTRIBUTE_UNUSED, |
| 615 | mirror::Object* receiver ATTRIBUTE_UNUSED, |
| 616 | uint32_t* args, |
| 617 | JValue* result) |
| 618 | SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { |
| 619 | mirror::Class* component = reinterpret_cast<mirror::Object*>(args[0])->AsClass(); |
| 620 | Primitive::Type primitive_type = component->GetPrimitiveType(); |
| 621 | result->SetI(Primitive::ComponentSize(primitive_type)); |
| 622 | } |
| 623 | |
| 624 | typedef void(*InvokeHandler)(Thread* self, ShadowFrame* shadow_frame, JValue* result, |
| 625 | size_t arg_size); |
| 626 | |
| 627 | typedef void(*JNIHandler)(Thread* self, mirror::ArtMethod* method, mirror::Object* receiver, |
| 628 | uint32_t* args, JValue* result); |
| 629 | |
| 630 | static bool tables_initialized_ = false; |
| 631 | static std::unordered_map<std::string, InvokeHandler> invoke_handlers_; |
| 632 | static std::unordered_map<std::string, JNIHandler> jni_handlers_; |
| 633 | |
| 634 | static void UnstartedRuntimeInitializeInvokeHandlers() { |
| 635 | struct InvokeHandlerDef { |
| 636 | std::string name; |
| 637 | InvokeHandler function; |
| 638 | }; |
| 639 | |
| 640 | InvokeHandlerDef defs[] { |
| 641 | { "java.lang.Class java.lang.Class.forName(java.lang.String)", |
| 642 | &UnstartedClassForName }, |
| 643 | { "java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)", |
| 644 | &UnstartedClassForNameLong }, |
| 645 | { "java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader)", |
| 646 | &UnstartedClassClassForName }, |
| 647 | { "java.lang.Class java.lang.VMClassLoader.findLoadedClass(java.lang.ClassLoader, java.lang.String)", |
| 648 | &UnstartedVmClassLoaderFindLoadedClass }, |
| 649 | { "java.lang.Class java.lang.Void.lookupType()", |
| 650 | &UnstartedVoidLookupType }, |
| 651 | { "java.lang.Object java.lang.Class.newInstance()", |
| 652 | &UnstartedClassNewInstance }, |
| 653 | { "java.lang.reflect.Field java.lang.Class.getDeclaredField(java.lang.String)", |
| 654 | &UnstartedClassGetDeclaredField }, |
| 655 | { "int java.lang.Object.hashCode()", |
| 656 | &UnstartedObjectHashCode }, |
| 657 | { "java.lang.String java.lang.reflect.ArtMethod.getMethodName(java.lang.reflect.ArtMethod)", |
| 658 | &UnstartedArtMethodGetMethodName }, |
| 659 | { "void java.lang.System.arraycopy(java.lang.Object, int, java.lang.Object, int, int)", |
| 660 | &UnstartedSystemArraycopy}, |
| 661 | { "void java.lang.System.arraycopy(char[], int, char[], int, int)", |
| 662 | &UnstartedSystemArraycopy }, |
| 663 | { "void java.lang.System.arraycopy(int[], int, int[], int, int)", |
| 664 | &UnstartedSystemArraycopy }, |
| 665 | { "long java.lang.Double.doubleToRawLongBits(double)", |
| 666 | &UnstartedDoubleDoubleToRawLongBits }, |
| 667 | { "double java.lang.Math.ceil(double)", |
| 668 | &UnstartedMathCeil }, |
| 669 | { "java.lang.Object java.lang.ThreadLocal.get()", |
| 670 | &UnstartedThreadLocalGet }, |
| 671 | }; |
| 672 | |
| 673 | for (auto& def : defs) { |
| 674 | invoke_handlers_.insert(std::make_pair(def.name, def.function)); |
| 675 | } |
| 676 | } |
| 677 | |
| 678 | static void UnstartedRuntimeInitializeJNIHandlers() { |
| 679 | struct JNIHandlerDef { |
| 680 | std::string name; |
| 681 | JNIHandler function; |
| 682 | }; |
| 683 | |
| 684 | JNIHandlerDef defs[] { |
| 685 | { "java.lang.Object dalvik.system.VMRuntime.newUnpaddedArray(java.lang.Class, int)", |
| 686 | &UnstartedJNIVMRuntimeNewUnpaddedArray }, |
| 687 | { "java.lang.ClassLoader dalvik.system.VMStack.getCallingClassLoader()", |
| 688 | &UnstartedJNIVMStackGetCallingClassLoader }, |
| 689 | { "java.lang.Class dalvik.system.VMStack.getStackClass2()", |
| 690 | &UnstartedJNIVMStackGetStackClass2 }, |
| 691 | { "double java.lang.Math.log(double)", |
| 692 | &UnstartedJNIMathLog }, |
| 693 | { "java.lang.String java.lang.Class.getNameNative()", |
| 694 | &UnstartedJNIClassGetNameNative }, |
| 695 | { "int java.lang.Float.floatToRawIntBits(float)", |
| 696 | &UnstartedJNIFloatFloatToRawIntBits }, |
| 697 | { "float java.lang.Float.intBitsToFloat(int)", |
| 698 | &UnstartedJNIFloatIntBitsToFloat }, |
| 699 | { "double java.lang.Math.exp(double)", |
| 700 | &UnstartedJNIMathExp }, |
| 701 | { "java.lang.Object java.lang.Object.internalClone()", |
| 702 | &UnstartedJNIObjectInternalClone }, |
| 703 | { "void java.lang.Object.notifyAll()", |
| 704 | &UnstartedJNIObjectNotifyAll}, |
| 705 | { "int java.lang.String.compareTo(java.lang.String)", |
| 706 | &UnstartedJNIStringCompareTo }, |
| 707 | { "java.lang.String java.lang.String.intern()", |
| 708 | &UnstartedJNIStringIntern }, |
| 709 | { "int java.lang.String.fastIndexOf(int, int)", |
| 710 | &UnstartedJNIStringFastIndexOf }, |
| 711 | { "java.lang.Object java.lang.reflect.Array.createMultiArray(java.lang.Class, int[])", |
| 712 | &UnstartedJNIArrayCreateMultiArray }, |
| 713 | { "java.lang.Object java.lang.Throwable.nativeFillInStackTrace()", |
| 714 | &UnstartedJNIThrowableNativeFillInStackTrace }, |
| 715 | { "int java.lang.System.identityHashCode(java.lang.Object)", |
| 716 | &UnstartedJNISystemIdentityHashCode }, |
| 717 | { "boolean java.nio.ByteOrder.isLittleEndian()", |
| 718 | &UnstartedJNIByteOrderIsLittleEndian }, |
| 719 | { "boolean sun.misc.Unsafe.compareAndSwapInt(java.lang.Object, long, int, int)", |
| 720 | &UnstartedJNIUnsafeCompareAndSwapInt }, |
| 721 | { "void sun.misc.Unsafe.putObject(java.lang.Object, long, java.lang.Object)", |
| 722 | &UnstartedJNIUnsafePutObject }, |
| 723 | { "int sun.misc.Unsafe.getArrayBaseOffsetForComponentType(java.lang.Class)", |
| 724 | &UnstartedJNIUnsafeGetArrayBaseOffsetForComponentType }, |
| 725 | { "int sun.misc.Unsafe.getArrayIndexScaleForComponentType(java.lang.Class)", |
| 726 | &UnstartedJNIUnsafeGetArrayIndexScaleForComponentType }, |
| 727 | }; |
| 728 | |
| 729 | for (auto& def : defs) { |
| 730 | jni_handlers_.insert(std::make_pair(def.name, def.function)); |
| 731 | } |
| 732 | } |
| 733 | |
| 734 | void UnstartedRuntimeInitialize() { |
| 735 | CHECK(!tables_initialized_); |
| 736 | |
| 737 | UnstartedRuntimeInitializeInvokeHandlers(); |
| 738 | UnstartedRuntimeInitializeJNIHandlers(); |
| 739 | |
| 740 | tables_initialized_ = true; |
| 741 | } |
| 742 | |
| 743 | void UnstartedRuntimeInvoke(Thread* self, const DexFile::CodeItem* code_item, |
| 744 | ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) { |
| 745 | // In a runtime that's not started we intercept certain methods to avoid complicated dependency |
| 746 | // problems in core libraries. |
| 747 | CHECK(tables_initialized_); |
| 748 | |
| 749 | std::string name(PrettyMethod(shadow_frame->GetMethod())); |
| 750 | const auto& iter = invoke_handlers_.find(name); |
| 751 | if (iter != invoke_handlers_.end()) { |
| 752 | (*iter->second)(self, shadow_frame, result, arg_offset); |
| 753 | } else { |
| 754 | // Not special, continue with regular interpreter execution. |
| 755 | artInterpreterToInterpreterBridge(self, code_item, shadow_frame, result); |
| 756 | } |
| 757 | } |
| 758 | |
| 759 | // Hand select a number of methods to be run in a not yet started runtime without using JNI. |
| 760 | void UnstartedRuntimeJni(Thread* self, mirror::ArtMethod* method, mirror::Object* receiver, |
| 761 | uint32_t* args, JValue* result) { |
| 762 | std::string name(PrettyMethod(method)); |
| 763 | const auto& iter = jni_handlers_.find(name); |
| 764 | if (iter != jni_handlers_.end()) { |
| 765 | (*iter->second)(self, method, receiver, args, result); |
| 766 | } else if (Runtime::Current()->IsActiveTransaction()) { |
| 767 | AbortTransaction(self, "Attempt to invoke native method in non-started runtime: %s", |
| 768 | name.c_str()); |
| 769 | } else { |
| 770 | LOG(FATAL) << "Calling native method " << PrettyMethod(method) << " in an unstarted " |
| 771 | "non-transactional runtime"; |
| 772 | } |
| 773 | } |
| 774 | |
| 775 | } // namespace interpreter |
| 776 | } // namespace art |