Makes the primary Jit table growable. Also includes a change suggested earlier by Dan to use a pre-defined mask in the hash function. Reduce the default JitTable size from 2048 entries to 512 entries.
Update per Ben's comments.
diff --git a/vm/compiler/Compiler.c b/vm/compiler/Compiler.c
index 98a4e1d..0b5c211 100644
--- a/vm/compiler/Compiler.c
+++ b/vm/compiler/Compiler.c
@@ -123,6 +123,11 @@
dvmUnlockMutex(&gDvmJit.compilerLock);
/* Check whether there is a suspend request on me */
dvmCheckSuspendPending(NULL);
+ /* Is JitTable filling up? */
+ if (gDvmJit.jitTableEntriesUsed >
+ (gDvmJit.jitTableSize - gDvmJit.jitTableSize/4)) {
+ dvmJitResizeJitTable(gDvmJit.jitTableSize * 2);
+ }
if (gDvmJit.haltCompilerThread) {
LOGD("Compiler shutdown in progress - discarding request");
} else {