portable_dexcache_entrypoints.cc revision 7655f29fabc0a12765de828914a18314382e5a35
1/* 2 * Copyright (C) 2012 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 "entrypoints/entrypoint_utils.h" 18#include "gc/accounting/card_table-inl.h" 19#include "mirror/abstract_method-inl.h" 20#include "mirror/object-inl.h" 21 22namespace art { 23 24extern "C" mirror::Object* art_portable_initialize_static_storage_from_code(uint32_t type_idx, 25 mirror::AbstractMethod* referrer, 26 Thread* thread) 27 SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { 28 return ResolveVerifyAndClinit(type_idx, referrer, thread, true, false); 29} 30 31extern "C" mirror::Object* art_portable_initialize_type_from_code(uint32_t type_idx, 32 mirror::AbstractMethod* referrer, 33 Thread* thread) 34 SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { 35 return ResolveVerifyAndClinit(type_idx, referrer, thread, false, false); 36} 37 38extern "C" mirror::Object* art_portable_initialize_type_and_verify_access_from_code(uint32_t type_idx, 39 mirror::AbstractMethod* referrer, 40 Thread* thread) 41 SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { 42 // Called when caller isn't guaranteed to have access to a type and the dex cache may be 43 // unpopulated 44 return ResolveVerifyAndClinit(type_idx, referrer, thread, false, true); 45} 46 47extern "C" mirror::Object* art_portable_resolve_string_from_code(mirror::AbstractMethod* referrer, 48 uint32_t string_idx) 49 SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { 50 return ResolveStringFromCode(referrer, string_idx); 51} 52 53} // namespace art 54