1#
2# Copyright (C) 2018 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.source "VarHandleUnhappyAccessors.smali"
17
18.class public LVarHandleUnhappyAccessors;
19.super Ljava/lang/Object;
20
21.method public constructor <init>()V
22.registers 4
23  invoke-direct {p0}, Ljava/lang/Object;-><init>()V
24  invoke-static {}, LVarHandleUnhappyAccessors;->getVarHandle()Ljava/lang/invoke/VarHandle;
25  move-result-object v0
26  invoke-static {}, LVarHandleUnhappyAccessors;->getObjectArray()[Ljava/lang/Object;
27  move-result-object v1
28  invoke-static {v0, v1}, LVarHandleUnhappyAccessors;->compareAndExchange(Ljava/lang/invoke/VarHandle;[Ljava/lang/Object;)V
29  invoke-static {v0}, LVarHandleUnhappyAccessors;->compareAndExchangeAcquire(Ljava/lang/invoke/VarHandle;)V
30  invoke-static {v0}, LVarHandleUnhappyAccessors;->compareAndExchangeRelease(Ljava/lang/invoke/VarHandle;)V
31  invoke-static {v0}, LVarHandleUnhappyAccessors;->compareAndSet(Ljava/lang/invoke/VarHandle;)V
32  return-void
33.end method
34
35# The following methods all invoke VarHandle accessors but the targetted
36# accessor methods have the wrong signature.
37
38.method public static compareAndExchange(Ljava/lang/invoke/VarHandle;[Ljava/lang/Object;)V
39.registers 2
40  invoke-polymorphic {p0, p1}, Ljava/lang/invoke/VarHandle;->compareAndExchange([Ljava/lang/Object;)Ljava/lang/Integer;, ([Ljava/lang/Object;)Ljava/lang/Object;
41.end method
42
43.method public static compareAndExchangeAcquire(Ljava/lang/invoke/VarHandle;)V
44.registers 2
45  const/4 v0, 1
46  invoke-polymorphic {p0, v0}, Ljava/lang/invoke/VarHandle;->compareAndExchangeAcquire(I)Ljava/lang/Object;, ([Ljava/lang/Object;)Ljava/lang/Object;
47.end method
48
49.method public static compareAndExchangeRelease(Ljava/lang/invoke/VarHandle;)V
50.registers 1
51  invoke-polymorphic {p0}, Ljava/lang/invoke/VarHandle;->compareAndExchangeRelease()V, ([Ljava/lang/Object;)Ljava/lang/Object;
52.end method
53
54.method public static compareAndSet(Ljava/lang/invoke/VarHandle;)V
55.registers 2
56  const/4 v0, 1
57  invoke-polymorphic {p0, v0}, Ljava/lang/invoke/VarHandle;->compareAndSet(I)Z, ([Ljava/lang/Object;)Ljava/lang/Object;
58.end method
59
60.method public static getVarHandle()Ljava/lang/invoke/VarHandle;
61.registers 1
62  const/4 v0, 0
63  return-object v0
64.end method
65
66.method public static getObjectArray()[Ljava/lang/Object;
67.registers 1
68  const/4 v0, 0
69  return-object v0
70.end method
71