• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
2# for details. All rights reserved. Use of this source code is governed by a
3# BSD-style license that can be found in the LICENSE file.
4
5.class public LTest;
6
7.super Ljava/lang/Object;
8
9# Filled new array from arguments.
10.method public static test1(III)[I
11  .locals 1
12
13  filled-new-array {p0, p1, p2}, [I
14  move-result-object v0
15  return-object v0
16.end method
17
18# Filled new array from constants.
19.method public static test2()[I
20  .locals 3
21
22  const/4 v0, 4
23  const/4 v1, 5
24  const/4 v2, 6
25  filled-new-array {v0, v1, v2}, [I
26  move-result-object v0
27  return-object v0
28.end method
29
30# Filled new array range from arguments.
31.method public static test3(IIIIII)[I
32  .locals 1
33
34  filled-new-array/range {p0 .. p5}, [I
35  move-result-object v0
36  return-object v0
37.end method
38
39# Filled new array range from constants.
40.method public static test4()[I
41  .locals 6
42
43  const/4 v0, 6
44  const/4 v1, 5
45  const/4 v2, 4
46  const/4 v3, 3
47  const/4 v4, 2
48  const/4 v5, 1
49  filled-new-array/range {v0  .. v5}, [I
50  move-result-object v0
51  return-object v0
52.end method
53
54.method public static main([Ljava/lang/String;)V
55    .locals 7
56
57    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
58
59    const/4 v1, 1
60    const/4 v2, 2
61    const/4 v3, 3
62    invoke-static {v1, v2, v3}, LTest;->test1(III)[I
63    move-result-object v1
64    invoke-static {v1}, Ljava/util/Arrays;->toString([I)Ljava/lang/String;
65    move-result-object v1
66    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->print(Ljava/lang/Object;)V
67
68    invoke-static {}, LTest;->test2()[I
69    move-result-object v1
70    invoke-static {v1}, Ljava/util/Arrays;->toString([I)Ljava/lang/String;
71    move-result-object v1
72    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->print(Ljava/lang/Object;)V
73
74    const/4 v1, 1
75    const/4 v2, 2
76    const/4 v3, 3
77    const/4 v4, 4
78    const/4 v5, 5
79    const/4 v6, 6
80    invoke-static/range {v1 .. v6}, LTest;->test3(IIIIII)[I
81    move-result-object v1
82    invoke-static {v1}, Ljava/util/Arrays;->toString([I)Ljava/lang/String;
83    move-result-object v1
84    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->print(Ljava/lang/Object;)V
85
86    invoke-static {}, LTest;->test4()[I
87    move-result-object v1
88    invoke-static {v1}, Ljava/util/Arrays;->toString([I)Ljava/lang/String;
89    move-result-object v1
90    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->print(Ljava/lang/Object;)V
91
92    return-void
93.end method
94