Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1x/c1x_VMEntries.cpp @ 2061:c0b1d6a44a02
Implemented fast inline array allocation.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Sat, 22 Jan 2011 14:37:43 +0100 |
parents | 40bcc41390e4 |
children | 9569fdf936ff |
comparison
equal
deleted
inserted
replaced
2060:40bcc41390e4 | 2061:c0b1d6a44a02 |
---|---|
132 // class D extends B { } | 132 // class D extends B { } |
133 // Would lead to identify C.foo() as the unique concrete method for I.foo() without seeing A.foo(). | 133 // Would lead to identify C.foo() as the unique concrete method for I.foo() without seeing A.foo(). |
134 return false; | 134 return false; |
135 } | 135 } |
136 klassOop klass = (klassOop)cimethod->holder()->get_oop(); | 136 klassOop klass = (klassOop)cimethod->holder()->get_oop(); |
137 methodOop method = (methodOop)cimethod->get_oop(); | 137 methodHandle method((methodOop)cimethod->get_oop()); |
138 methodOop unique_concrete = NULL; | 138 methodHandle unique_concrete; |
139 { | 139 { |
140 ResourceMark rm; | |
140 MutexLocker locker(Compile_lock); | 141 MutexLocker locker(Compile_lock); |
141 unique_concrete = Dependencies::find_unique_concrete_method(klass, method); | 142 unique_concrete = methodHandle(Dependencies::find_unique_concrete_method(klass, method())); |
142 } | 143 } |
143 if (unique_concrete == NULL) { | 144 if (unique_concrete.is_null()) { |
144 return NULL; | 145 return NULL; |
145 } | 146 } |
146 | 147 |
147 Handle name = VmIds::toString<Handle>(unique_concrete->name(), CHECK_NULL); | 148 Handle name = VmIds::toString<Handle>(unique_concrete->name(), CHECK_NULL); |
148 oop method_resolved = VMExits::createRiMethodResolved(VmIds::add<methodOop>(unique_concrete), name, CHECK_NULL); | 149 oop method_resolved = VMExits::createRiMethodResolved(VmIds::add<methodOop>(unique_concrete()), name, CHECK_NULL); |
149 return JNIHandles::make_local(THREAD, method_resolved); | 150 return JNIHandles::make_local(THREAD, method_resolved); |
150 } | 151 } |
151 | 152 |
152 // public RiType RiSignature_lookupType(String returnType, HotSpotTypeResolved accessingClass); | 153 // public RiType RiSignature_lookupType(String returnType, HotSpotTypeResolved accessingClass); |
153 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1lookupType(JNIEnv *env, jobject, jstring jname, jobject accessingClass) { | 154 JNIEXPORT jobject JNICALL Java_com_sun_hotspot_c1x_VMEntries_RiSignature_1lookupType(JNIEnv *env, jobject, jstring jname, jobject accessingClass) { |
506 #else | 507 #else |
507 set_boolean(env, config, "windowsOs", false); | 508 set_boolean(env, config, "windowsOs", false); |
508 #endif | 509 #endif |
509 set_boolean(env, config, "verifyPointers", VerifyOops); | 510 set_boolean(env, config, "verifyPointers", VerifyOops); |
510 set_boolean(env, config, "useFastLocking", UseFastLocking); | 511 set_boolean(env, config, "useFastLocking", UseFastLocking); |
512 set_boolean(env, config, "useFastNewObjectArray", UseFastNewObjectArray); | |
513 set_boolean(env, config, "useFastNewTypeArray", UseFastNewTypeArray); | |
511 set_int(env, config, "codeEntryAlignment", CodeEntryAlignment); | 514 set_int(env, config, "codeEntryAlignment", CodeEntryAlignment); |
512 set_int(env, config, "vmPageSize", os::vm_page_size()); | 515 set_int(env, config, "vmPageSize", os::vm_page_size()); |
513 set_int(env, config, "stackShadowPages", StackShadowPages); | 516 set_int(env, config, "stackShadowPages", StackShadowPages); |
514 set_int(env, config, "hubOffset", oopDesc::klass_offset_in_bytes()); | 517 set_int(env, config, "hubOffset", oopDesc::klass_offset_in_bytes()); |
515 set_int(env, config, "arrayLengthOffset", arrayOopDesc::length_offset_in_bytes()); | 518 set_int(env, config, "arrayLengthOffset", arrayOopDesc::length_offset_in_bytes()); |
595 CodeInstaller installer(JNIHandles::resolve(targetMethod), id); | 598 CodeInstaller installer(JNIHandles::resolve(targetMethod), id); |
596 return id; | 599 return id; |
597 } | 600 } |
598 | 601 |
599 // public void recordBailout(String reason); | 602 // public void recordBailout(String reason); |
600 JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_recordBailout(JNIEnv *jniEnv, jobject) { | 603 JNIEXPORT void JNICALL Java_com_sun_hotspot_c1x_VMEntries_recordBailout(JNIEnv *jniEnv, jobject message) { |
601 if (C1XBailoutIsFatal) fatal("Bailout in C1X"); | 604 if (C1XBailoutIsFatal) { |
605 Handle msg = JNIHandles::resolve(message); | |
606 if (msg.is_null()) { | |
607 java_lang_String::print(msg, tty); | |
608 } | |
609 fatal("Bailout in C1X"); | |
610 } | |
602 } | 611 } |
603 | 612 |
604 | 613 |
605 | 614 |
606 | 615 |