Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup related to exception related helpers #2359

Merged
merged 1 commit into from
Jul 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions runtime/compiler/runtime/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,9 +1063,6 @@ void initializeCodeRuntimeHelperTable(J9JITConfig *jitConfig, char isSMP)
#endif
SET(TR_throwCurrentException, (void *)jitThrowCurrentException, TR_Helper);

SET(TR_IncompatibleClassChangeError,(void *)jitThrowIncompatibleClassChangeError, TR_Helper);
SET(TR_AbstractMethodError, (void *)jitThrowAbstractMethodError, TR_Helper);
SET(TR_IllegalAccessError, (void *)jitThrowIllegalAccessError, TR_Helper);
SET(TR_newInstanceImplAccessCheck, (void *)jitNewInstanceImplAccessCheck, TR_Helper);

#ifdef J9VM_OPT_JAVA_CRYPTO_ACCELERATION
Expand Down Expand Up @@ -1161,7 +1158,6 @@ void initializeCodeRuntimeHelperTable(J9JITConfig *jitConfig, char isSMP)
SET(TR_AMD64icallVMprJavaSendVirtualF, (void *)icallVMprJavaSendVirtualF, TR_Helper);
SET(TR_AMD64icallVMprJavaSendVirtualD, (void *)icallVMprJavaSendVirtualD, TR_Helper);

SET(TR_AMD64jitThrowCurrentException, (void *)jitThrowCurrentException, TR_Helper);
SET(TR_AMD64jitCollapseJNIReferenceFrame, (void *)jitCollapseJNIReferenceFrame, TR_Helper);

SET(TR_AMD64compressString, (void *)_compressString, TR_Helper);
Expand Down Expand Up @@ -1231,7 +1227,6 @@ void initializeCodeRuntimeHelperTable(J9JITConfig *jitConfig, char isSMP)
SET(TR_X86interpreterAddressStaticGlue, (void *)interpreterEAXStaticGlue, TR_Helper);
SET(TR_X86interpreterSyncAddressStaticGlue, (void *)interpreterSyncEAXStaticGlue, TR_Helper);

SET(TR_IA32jitThrowCurrentException, (void *)jitThrowCurrentException, TR_Helper);
SET(TR_IA32jitCollapseJNIReferenceFrame, (void *)jitCollapseJNIReferenceFrame, TR_Helper);

SET(TR_IA32floatRemainder, (void *)_X87floatRemainder, TR_Helper);
Expand Down
3 changes: 0 additions & 3 deletions runtime/compiler/runtime/asmprotos.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,13 @@ JIT_HELPER(jitRetranslateCaller); // asm calling-convention helper
JIT_HELPER(jitRetranslateCallerWithPreparation); // asm calling-convention helper
JIT_HELPER(jitRetranslateMethod); // asm calling-convention helper
JIT_HELPER(jitStackOverflow); // asm calling-convention helper
JIT_HELPER(jitThrowAbstractMethodError); // asm calling-convention helper
JIT_HELPER(jitThrowArithmeticException); // asm calling-convention helper
JIT_HELPER(jitThrowArrayIndexOutOfBounds); // asm calling-convention helper
JIT_HELPER(jitThrowArrayStoreException); // asm calling-convention helper
JIT_HELPER(jitThrowArrayStoreExceptionWithIP); // asm calling-convention helper
JIT_HELPER(jitThrowCurrentException); // asm calling-convention helper
JIT_HELPER(jitThrowException); // asm calling-convention helper
JIT_HELPER(jitThrowExceptionInInitializerError); // asm calling-convention helper
JIT_HELPER(jitThrowIllegalAccessError); // asm calling-convention helper
JIT_HELPER(jitThrowIncompatibleClassChangeError); // asm calling-convention helper
JIT_HELPER(jitThrowInstantiationException); // asm calling-convention helper
JIT_HELPER(jitThrowNullPointerException); // asm calling-convention helper
JIT_HELPER(jitThrowWrongMethodTypeException); // asm calling-convention helper
Expand Down
8 changes: 1 addition & 7 deletions runtime/compiler/x/amd64/codegen/AMD64JNILinkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1282,23 +1282,17 @@ void TR::AMD64JNILinkage::checkForJNIExceptions(TR::Node *callNode)

TR::Instruction *instr = generateLabelInstruction(JNE4, callNode, snippetLabel, cg());

TR_RuntimeHelper helper;
uint32_t gcMap = _systemLinkage->getProperties().getPreservedRegisterMapForGC();
if (TR::Compiler->target.is32Bit())
{
gcMap |= (_JNIDispatchInfo.argSize<<14);
helper = TR_IA32jitThrowCurrentException;
}
else
{
helper = TR_AMD64jitThrowCurrentException;
}

instr->setNeedsGCMap(gcMap);

TR::Snippet *snippet =
new (trHeapMemory()) TR::X86CheckFailureSnippet(cg(),
cg()->symRefTab()->findOrCreateRuntimeHelper(helper, false, false, false),
cg()->symRefTab()->findOrCreateRuntimeHelper(TR_throwCurrentException, false, false, false),
snippetLabel,
instr,
_JNIDispatchInfo.requiresFPstackPop);
Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/x/i386/codegen/IA32JNILinkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ TR::Register *TR::IA32JNILinkage::buildJNIDispatch(TR::Node *callNode)

TR::Snippet *snippet = new (trHeapMemory()) TR::X86CheckFailureSnippet(
cg(),
cg()->symRefTab()->findOrCreateRuntimeHelper(TR_IA32jitThrowCurrentException, false, false, false),
cg()->symRefTab()->findOrCreateRuntimeHelper(TR_throwCurrentException, false, false, false),
snippetLabel,
instr,
requiresFPstackPop
Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/x/i386/codegen/IA32PrivateLinkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ TR::Register *TR::IA32PrivateLinkage::buildJNIDispatch(TR::Node *callNode)

TR::Snippet *snippet = new (trHeapMemory()) TR::X86CheckFailureSnippet(
cg(),
cg()->symRefTab()->findOrCreateRuntimeHelper(TR_IA32jitThrowCurrentException, false, false, false),
cg()->symRefTab()->findOrCreateRuntimeHelper(TR_throwCurrentException, false, false, false),
snippetLabel,
instr,
requiresFPstackPop
Expand Down