• 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 package com.android.tools.r8.code;
5 
6 import com.android.tools.r8.graph.DexType;
7 import com.android.tools.r8.graph.OffsetToObjectMapping;
8 import com.android.tools.r8.ir.conversion.IRBuilder;
9 
10 public class FilledNewArray extends Format35c {
11 
12   public static final int OPCODE = 0x24;
13   public static final String NAME = "FilledNewArray";
14   public static final String SMALI_NAME = "filled-new-array";
15 
FilledNewArray(int high, BytecodeStream stream, OffsetToObjectMapping mapping)16   FilledNewArray(int high, BytecodeStream stream, OffsetToObjectMapping mapping) {
17     super(high, stream, mapping.getTypeMap());
18   }
19 
FilledNewArray(int size, DexType type, int v0, int v1, int v2, int v3, int v4)20   public FilledNewArray(int size, DexType type, int v0, int v1, int v2, int v3, int v4) {
21     super(size, type, v0, v1, v2, v3, v4);
22   }
23 
getName()24   public String getName() {
25     return NAME;
26   }
27 
getSmaliName()28   public String getSmaliName() {
29     return SMALI_NAME;
30   }
31 
getOpcode()32   public int getOpcode() {
33     return OPCODE;
34   }
35 
getType()36   public DexType getType() {
37     return (DexType) BBBB;
38   }
39 
40   @Override
buildIR(IRBuilder builder)41   public void buildIR(IRBuilder builder) {
42     builder.addInvokeNewArray(getType(), A, new int[]{C, D, E, F, G});
43   }
44 
45   @Override
canThrow()46   public boolean canThrow() {
47     return true;
48   }
49 }
50