1/* 2 * Copyright (C) 2010 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 17package dalvik.bytecode; 18 19/** 20 * Information about Dalvik opcodes. 21 */ 22public final class OpcodeInfo { 23 /** 24 * The maximum possible value of a Dalvik opcode. 25 * 26 * <p><b>Note:</b>: This is constant in any given VM incarnation, 27 * but it is subject to change over time, so it is not appropriate 28 * to represent as a compile-time constant value.</p> 29 */ 30 public static final int MAXIMUM_VALUE; 31 32 /** 33 * The maximum possible "packed value" of a Dalvik opcode. The 34 * packed value of an opcode is a denser representation that is 35 * only used when reporting usage statistics. The mapping between 36 * packed opcode values and regular opcode values is 37 * implementation-specific and may vary over time. 38 * 39 * <p><b>Note:</b>: This is constant in any given VM incarnation, 40 * but it is subject to change over time, so it is not appropriate 41 * to represent as a compile-time constant value.</p> 42 */ 43 public static final int MAXIMUM_PACKED_VALUE; 44 45 static { 46 /* 47 * See note on the definition of MAXIMUM_VALUE, above, for 48 * why it's not assigned directly on the declaration line. 49 * 50 * IMPORTANT NOTE: This assignment is generated automatically 51 * by the opcode-gen tool. Any edits will get wiped out the 52 * next time the tool is run. 53 */ 54 // BEGIN(libcore-maximum-values); GENERATED AUTOMATICALLY BY opcode-gen 55 MAXIMUM_VALUE = 65535; 56 MAXIMUM_PACKED_VALUE = 255; 57 // END(libcore-maximum-values) 58 } 59 60 /** 61 * Backwards compatibility stub for obsolete interpreter functionality. 62 * @hide 63 */ 64 public static boolean isInvoke(int packedOpcode) { 65 return false; 66 } 67 68 /** 69 * This class is not instantiable. 70 */ 71 private OpcodeInfo() { 72 // This space intentionally left blank. 73 } 74} 75