From 7ecb5b9c30b71374783d69bf0745707dfe92066f Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 30 Sep 2007 10:32:17 -0600 Subject: [PATCH] fixes for various recent regressions --- makefile | 19 ++++++++++--------- src/compile.cpp | 4 ++-- src/interpret.cpp | 2 +- src/machine.cpp | 7 ++++++- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/makefile b/makefile index abc0ab8388..ae27d9cacc 100644 --- a/makefile +++ b/makefile @@ -156,24 +156,24 @@ args = $(flags) $(call class-name,$(input)) .PHONY: build build: $(executable) $(classpath-objects) $(test-classes) -$(input): $(classpath-objects) +$(input): $(classpath-classes) .PHONY: run -run: $(executable) $(input) - $(ld-library-path)=$(bld) $(<) $(args) +run: build + $(ld-library-path)=$(bld) $(executable) $(args) .PHONY: debug -debug: $(executable) $(input) - LD_LIBRARY_PATH=$(bld) gdb --args $(<) $(args) +debug: build + LD_LIBRARY_PATH=$(bld) gdb --args $(executable) $(args) .PHONY: vg -vg: $(executable) $(input) - LD_LIBRARY_PATH=$(bld) $(vg) $(<) $(args) +vg: build + LD_LIBRARY_PATH=$(bld) $(vg) $(executable) $(args) .PHONY: test -test: $(executable) $(classpath-objects) $(test-classes) +test: build LD_LIBRARY_PATH=$(bld) /bin/bash $(test)/test.sh 2>/dev/null \ - $(<) $(mode) "$(flags)" $(call class-names,$(test-classes)) + $(executable) $(mode) "$(flags)" $(call class-names,$(test-classes)) .PHONY: clean clean: @@ -198,6 +198,7 @@ define compile-class @mkdir -p $(dir $(@)) $(javac) -bootclasspath $(classpath) -classpath $(classpath) \ -d $(cls) $(<) + @touch $(@) endef $(cls)/%.class: $(classpath)/%.java diff --git a/src/compile.cpp b/src/compile.cpp index f409315641..38188ed856 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -668,10 +668,10 @@ gpRegister(Thread* t, unsigned index) } SSERegister -sseRegister(Thread* t, unsigned index) +sseRegister(Thread* t UNUSED, unsigned index) { assert(t, index < 8); - return static_cast(index); + return static_cast(index); } unsigned diff --git a/src/interpret.cpp b/src/interpret.cpp index 9d2cba0661..41a4858edb 100644 --- a/src/interpret.cpp +++ b/src/interpret.cpp @@ -1524,7 +1524,7 @@ interpret(Thread* t) object a = popObject(t); if (a == b) { - ip = (ip - 3) + offset); + ip = (ip - 3) + offset; } } goto loop; diff --git a/src/machine.cpp b/src/machine.cpp index 57db550f29..f94d5edc32 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -1465,6 +1465,9 @@ Thread::Thread(Machine* m, object javaThread, Thread* parent): enter(t, Thread::ActiveState); + resolveClass + (t, className(t, arrayBody(t, m->types, + Machine::SystemClassLoaderType))); resolveClass (t, className(t, arrayBody(t, m->types, Machine::ClassType))); resolveClass @@ -1482,7 +1485,9 @@ Thread::Thread(Machine* m, object javaThread, Thread* parent): (this, reinterpret_cast(this), 0, 0, 0, 0, m->loader); } - enter(this, Thread::IdleState); + if (parent == 0) { + enter(this, Thread::IdleState); + } } void