Skip to content

Commit

Permalink
General code cleanup
Browse files Browse the repository at this point in the history
- remove unused code
- inline single-caller code
- optimize monitor use in constraint code

Signed-off-by: Graham Chapman <[email protected]>
  • Loading branch information
gacholio committed Oct 20, 2017
1 parent 901746e commit 8271e38
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 606 deletions.
6 changes: 2 additions & 4 deletions runtime/bcverify/clconstraints.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,12 @@ j9bcv_checkClassLoadingConstraintsForSignature (J9VMThread* vmThread, J9ClassLoa
UDATA rc = 0;
J9JavaVM *javaVM = vmThread->javaVM;
JavaVM* jniVM = (JavaVM*)javaVM;
J9ThreadEnv* threadEnv;
(*jniVM)->GetEnv(jniVM, (void**)&threadEnv, J9THREAD_VERSION_1_1);

Trc_RTV_checkClassLoadingConstraintsForSignature_Entry(vmThread, loader1, loader2, sig1, sig2, J9UTF8_LENGTH(sig1), J9UTF8_DATA(sig1));
Assert_RTV_true(J9UTF8_LENGTH(sig1) == J9UTF8_LENGTH(sig2));
Assert_RTV_validateClassLoadingConstraints(vmThread, loader1, loader2, J9UTF8_DATA(sig1), J9UTF8_DATA(sig2), J9UTF8_LENGTH(sig1));

threadEnv->monitor_enter(javaVM->classTableMutex);
omrthread_monitor_enter(javaVM->classTableMutex);
for (;;) {
/* find a 'L', indicating the beginning of a class name */
while (index < length && J9UTF8_DATA(sig1)[index] != 'L') {
Expand All @@ -111,7 +109,7 @@ j9bcv_checkClassLoadingConstraintsForSignature (J9VMThread* vmThread, J9ClassLoa

index = endIndex;
}
threadEnv->monitor_exit(javaVM->classTableMutex);
omrthread_monitor_exit(javaVM->classTableMutex);

Trc_RTV_checkClassLoadingConstraintsForSignature_Exit(vmThread, rc);

Expand Down
64 changes: 0 additions & 64 deletions runtime/jcl/common/jclhookhelp.c

This file was deleted.

1 change: 0 additions & 1 deletion runtime/jcl/uma/se6_vm-side_natives_objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<object name="jcldefine" />
<object name="jclexception" />
<object name="jclglob" />
<object name="jclhookhelp" />
<object name="jclreflect" />
<object name="jclvm" />
<object name="log" />
Expand Down
3 changes: 0 additions & 3 deletions runtime/oti/j9nonbuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4645,9 +4645,6 @@ typedef struct J9InternalVMFunctions {
int ( *shutdownJVMRI)(struct J9JavaVM* vm) ;
IDATA ( *getOwnedObjectMonitors)(struct J9VMThread *currentThread, struct J9VMThread *targetThread, struct J9ObjectMonitorInfo *info, IDATA infoLen) ;
void ( *fixUnsafeMethods)(struct J9VMThread* vmStruct, jclass classRef) ;
j9object_t ( *triggerExceptionCatchEvent)(struct J9VMThread* currentThread, j9object_t exception, UDATA* popProtectedFrame) ;
void ( *triggerMethodEnterEvent)(struct J9VMThread* currentThread, struct J9Method* method, void* arg0EA, UDATA methodType, UDATA tracing) ;
void ( *triggerMethodReturnEvent)(struct J9VMThread* currentThread, struct J9Method* method, UDATA poppedByException, void* returnValuePtr, UDATA methodType, UDATA tracing) ;
#if !defined(J9VM_SIZE_SMALL_CODE)
void ( *fieldIndexTableRemove)(struct J9JavaVM* javaVM, struct J9Class *ramClass) ;
#endif /* J9VM_SIZE_SMALL_CODE */
Expand Down
Loading

0 comments on commit 8271e38

Please sign in to comment.