Mercurial > hg > truffle
comparison src/share/vm/ci/ciEnv.cpp @ 1080:7c57aead6d3e
6892658: C2 should optimize some stringbuilder patterns
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Thu, 12 Nov 2009 09:24:21 -0800 |
parents | 389049f3f393 |
children | 97125851f396 |
comparison
equal
deleted
inserted
replaced
1078:8e7adf982378 | 1080:7c57aead6d3e |
---|---|
44 ciInstanceKlass* ciEnv::_Object; | 44 ciInstanceKlass* ciEnv::_Object; |
45 ciInstanceKlass* ciEnv::_Throwable; | 45 ciInstanceKlass* ciEnv::_Throwable; |
46 ciInstanceKlass* ciEnv::_Thread; | 46 ciInstanceKlass* ciEnv::_Thread; |
47 ciInstanceKlass* ciEnv::_OutOfMemoryError; | 47 ciInstanceKlass* ciEnv::_OutOfMemoryError; |
48 ciInstanceKlass* ciEnv::_String; | 48 ciInstanceKlass* ciEnv::_String; |
49 ciInstanceKlass* ciEnv::_StringBuffer; | |
50 ciInstanceKlass* ciEnv::_StringBuilder; | |
51 ciInstanceKlass* ciEnv::_Integer; | |
49 | 52 |
50 ciSymbol* ciEnv::_unloaded_cisymbol = NULL; | 53 ciSymbol* ciEnv::_unloaded_cisymbol = NULL; |
51 ciInstanceKlass* ciEnv::_unloaded_ciinstance_klass = NULL; | 54 ciInstanceKlass* ciEnv::_unloaded_ciinstance_klass = NULL; |
52 ciObjArrayKlass* ciEnv::_unloaded_ciobjarrayklass = NULL; | 55 ciObjArrayKlass* ciEnv::_unloaded_ciobjarrayklass = NULL; |
53 | 56 |
108 _ArithmeticException_instance = get_object(o)->as_instance(); | 111 _ArithmeticException_instance = get_object(o)->as_instance(); |
109 | 112 |
110 _ArrayIndexOutOfBoundsException_instance = NULL; | 113 _ArrayIndexOutOfBoundsException_instance = NULL; |
111 _ArrayStoreException_instance = NULL; | 114 _ArrayStoreException_instance = NULL; |
112 _ClassCastException_instance = NULL; | 115 _ClassCastException_instance = NULL; |
116 _the_null_string = NULL; | |
117 _the_min_jint_string = NULL; | |
113 } | 118 } |
114 | 119 |
115 ciEnv::ciEnv(Arena* arena) { | 120 ciEnv::ciEnv(Arena* arena) { |
116 ASSERT_IN_VM; | 121 ASSERT_IN_VM; |
117 | 122 |
161 _ArithmeticException_instance = get_object(o)->as_instance(); | 166 _ArithmeticException_instance = get_object(o)->as_instance(); |
162 | 167 |
163 _ArrayIndexOutOfBoundsException_instance = NULL; | 168 _ArrayIndexOutOfBoundsException_instance = NULL; |
164 _ArrayStoreException_instance = NULL; | 169 _ArrayStoreException_instance = NULL; |
165 _ClassCastException_instance = NULL; | 170 _ClassCastException_instance = NULL; |
171 _the_null_string = NULL; | |
172 _the_min_jint_string = NULL; | |
166 } | 173 } |
167 | 174 |
168 ciEnv::~ciEnv() { | 175 ciEnv::~ciEnv() { |
169 CompilerThread* current_thread = CompilerThread::current(); | 176 CompilerThread* current_thread = CompilerThread::current(); |
170 current_thread->set_env(NULL); | 177 current_thread->set_env(NULL); |
244 _ClassCastException_instance | 251 _ClassCastException_instance |
245 = get_or_create_exception(_ClassCastException_handle, | 252 = get_or_create_exception(_ClassCastException_handle, |
246 vmSymbolHandles::java_lang_ClassCastException()); | 253 vmSymbolHandles::java_lang_ClassCastException()); |
247 } | 254 } |
248 return _ClassCastException_instance; | 255 return _ClassCastException_instance; |
256 } | |
257 | |
258 ciInstance* ciEnv::the_null_string() { | |
259 if (_the_null_string == NULL) { | |
260 VM_ENTRY_MARK; | |
261 _the_null_string = get_object(Universe::the_null_string())->as_instance(); | |
262 } | |
263 return _the_null_string; | |
264 } | |
265 | |
266 ciInstance* ciEnv::the_min_jint_string() { | |
267 if (_the_min_jint_string == NULL) { | |
268 VM_ENTRY_MARK; | |
269 _the_min_jint_string = get_object(Universe::the_min_jint_string())->as_instance(); | |
270 } | |
271 return _the_min_jint_string; | |
249 } | 272 } |
250 | 273 |
251 // ------------------------------------------------------------------ | 274 // ------------------------------------------------------------------ |
252 // ciEnv::get_method_from_handle | 275 // ciEnv::get_method_from_handle |
253 ciMethod* ciEnv::get_method_from_handle(jobject method) { | 276 ciMethod* ciEnv::get_method_from_handle(jobject method) { |