Merge branch 'master' of dice:git/vm

This commit is contained in:
Joel Dice 2007-08-22 08:50:34 -06:00
commit 00c611fcf9
6 changed files with 27 additions and 11 deletions

View File

@ -11,6 +11,10 @@ public class Hashtable<K, V> implements Map<K, V> {
this(0);
}
public String toString() {
return map.toString();
}
public synchronized int size() {
return map.size();
}

View File

@ -32,8 +32,8 @@ public class LinkedList<T> implements List<T> {
if (front == null) {
front = rear = c;
} else {
c.prev = rear;
rear = c;
c.next = front;
front = c;
}
}
@ -43,8 +43,8 @@ public class LinkedList<T> implements List<T> {
if (front == null) {
front = rear = c;
} else {
c.next = front;
front = c;
c.prev = rear;
rear = c;
}
}

View File

@ -173,6 +173,14 @@ debug-jscheme: $(executable) $(input)
vg-jscheme: $(executable) $(input)
LD_LIBRARY_PATH=$(bld) $(vg) $(<) -cp $(cls):$(jscheme) $(jscheme-command)
.PHONY: profile-jscheme
profile-jscheme: $(executable) $(input)
opcontrol --start; \
echo '(+ 5 6)' | LD_LIBRARY_PATH=$(bld) \
$(<) -cp $(cls):$(jscheme) jscheme/REPL; \
opcontrol --stop; \
opreport -l $(<)
.PHONY: clean
clean:
@echo "removing build"

View File

@ -16,10 +16,11 @@ replace(char a, char b, char* c)
jstring
Object_toString(Thread* t, jobject this_)
{
unsigned hash = objectHash(t, *this_);
object s = makeString
(t, "%s@%p",
(t, "%s@0x%x",
&byteArrayBody(t, className(t, objectClass(t, *this_)), 0),
*this_);
hash);
return pushReference(t, s);
}

View File

@ -744,7 +744,7 @@ bitsetSet(uintptr_t* p, unsigned i, bool v)
}
}
unsigned
bool
bitsetHasMore(uintptr_t* p)
{
switch (*p) {
@ -770,7 +770,8 @@ bitsetHasMore(uintptr_t* p)
unsigned
bitsetNext(Context* c, uintptr_t* p)
{
assert(c, bitsetHasMore(p));
bool more UNUSED = bitsetHasMore(p);
assert(c, more);
switch (*p) {
case 0: abort(c);

View File

@ -1708,12 +1708,14 @@ isAssignableFrom(Thread* t, object a, object b)
if (classFlags(t, a) & ACC_INTERFACE) {
for (; b; b = classSuper(t, b)) {
object itable = classInterfaceTable(t, b);
if (itable) {
for (unsigned i = 0; i < arrayLength(t, itable); i += 2) {
if (arrayBody(t, itable, i) == a) {
return true;
}
}
}
}
} else if (classArrayDimensions(t, a)) {
if (classArrayDimensions(t, b)) {
return isAssignableFrom