summaryrefslogtreecommitdiff
path: root/runtime/native/dalvik_system_VMRuntime.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2019-05-16 16:47:08 +0100
committer Vladimir Marko <vmarko@google.com> 2019-05-17 08:10:30 +0000
commit9b81ac36e161fd993eab17b43b93a96e8c63b5cc (patch)
treebac59dd8a62ae9f410c707a4086c330b8923a55b /runtime/native/dalvik_system_VMRuntime.cc
parent92ed90ca3897ae7861b22aa12740065152839649 (diff)
Add default argument kIsInstrumented=true.
kIsInstrumented=false is reserved for use by specialized entrypoints which are used only when we can ensure that the code is not instrumented. So add the default argument to simplify all other callers. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I3419795794fec9a1733ab3ad698b6415dbac679d
Diffstat (limited to 'runtime/native/dalvik_system_VMRuntime.cc')
-rw-r--r--runtime/native/dalvik_system_VMRuntime.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc
index 399813c60e..410c2295bf 100644
--- a/runtime/native/dalvik_system_VMRuntime.cc
+++ b/runtime/native/dalvik_system_VMRuntime.cc
@@ -118,11 +118,11 @@ static jobject VMRuntime_newNonMovableArray(JNIEnv* env, jobject, jclass javaEle
return nullptr;
}
gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentNonMovingAllocator();
- ObjPtr<mirror::Array> result = mirror::Array::Alloc<true>(soa.Self(),
- array_class,
- length,
- array_class->GetComponentSizeShift(),
- allocator);
+ ObjPtr<mirror::Array> result = mirror::Array::Alloc(soa.Self(),
+ array_class,
+ length,
+ array_class->GetComponentSizeShift(),
+ allocator);
return soa.AddLocalReference<jobject>(result);
}
@@ -145,12 +145,13 @@ static jobject VMRuntime_newUnpaddedArray(JNIEnv* env, jobject, jclass javaEleme
return nullptr;
}
gc::AllocatorType allocator = runtime->GetHeap()->GetCurrentAllocator();
- ObjPtr<mirror::Array> result = mirror::Array::Alloc<true, true>(
- soa.Self(),
- array_class,
- length,
- array_class->GetComponentSizeShift(),
- allocator);
+ ObjPtr<mirror::Array> result =
+ mirror::Array::Alloc</*kIsInstrumented=*/ true, /*kFillUsable=*/ true>(
+ soa.Self(),
+ array_class,
+ length,
+ array_class->GetComponentSizeShift(),
+ allocator);
return soa.AddLocalReference<jobject>(result);
}