bugfixes; add NullPointerException.java

This commit is contained in:
Joel Dice 2007-07-23 21:31:28 -06:00
parent 823d764998
commit 527f46d53d
5 changed files with 34 additions and 15 deletions

View File

@ -0,0 +1,19 @@
package java.lang;
public class NullPointerException extends RuntimeException {
public NullPointerException(String message, Throwable cause) {
super(message, cause);
}
public NullPointerException(String message) {
this(message, null);
}
public NullPointerException(Throwable cause) {
this(null, cause);
}
public NullPointerException() {
this(null, null);
}
}

View File

@ -16,7 +16,7 @@ src = src
classpath = classpath classpath = classpath
test = test test = test
input = $(cls)/Reflection.class input = $(cls)/Threads.class
cxx = g++ cxx = g++
cc = gcc cc = gcc

View File

@ -2048,27 +2048,27 @@ resolveClass(Thread* t, object spec)
if (data) { if (data) {
if (Verbose) { if (Verbose) {
fprintf(stderr, "parsing %s\n", &byteArrayBody fprintf(stderr, "parsing %s\n", &byteArrayBody(t, spec, 0));
(t, spec, 0));
} }
// parse class file // parse class file
class_ = parseClass(t, data->start(), data->length()); class_ = parseClass(t, data->start(), data->length());
data->dispose(); data->dispose();
if (Verbose) { if (LIKELY(t->exception == 0)) {
fprintf(stderr, "done parsing %s\n", &byteArrayBody if (Verbose) {
(t, className(t, class_), 0)); fprintf(stderr, "done parsing %s\n", &byteArrayBody(t, spec, 0));
} }
object bootstrapClass = hashMapFind object bootstrapClass = hashMapFind
(t, t->vm->bootstrapClassMap, spec, byteArrayHash, byteArrayEqual); (t, t->vm->bootstrapClassMap, spec, byteArrayHash, byteArrayEqual);
if (bootstrapClass) { if (bootstrapClass) {
PROTECT(t, bootstrapClass); PROTECT(t, bootstrapClass);
updateBootstrapClass(t, bootstrapClass, class_); updateBootstrapClass(t, bootstrapClass, class_);
class_ = bootstrapClass; class_ = bootstrapClass;
}
} }
} }
} }

View File

@ -2132,7 +2132,7 @@ run(Thread* t)
pokeInt(t, t->frame + FrameIpOffset, t->ip); pokeInt(t, t->frame + FrameIpOffset, t->ip);
for (; frame >= 0; frame = frameNext(t, frame)) { for (; frame >= 0; frame = frameNext(t, frame)) {
if (frame <= base) { if (frame < base) {
return 0; return 0;
} }

View File

@ -212,7 +212,7 @@ class MySystem: public System {
} }
virtual void dispose() { virtual void dispose() {
assert(s, context == 0); //assert(s, context == 0);
pthread_mutex_destroy(&mutex); pthread_mutex_destroy(&mutex);
pthread_cond_destroy(&condition); pthread_cond_destroy(&condition);
s->free(this); s->free(this);