From eb8167a4f4d27fce0530f6724ab8032610cd146b Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 7 May 2014 15:43:14 -0700 Subject: Add Handle/HandleScope and delete SirtRef. Delete SirtRef and replaced it with Handle. Handles are value types which wrap around StackReference*. Renamed StackIndirectReferenceTable to HandleScope. Added a scoped handle wrapper which wraps around an Object** and restores it in its destructor. Renamed Handle::get -> Get. Bug: 8473721 Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a --- compiler/driver/compiler_driver_test.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'compiler/driver/compiler_driver_test.cc') diff --git a/compiler/driver/compiler_driver_test.cc b/compiler/driver/compiler_driver_test.cc index 86034c8327..113594a0d4 100644 --- a/compiler/driver/compiler_driver_test.cc +++ b/compiler/driver/compiler_driver_test.cc @@ -30,7 +30,7 @@ #include "mirror/dex_cache-inl.h" #include "mirror/object_array-inl.h" #include "mirror/object-inl.h" -#include "sirt_ref-inl.h" +#include "handle_scope-inl.h" namespace art { @@ -80,7 +80,9 @@ class CompilerDriverTest : public CommonCompilerTest { const DexFile::ClassDef& class_def = dex_file.GetClassDef(i); const char* descriptor = dex_file.GetClassDescriptor(class_def); ScopedObjectAccess soa(Thread::Current()); - SirtRef loader(soa.Self(), soa.Decode(class_loader)); + StackHandleScope<1> hs(soa.Self()); + Handle loader( + hs.NewHandle(soa.Decode(class_loader))); mirror::Class* c = class_linker->FindClass(soa.Self(), descriptor, loader); CHECK(c != NULL); for (size_t i = 0; i < c->NumDirectMethods(); i++) { @@ -150,7 +152,8 @@ TEST_F(CompilerDriverTest, AbstractMethodErrorStub) { jobject class_loader; { ScopedObjectAccess soa(Thread::Current()); - SirtRef null_loader(soa.Self(), nullptr); + StackHandleScope<1> hs(soa.Self()); + auto null_loader(hs.NewHandle(nullptr)); CompileVirtualMethod(null_loader, "java.lang.Class", "isFinalizable", "()Z"); CompileDirectMethod(null_loader, "java.lang.Object", "", "()V"); class_loader = LoadDex("AbstractMethod"); -- cgit v1.2.3-59-g8ed1b