xref: /aosp_15_r20/art/test/816-illegal-new-array/smali/TestCase.smali (revision 795d594fd825385562da6b089ea9b2033f3abf5a)
1# Copyright (C) 2021 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15.class  public LTestCase;
16.super  Ljava/lang/Object;
17
18
19.method public constructor <init>()V
20.registers 1
21    invoke-direct {v0}, Ljava/lang/Object;-><init>()V
22    return-void
23.end method
24
25.method public static filledNewArray()[Ljava/lang/Object;
26.registers 1
27    const v0, 0
28    filled-new-array {v0}, [Lp/Foo;
29    move-result-object v0
30    return-object v0
31.end method
32
33.method public static filledNewArrayRange()[Ljava/lang/Object;
34.registers 2
35    const v0, 0
36    const v1, 0
37    filled-new-array/range {v0..v1}, [Lp/Foo;
38    move-result-object v0
39    return-object v0
40.end method
41
42.method public static newArray()V
43.registers 1
44    const v0, 0
45    new-array v0, v0, [Lp/Foo;
46    return-void
47.end method
48