5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 // The classes vmSymbols and vmSymbolHandles are a name spaces for fast lookup of 26 // symbols commonly used in the VM. The first class return a symbolOop, while the 27 // second class returns a SymbolHandle. The underlying data structure is shared 28 // between the two classes. 29 // 30 // Sample usage: 31 // 32 // symbolOop obj = vmSymbols::java_lang_Object()(); 33 // SymbolHandle handle = vmSymbolHandles::java_lang_Object(); 34 35 36 // Useful sub-macros exported by this header file: 37 38 #define VM_SYMBOL_ENUM_NAME(name) name##_enum 39 #define VM_INTRINSIC_IGNORE(id, class, name, sig, flags) /*ignored*/ 40 #define VM_SYMBOL_IGNORE(id, name) /*ignored*/ 41 #define VM_ALIAS_IGNORE(id, id2) /*ignored*/ 42 43 44 // Mapping function names to values. New entries should be added below. 1095 static void verify_method(ID actual_id, methodOop m) PRODUCT_RETURN; 1096 1097 // Find out the symbols behind an intrinsic: 1098 static vmSymbols::SID class_for(ID id); 1099 static vmSymbols::SID name_for(ID id); 1100 static vmSymbols::SID signature_for(ID id); 1101 static Flags flags_for(ID id); 1102 1103 static const char* short_name_as_C_string(ID id, char* buf, int size); 1104 1105 // Access to intrinsic methods: 1106 static methodOop method_for(ID id); 1107 1108 // Wrapper object methods: 1109 static ID for_boxing(BasicType type); 1110 static ID for_unboxing(BasicType type); 1111 1112 // Raw conversion: 1113 static ID for_raw_conversion(BasicType src, BasicType dest); 1114 }; | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef SHARE_VM_CLASSFILE_VMSYMBOLS_HPP 26 #define SHARE_VM_CLASSFILE_VMSYMBOLS_HPP 27 28 #include "oops/symbolOop.hpp" 29 30 // The classes vmSymbols and vmSymbolHandles are a name spaces for fast lookup of 31 // symbols commonly used in the VM. The first class return a symbolOop, while the 32 // second class returns a SymbolHandle. The underlying data structure is shared 33 // between the two classes. 34 // 35 // Sample usage: 36 // 37 // symbolOop obj = vmSymbols::java_lang_Object()(); 38 // SymbolHandle handle = vmSymbolHandles::java_lang_Object(); 39 40 41 // Useful sub-macros exported by this header file: 42 43 #define VM_SYMBOL_ENUM_NAME(name) name##_enum 44 #define VM_INTRINSIC_IGNORE(id, class, name, sig, flags) /*ignored*/ 45 #define VM_SYMBOL_IGNORE(id, name) /*ignored*/ 46 #define VM_ALIAS_IGNORE(id, id2) /*ignored*/ 47 48 49 // Mapping function names to values. New entries should be added below. 1100 static void verify_method(ID actual_id, methodOop m) PRODUCT_RETURN; 1101 1102 // Find out the symbols behind an intrinsic: 1103 static vmSymbols::SID class_for(ID id); 1104 static vmSymbols::SID name_for(ID id); 1105 static vmSymbols::SID signature_for(ID id); 1106 static Flags flags_for(ID id); 1107 1108 static const char* short_name_as_C_string(ID id, char* buf, int size); 1109 1110 // Access to intrinsic methods: 1111 static methodOop method_for(ID id); 1112 1113 // Wrapper object methods: 1114 static ID for_boxing(BasicType type); 1115 static ID for_unboxing(BasicType type); 1116 1117 // Raw conversion: 1118 static ID for_raw_conversion(BasicType src, BasicType dest); 1119 }; 1120 1121 #endif // SHARE_VM_CLASSFILE_VMSYMBOLS_HPP |