Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompiler.cpp @ 5530:9da759562a42
Remove compiler member field from HotSpot's implementation of the Ri* interfaces.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 08 Jun 2012 21:48:37 +0200 |
parents | af07e798947d |
children | 82f2bb47c97e |
comparison
equal
deleted
inserted
replaced
5529:d487ae06265d | 5530:9da759562a42 |
---|---|
258 | 258 |
259 instanceKlass::cast(HotSpotTypeResolved::klass())->initialize(CHECK_NULL); | 259 instanceKlass::cast(HotSpotTypeResolved::klass())->initialize(CHECK_NULL); |
260 Handle obj = instanceKlass::cast(HotSpotTypeResolved::klass())->allocate_instance(CHECK_NULL); | 260 Handle obj = instanceKlass::cast(HotSpotTypeResolved::klass())->allocate_instance(CHECK_NULL); |
261 assert(obj() != NULL, "must succeed in allocating instance"); | 261 assert(obj() != NULL, "must succeed in allocating instance"); |
262 | 262 |
263 HotSpotTypeResolved::set_compiler(obj, VMToCompiler::compilerInstance()()); | |
264 | |
265 if (klass->oop_is_instance()) { | 263 if (klass->oop_is_instance()) { |
266 ResourceMark rm; | 264 ResourceMark rm; |
267 instanceKlass* ik = (instanceKlass*)klass()->klass_part(); | 265 instanceKlass* ik = (instanceKlass*)klass()->klass_part(); |
268 Handle full_name = java_lang_String::create_from_str(ik->signature_name(), CHECK_NULL); | 266 Handle full_name = java_lang_String::create_from_str(ik->signature_name(), CHECK_NULL); |
269 HotSpotType::set_name(obj, full_name()); | 267 HotSpotType::set_name(obj, full_name()); |
303 Handle name = VmIds::toString<Handle>(method->name(), CHECK_NULL); | 301 Handle name = VmIds::toString<Handle>(method->name(), CHECK_NULL); |
304 | 302 |
305 instanceKlass::cast(HotSpotMethodResolved::klass())->initialize(CHECK_NULL); | 303 instanceKlass::cast(HotSpotMethodResolved::klass())->initialize(CHECK_NULL); |
306 Handle obj = instanceKlass::cast(HotSpotMethodResolved::klass())->allocate_instance(CHECK_NULL); | 304 Handle obj = instanceKlass::cast(HotSpotMethodResolved::klass())->allocate_instance(CHECK_NULL); |
307 assert(obj() != NULL, "must succeed in allocating instance"); | 305 assert(obj() != NULL, "must succeed in allocating instance"); |
308 | 306 |
309 HotSpotMethodResolved::set_compiler(obj, VMToCompiler::compilerInstance()()); | |
310 // (thomaswue) Cannot use reflection here, because the compiler thread could dead lock with the running application. | 307 // (thomaswue) Cannot use reflection here, because the compiler thread could dead lock with the running application. |
311 // oop reflected = getReflectedMethod(method(), CHECK_NULL); | 308 // oop reflected = getReflectedMethod(method(), CHECK_NULL); |
312 HotSpotMethodResolved::set_javaMirror(obj, method()); | 309 HotSpotMethodResolved::set_javaMirror(obj, method()); |
313 HotSpotMethodResolved::set_name(obj, name()); | 310 HotSpotMethodResolved::set_name(obj, name()); |
314 | 311 |
335 | 332 |
336 instanceKlass::cast(HotSpotMethodData::klass())->initialize(CHECK_NULL); | 333 instanceKlass::cast(HotSpotMethodData::klass())->initialize(CHECK_NULL); |
337 Handle obj = instanceKlass::cast(HotSpotMethodData::klass())->allocate_instance(CHECK_NULL); | 334 Handle obj = instanceKlass::cast(HotSpotMethodData::klass())->allocate_instance(CHECK_NULL); |
338 assert(obj.not_null(), "must succeed in allocating instance"); | 335 assert(obj.not_null(), "must succeed in allocating instance"); |
339 | 336 |
340 HotSpotMethodData::set_compiler(obj, VMToCompiler::compilerInstance()()); | |
341 HotSpotMethodData::set_hotspotMirror(obj, method_data()); | 337 HotSpotMethodData::set_hotspotMirror(obj, method_data()); |
342 HotSpotMethodData::set_normalDataSize(obj, method_data()->data_size()); | 338 HotSpotMethodData::set_normalDataSize(obj, method_data()->data_size()); |
343 HotSpotMethodData::set_extraDataSize(obj, method_data()->extra_data_size()); | 339 HotSpotMethodData::set_extraDataSize(obj, method_data()->extra_data_size()); |
344 | 340 |
345 method_data->set_graal_mirror(obj()); | 341 method_data->set_graal_mirror(obj()); |