comparison src/share/vm/ci/ciSymbol.hpp @ 1507:cd5dbf694d45

6939134: JSR 292 adjustments to method handle invocation Summary: split MethodHandle.invoke into invokeExact and invokeGeneric; also clean up JVM-to-Java interfaces Reviewed-by: twisti
author jrose
date Sat, 01 May 2010 02:42:18 -0700
parents dd57230ba8fe
children c18cbe5936b8
comparison
equal deleted inserted replaced
1506:2338d41fbd81 1507:cd5dbf694d45
34 friend class ciSignature; 34 friend class ciSignature;
35 friend class ciMethod; 35 friend class ciMethod;
36 friend class ciObjArrayKlass; 36 friend class ciObjArrayKlass;
37 37
38 private: 38 private:
39 ciSymbol(symbolOop s) : ciObject(s) {} 39 const vmSymbols::SID _sid;
40 ciSymbol(symbolHandle s); // for use with vmSymbolHandles 40 DEBUG_ONLY( bool sid_ok() { return vmSymbols::find_sid(get_symbolOop()) == _sid; } )
41
42 ciSymbol(symbolOop s); // normal case, for symbols not mentioned in vmSymbols
43 ciSymbol(symbolHandle s, vmSymbols::SID sid); // for use with vmSymbolHandles
41 44
42 symbolOop get_symbolOop() const { return (symbolOop)get_oop(); } 45 symbolOop get_symbolOop() const { return (symbolOop)get_oop(); }
43 46
44 const char* type_string() { return "ciSymbol"; } 47 const char* type_string() { return "ciSymbol"; }
45 48
50 53
51 // Make a ciSymbol from a C string (implementation). 54 // Make a ciSymbol from a C string (implementation).
52 static ciSymbol* make_impl(const char* s); 55 static ciSymbol* make_impl(const char* s);
53 56
54 public: 57 public:
58 // The enumeration ID from vmSymbols, or vmSymbols::NO_SID if none.
59 vmSymbols::SID sid() const { return _sid; }
60
55 // The text of the symbol as a null-terminated utf8 string. 61 // The text of the symbol as a null-terminated utf8 string.
56 const char* as_utf8(); 62 const char* as_utf8();
57 int utf8_length(); 63 int utf8_length();
58 64
59 // Return the i-th utf8 byte, where i < utf8_length 65 // Return the i-th utf8 byte, where i < utf8_length