# HG changeset patch # User Doug Simon # Date 1440104259 -7200 # Node ID 7eda81bed2f334856ffee33e20a120767fd57f53 # Parent fd3d534aecca97cfba72e787dcb9ae9d943b38a0 added comment explaining why SharedRuntime::register_finalizer performs a dynamic check that an object has a finalizer diff -r fd3d534aecca -r 7eda81bed2f3 src/share/vm/runtime/sharedRuntime.cpp --- a/src/share/vm/runtime/sharedRuntime.cpp Thu Aug 20 21:56:50 2015 +0200 +++ b/src/share/vm/runtime/sharedRuntime.cpp Thu Aug 20 22:57:39 2015 +0200 @@ -1014,6 +1014,11 @@ JRT_ENTRY_NO_ASYNC(void, SharedRuntime::register_finalizer(JavaThread* thread, oopDesc* obj)) #if INCLUDE_JVMCI + // This removes the requirement for JVMCI compilers to emit code + // performing a dynamic check that obj has a finalizer before + // calling this routine. There should be no performance impact + // for C1 since it emits a dynamic check. C2 and the interpreter + // uses other runtime routines for registering finalizers. if (!obj->klass()->has_finalizer()) { return; }