Mercurial > hg > truffle
comparison src/share/vm/classfile/javaClasses.hpp @ 2177:3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
Summary: move symbols from permgen into C heap and reference count them
Reviewed-by: never, acorn, jmasa, stefank
author | coleenp |
---|---|
date | Thu, 27 Jan 2011 16:11:27 -0800 |
parents | 017cd8bce8a8 |
children | 8033953d67ff |
comparison
equal
deleted
inserted
replaced
2176:27e4ea99855d | 2177:3582bf76420e |
---|---|
76 static Handle create_from_unicode(jchar* unicode, int len, TRAPS); | 76 static Handle create_from_unicode(jchar* unicode, int len, TRAPS); |
77 static Handle create_tenured_from_unicode(jchar* unicode, int len, TRAPS); | 77 static Handle create_tenured_from_unicode(jchar* unicode, int len, TRAPS); |
78 static oop create_oop_from_unicode(jchar* unicode, int len, TRAPS); | 78 static oop create_oop_from_unicode(jchar* unicode, int len, TRAPS); |
79 static Handle create_from_str(const char* utf8_str, TRAPS); | 79 static Handle create_from_str(const char* utf8_str, TRAPS); |
80 static oop create_oop_from_str(const char* utf8_str, TRAPS); | 80 static oop create_oop_from_str(const char* utf8_str, TRAPS); |
81 static Handle create_from_symbol(symbolHandle symbol, TRAPS); | 81 static Handle create_from_symbol(Symbol* symbol, TRAPS); |
82 static Handle create_from_platform_dependent_str(const char* str, TRAPS); | 82 static Handle create_from_platform_dependent_str(const char* str, TRAPS); |
83 static Handle char_converter(Handle java_string, jchar from_char, jchar to_char, TRAPS); | 83 static Handle char_converter(Handle java_string, jchar from_char, jchar to_char, TRAPS); |
84 | 84 |
85 static int value_offset_in_bytes() { return value_offset; } | 85 static int value_offset_in_bytes() { return value_offset; } |
86 static int count_offset_in_bytes() { return count_offset; } | 86 static int count_offset_in_bytes() { return count_offset; } |
114 // Conversion between '.' and '/' formats | 114 // Conversion between '.' and '/' formats |
115 static Handle externalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '/', '.', THREAD); } | 115 static Handle externalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '/', '.', THREAD); } |
116 static Handle internalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '.', '/', THREAD); } | 116 static Handle internalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '.', '/', THREAD); } |
117 | 117 |
118 // Conversion | 118 // Conversion |
119 static symbolHandle as_symbol(Handle java_string, TRAPS); | 119 static Symbol* as_symbol(Handle java_string, TRAPS); |
120 static symbolOop as_symbol_or_null(oop java_string); | 120 static Symbol* as_symbol_or_null(oop java_string); |
121 | 121 |
122 // Testers | 122 // Testers |
123 static bool is_instance(oop obj) { | 123 static bool is_instance(oop obj) { |
124 return obj != NULL && obj->klass() == SystemDictionary::String_klass(); | 124 return obj != NULL && obj->klass() == SystemDictionary::String_klass(); |
125 } | 125 } |
165 klassOop refk_oop = NULL; | 165 klassOop refk_oop = NULL; |
166 BasicType result = as_BasicType(java_class, &refk_oop); | 166 BasicType result = as_BasicType(java_class, &refk_oop); |
167 (*reference_klass) = KlassHandle(refk_oop); | 167 (*reference_klass) = KlassHandle(refk_oop); |
168 return result; | 168 return result; |
169 } | 169 } |
170 static symbolOop as_signature(oop java_class, bool intern_if_not_found, TRAPS); | 170 static Symbol* as_signature(oop java_class, bool intern_if_not_found, TRAPS); |
171 static void print_signature(oop java_class, outputStream *st); | 171 static void print_signature(oop java_class, outputStream *st); |
172 // Testing | 172 // Testing |
173 static bool is_instance(oop obj) { | 173 static bool is_instance(oop obj) { |
174 return obj != NULL && obj->klass() == SystemDictionary::Class_klass(); | 174 return obj != NULL && obj->klass() == SystemDictionary::Class_klass(); |
175 } | 175 } |
1037 static oop form(oop mt); | 1037 static oop form(oop mt); |
1038 | 1038 |
1039 static oop ptype(oop mt, int index); | 1039 static oop ptype(oop mt, int index); |
1040 static int ptype_count(oop mt); | 1040 static int ptype_count(oop mt); |
1041 | 1041 |
1042 static symbolOop as_signature(oop mt, bool intern_if_not_found, TRAPS); | 1042 static Symbol* as_signature(oop mt, bool intern_if_not_found, TRAPS); |
1043 static void print_signature(oop mt, outputStream* st); | 1043 static void print_signature(oop mt, outputStream* st); |
1044 | 1044 |
1045 static bool is_instance(oop obj) { | 1045 static bool is_instance(oop obj) { |
1046 return obj != NULL && obj->klass() == SystemDictionary::MethodType_klass(); | 1046 return obj != NULL && obj->klass() == SystemDictionary::MethodType_klass(); |
1047 } | 1047 } |