From f7aaacd97881c6924b8212c7f8fe4a4c8721ef53 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Thu, 12 Jan 2017 02:58:38 +0000 Subject: Revert "Make object allocation entrypoints only take a class." 960-default-smali64 is failing. This reverts commit 2b615ba29c4dfcf54aaf44955f2eac60f5080b2e. Change-Id: Iebb8ee5a917fa84c5f01660ce432798524d078ef --- runtime/entrypoints/entrypoint_utils.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'runtime/entrypoints/entrypoint_utils.h') diff --git a/runtime/entrypoints/entrypoint_utils.h b/runtime/entrypoints/entrypoint_utils.h index 4794610ca8..7cc136e227 100644 --- a/runtime/entrypoints/entrypoint_utils.h +++ b/runtime/entrypoints/entrypoint_utils.h @@ -45,10 +45,27 @@ class OatQuickMethodHeader; class ScopedObjectAccessAlreadyRunnable; class Thread; +template +ALWAYS_INLINE inline mirror::Class* CheckObjectAlloc(dex::TypeIndex type_idx, + ArtMethod* method, + Thread* self, + bool* slow_path) + REQUIRES_SHARED(Locks::mutator_lock_) + REQUIRES(!Roles::uninterruptible_); + +ALWAYS_INLINE inline mirror::Class* CheckClassInitializedForObjectAlloc(mirror::Class* klass, + Thread* self, + bool* slow_path) + REQUIRES_SHARED(Locks::mutator_lock_) + REQUIRES(!Roles::uninterruptible_); + // Given the context of a calling Method, use its DexCache to resolve a type to a Class. If it // cannot be resolved, throw an error. If it can, use it to create an instance. -template -ALWAYS_INLINE inline mirror::Object* AllocObjectFromCode(mirror::Class* klass, +// When verification/compiler hasn't been able to verify access, optionally perform an access +// check. +template +ALWAYS_INLINE inline mirror::Object* AllocObjectFromCode(dex::TypeIndex type_idx, + ArtMethod* method, Thread* self, gc::AllocatorType allocator_type) REQUIRES_SHARED(Locks::mutator_lock_) -- cgit v1.2.3-59-g8ed1b