1#
2# Copyright (C) 2019 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.class public LNewInstance;
17.super Ljava/lang/Object;
18
19.method public static initRange(Ljava/lang/String;)Ljava/lang/String;
20    .registers 2
21    new-instance v0, Ljava/lang/String;
22    move-object v1, p0
23    invoke-direct/range {v0 .. v1}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
24    return-object v0
25.end method
26
27.method public static initRange([BIII)Ljava/lang/String;
28    .registers 9
29    new-instance v0, Ljava/lang/String;
30    move-object v1, p0
31    move v2, p1
32    move v3, p2
33    move v4, p3
34    invoke-direct/range {v0 .. v4}, Ljava/lang/String;-><init>([BIII)V
35    return-object v0
36.end method
37
38.method public static initRangeWithAlias(Ljava/lang/String;)Ljava/lang/String;
39    .registers 19
40    # Put the object in a register > 0xF, as the arm64 nterp implementation wrongly masked
41    # that register with 0xF when handling String.<init> in an invoke-range.
42    new-instance v16, Ljava/lang/String;
43    move-object/from16 v1, v16
44    move-object/16 v17, p0
45    invoke-direct/range {v16 .. v17}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
46    return-object v1
47.end method
48