/hg/icedtea6: Fix bugs preventing Shark building itself
gbenson at icedtea.classpath.org
gbenson at icedtea.classpath.org
Thu Mar 11 08:35:19 PST 2010
changeset 39180582f106 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=39180582f106
author: Gary Benson <gbenson at redhat.com>
date: Thu Mar 11 16:35:10 2010 -0500
Fix bugs preventing Shark building itself
diffstat:
3 files changed, 29 insertions(+), 7 deletions(-)
ChangeLog | 11 +++++++
ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 4 +-
ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 21 +++++++++++----
diffs (87 lines):
diff -r 121319a7f899 -r 39180582f106 ChangeLog
--- a/ChangeLog Thu Mar 11 12:20:10 2010 +0000
+++ b/ChangeLog Thu Mar 11 16:35:10 2010 -0500
@@ -1,3 +1,14 @@ 2010-03-11 Gary Benson <gbenson at redhat
+2010-03-11 Gary Benson <gbenson at redhat.com>
+
+ * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+ (SharkCompiler::compile_method): Catch typeflow failures more
+ generally.
+ * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
+ (SharkTopLevelBlock::scan_for_traps): New trap.
+ (SharkTopLevelBlock::do_call): Add assertion to check the above.
+ (SharkTopLevelBlock::static_subtype_check): Deal with unloaded
+ object_klass.
+
2010-03-11 Gary Benson <gbenson at redhat.com>
* ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp
diff -r 121319a7f899 -r 39180582f106 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu Mar 11 12:20:10 2010 +0000
+++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp Thu Mar 11 16:35:10 2010 -0500
@@ -137,7 +137,7 @@ void SharkCompiler::compile_method(ciEnv
flow = target->get_flow_analysis();
else
flow = target->get_osr_flow_analysis(entry_bci);
- if (env->failing())
+ if (flow->failing())
return;
if (SharkPrintTypeflowOf != NULL) {
if (!fnmatch(SharkPrintTypeflowOf, name, 0))
@@ -259,7 +259,7 @@ void SharkCompiler::generate_native_code
llvm::SetCurrentDebugType("");
llvm::DebugFlag = false;
}
-#endif
+#endif // !NDEBUG
#else
// NB you need to patch LLVM with http://tinyurl.com/yf3baln for this
std::vector<const char*> args;
diff -r 121319a7f899 -r 39180582f106 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Mar 11 12:20:10 2010 +0000
+++ b/ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp Thu Mar 11 16:35:10 2010 -0500
@@ -87,6 +87,18 @@ void SharkTopLevelBlock::scan_for_traps(
Deoptimization::Reason_uninitialized,
Deoptimization::Action_reinterpret), bci());
return;
+ }
+
+ if (bc() == Bytecodes::_invokevirtual) {
+ klass = ciEnv::get_instance_klass_for_declared_method_holder(
+ iter()->get_declared_method_holder());
+ if (!klass->is_linked()) {
+ set_trap(
+ Deoptimization::make_trap_request(
+ Deoptimization::Reason_uninitialized,
+ Deoptimization::Action_reinterpret), bci());
+ return;
+ }
}
break;
@@ -1099,6 +1111,7 @@ void SharkTopLevelBlock::do_call() {
Value *callee;
if (call_is_virtual) {
if (is_virtual) {
+ assert(klass->is_linked(), "scan_for_traps responsibility");
int vtable_index = call_method->resolve_vtable_index(
target()->holder(), klass);
assert(vtable_index >= 0, "should be");
@@ -1153,14 +1166,12 @@ bool SharkTopLevelBlock::static_subtype_
// (GraphKit::static_subtype_check) it says that static
// interface types cannot be trusted, and if opto can't
// trust them then I assume we can't either.
- if (!object_klass->is_interface()) {
+ if (object_klass->is_loaded() && !object_klass->is_interface()) {
if (object_klass == check_klass)
return true;
- if (object_klass->is_loaded() && check_klass->is_loaded()) {
- if (object_klass->is_subtype_of(check_klass))
- return true;
- }
+ if (check_klass->is_loaded() && object_klass->is_subtype_of(check_klass))
+ return true;
}
return false;
More information about the distro-pkg-dev
mailing list