summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Almaz Mingaleev <mingaleev@google.com> 2023-09-25 14:38:34 +0100
committer Almaz Mingaleev <mingaleev@google.com> 2023-09-26 08:11:27 +0000
commit45a0ec9ff288feb34060c96f1bb2e67f375b6b4f (patch)
tree64ba5167299f04f4c2a05bb128a40e815ea13766
parentb02117aaca1fda28490ea1fec389be4f3e3fac4c (diff)
Cleanup unstartedruntime.
Remove deprecated JdkUnsafe.*Object.* methods and sort them in the same order as they are defined in unstarted_runtime_list.h. Bug: 297147201 Test: ./art/test/testrunner/testrunner.py --host --64 -b Change-Id: Ie933fcff5583c9276abf82622224536cd719762e
-rw-r--r--runtime/interpreter/unstarted_runtime.cc53
-rw-r--r--runtime/interpreter/unstarted_runtime_list.h5
2 files changed, 17 insertions, 41 deletions
diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc
index 266e4c0291..a4e477cefc 100644
--- a/runtime/interpreter/unstarted_runtime.cc
+++ b/runtime/interpreter/unstarted_runtime.cc
@@ -1550,19 +1550,13 @@ void UnstartedRuntime::UnstartedUnsafeCompareAndSwapObject(
void UnstartedRuntime::UnstartedUnsafeGetObjectVolatile(
Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset)
REQUIRES_SHARED(Locks::mutator_lock_) {
- UnstartedJdkUnsafeGetObjectVolatile(self, shadow_frame, result, arg_offset);
-}
-
-void UnstartedRuntime::UnstartedJdkUnsafeGetReferenceVolatile(
- Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset)
- REQUIRES_SHARED(Locks::mutator_lock_) {
- UnstartedJdkUnsafeGetObjectVolatile(self, shadow_frame, result, arg_offset);
+ UnstartedJdkUnsafeGetReferenceVolatile(self, shadow_frame, result, arg_offset);
}
void UnstartedRuntime::UnstartedUnsafePutObjectVolatile(
Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset)
REQUIRES_SHARED(Locks::mutator_lock_) {
- UnstartedJdkUnsafePutObjectVolatile(self, shadow_frame, result, arg_offset);
+ UnstartedJdkUnsafePutReferenceVolatile(self, shadow_frame, result, arg_offset);
}
void UnstartedRuntime::UnstartedUnsafePutOrderedObject(
@@ -1571,6 +1565,16 @@ void UnstartedRuntime::UnstartedUnsafePutOrderedObject(
UnstartedJdkUnsafePutOrderedObject(self, shadow_frame, result, arg_offset);
}
+void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSetLong(
+ Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
+ UnstartedJdkUnsafeCompareAndSwapLong(self, shadow_frame, result, arg_offset);
+}
+
+void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSetReference(
+ Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
+ UnstartedJdkUnsafeCompareAndSwapObject(self, shadow_frame, result, arg_offset);
+}
+
void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSwapLong(
Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
// Argument 0 is the Unsafe instance, skip.
@@ -1600,11 +1604,6 @@ void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSwapLong(
result->SetZ(success ? 1 : 0);
}
-void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSetLong(
- Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
- UnstartedJdkUnsafeCompareAndSwapLong(self, shadow_frame, result, arg_offset);
-}
-
void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSwapObject(
Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
// Argument 0 is the Unsafe instance, skip.
@@ -1655,17 +1654,7 @@ void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSwapObject(
result->SetZ(success ? 1 : 0);
}
-void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSetObject(
- Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
- UnstartedJdkUnsafeCompareAndSwapObject(self, shadow_frame, result, arg_offset);
-}
-
-void UnstartedRuntime::UnstartedJdkUnsafeCompareAndSetReference(
- Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset) {
- UnstartedJdkUnsafeCompareAndSwapObject(self, shadow_frame, result, arg_offset);
-}
-
-void UnstartedRuntime::UnstartedJdkUnsafeGetObjectVolatile(
+void UnstartedRuntime::UnstartedJdkUnsafeGetReferenceVolatile(
Thread* self, ShadowFrame* shadow_frame, JValue* result, size_t arg_offset)
REQUIRES_SHARED(Locks::mutator_lock_) {
// Argument 0 is the Unsafe instance, skip.
@@ -1679,10 +1668,10 @@ void UnstartedRuntime::UnstartedJdkUnsafeGetObjectVolatile(
result->SetL(value);
}
-void UnstartedRuntime::UnstartedJdkUnsafePutObjectVolatile(Thread* self,
- ShadowFrame* shadow_frame,
- [[maybe_unused]] JValue* result,
- size_t arg_offset)
+void UnstartedRuntime::UnstartedJdkUnsafePutReferenceVolatile(Thread* self,
+ ShadowFrame* shadow_frame,
+ [[maybe_unused]] JValue* result,
+ size_t arg_offset)
REQUIRES_SHARED(Locks::mutator_lock_) {
// Argument 0 is the Unsafe instance, skip.
mirror::Object* obj = shadow_frame->GetVRegReference(arg_offset + 1);
@@ -1703,14 +1692,6 @@ void UnstartedRuntime::UnstartedJdkUnsafePutObjectVolatile(Thread* self,
}
}
-void UnstartedRuntime::UnstartedJdkUnsafePutReferenceVolatile(Thread* self,
- ShadowFrame* shadow_frame,
- JValue* result,
- size_t arg_offset)
- REQUIRES_SHARED(Locks::mutator_lock_) {
- UnstartedJdkUnsafePutObjectVolatile(self, shadow_frame, result, arg_offset);
-}
-
void UnstartedRuntime::UnstartedJdkUnsafePutOrderedObject(Thread* self,
ShadowFrame* shadow_frame,
[[maybe_unused]] JValue* result,
diff --git a/runtime/interpreter/unstarted_runtime_list.h b/runtime/interpreter/unstarted_runtime_list.h
index 9f8f367192..60b2400329 100644
--- a/runtime/interpreter/unstarted_runtime_list.h
+++ b/runtime/interpreter/unstarted_runtime_list.h
@@ -80,15 +80,10 @@
V(UnsafePutObjectVolatile, "Lsun/misc/Unsafe;", "putObjectVolatile", "(Ljava/lang/Object;JLjava/lang/Object;)V") \
V(UnsafePutOrderedObject, "Lsun/misc/Unsafe;", "putOrderedObject", "(Ljava/lang/Object;JLjava/lang/Object;)V") \
V(JdkUnsafeCompareAndSetLong, "Ljdk/internal/misc/Unsafe;", "compareAndSetLong", "(Ljava/lang/Object;JJJ)Z") \
- /* TODO jdk.internal.misc.Unsafe*Object* methods are define them in terms of *Reference* methods. */ \
- /* JdkUnsafeCompareAndSetObject and similar can be removed. */ \
- V(JdkUnsafeCompareAndSetObject, "Ljdk/internal/misc/Unsafe;", "compareAndSetObject", "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z") \
V(JdkUnsafeCompareAndSetReference, "Ljdk/internal/misc/Unsafe;", "compareAndSetReference", "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z") \
V(JdkUnsafeCompareAndSwapLong, "Ljdk/internal/misc/Unsafe;", "compareAndSwapLong", "(Ljava/lang/Object;JJJ)Z") \
V(JdkUnsafeCompareAndSwapObject, "Ljdk/internal/misc/Unsafe;", "compareAndSwapObject", "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z") \
- V(JdkUnsafeGetObjectVolatile, "Ljdk/internal/misc/Unsafe;", "getObjectVolatile", "(Ljava/lang/Object;J)Ljava/lang/Object;") \
V(JdkUnsafeGetReferenceVolatile, "Ljdk/internal/misc/Unsafe;", "getReferenceVolatile", "(Ljava/lang/Object;J)Ljava/lang/Object;") \
- V(JdkUnsafePutObjectVolatile, "Ljdk/internal/misc/Unsafe;", "putObjectVolatile", "(Ljava/lang/Object;JLjava/lang/Object;)V") \
V(JdkUnsafePutReferenceVolatile, "Ljdk/internal/misc/Unsafe;", "putReferenceVolatile", "(Ljava/lang/Object;JLjava/lang/Object;)V") \
V(JdkUnsafePutOrderedObject, "Ljdk/internal/misc/Unsafe;", "putOrderedObject", "(Ljava/lang/Object;JLjava/lang/Object;)V") \
V(IntegerParseInt, "Ljava/lang/Integer;", "parseInt", "(Ljava/lang/String;)I") \