From 4566e7a7dd2584ac7cdaf2651f9f01e9b836e18f Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 3 Nov 2009 14:14:27 -0700 Subject: [PATCH 1/3] avoid infinite loop in deadWord --- src/compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index f6dc25e27a..88402a5e77 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -1008,7 +1008,7 @@ deadWord(Context* c, Value* v) Value* nextWord = v->nextWord; assert(c, nextWord != v); - for (SiteIterator it(c, v); it.hasMore();) { + for (SiteIterator it(c, v, true, false); it.hasMore();) { Site* s = it.next(); if (s->registerSize(c) > BytesPerWord) { From 82d2be8e718d141f70a56d3686de9b9dabf9ead3 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 3 Nov 2009 14:52:14 -0700 Subject: [PATCH 2/3] implement JavaVM::AttachCurrentThreadAsDaemon --- src/jnienv.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/jnienv.cpp b/src/jnienv.cpp index 6a31950abd..391938180a 100644 --- a/src/jnienv.cpp +++ b/src/jnienv.cpp @@ -41,6 +41,19 @@ AttachCurrentThread(Machine* m, Thread** t, void*) return 0; } +jint JNICALL +AttachCurrentThreadAsDaemon(Machine* m, Thread** t, void* parameters) +{ + *t = static_cast(m->localThread->get()); + if (*t == 0) { + AttachCurrentThread(m, t, parameters); + + ENTER(*t, Thread::ActiveState); + setDaemon(*t, (*t)->javaThread, true); + } + return 0; +} + jint JNICALL DetachCurrentThread(Machine* m) { @@ -1902,6 +1915,7 @@ populateJNITables(JavaVMVTable* vmTable, JNIEnvVTable* envTable) vmTable->DestroyJavaVM = DestroyJavaVM; vmTable->AttachCurrentThread = AttachCurrentThread; + vmTable->AttachCurrentThreadAsDaemon = AttachCurrentThreadAsDaemon; vmTable->DetachCurrentThread = DetachCurrentThread; vmTable->GetEnv = GetEnv; From d56713dc131e87259720f11d24e9c227c1bac241 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 3 Nov 2009 15:10:30 -0700 Subject: [PATCH 3/3] refer to ProGuard 4.4 instead of 4.3 in readme.txt --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 648d2b5e45..f71da55019 100644 --- a/readme.txt +++ b/readme.txt @@ -376,7 +376,7 @@ EOF Step 5: Run ProGuard with stage1 as input and stage2 as output. - $ java -jar ../../proguard4.3/lib/proguard.jar \ + $ java -jar ../../proguard4.4/lib/proguard.jar \ -injars stage1 -outjars stage2 @../vm.pro @hello.pro (note: pass -dontusemixedcaseclassnames to ProGuard when building on