mirror of
https://github.com/corda/corda.git
synced 2025-01-16 01:40:17 +00:00
Merge branch 'master' of dice:git/vm
This commit is contained in:
commit
00c611fcf9
@ -11,6 +11,10 @@ public class Hashtable<K, V> implements Map<K, V> {
|
|||||||
this(0);
|
this(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return map.toString();
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized int size() {
|
public synchronized int size() {
|
||||||
return map.size();
|
return map.size();
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@ public class LinkedList<T> implements List<T> {
|
|||||||
if (front == null) {
|
if (front == null) {
|
||||||
front = rear = c;
|
front = rear = c;
|
||||||
} else {
|
} else {
|
||||||
c.prev = rear;
|
c.next = front;
|
||||||
rear = c;
|
front = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,8 +43,8 @@ public class LinkedList<T> implements List<T> {
|
|||||||
if (front == null) {
|
if (front == null) {
|
||||||
front = rear = c;
|
front = rear = c;
|
||||||
} else {
|
} else {
|
||||||
c.next = front;
|
c.prev = rear;
|
||||||
front = c;
|
rear = c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
makefile
8
makefile
@ -173,6 +173,14 @@ debug-jscheme: $(executable) $(input)
|
|||||||
vg-jscheme: $(executable) $(input)
|
vg-jscheme: $(executable) $(input)
|
||||||
LD_LIBRARY_PATH=$(bld) $(vg) $(<) -cp $(cls):$(jscheme) $(jscheme-command)
|
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
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@echo "removing build"
|
@echo "removing build"
|
||||||
|
@ -16,10 +16,11 @@ replace(char a, char b, char* c)
|
|||||||
jstring
|
jstring
|
||||||
Object_toString(Thread* t, jobject this_)
|
Object_toString(Thread* t, jobject this_)
|
||||||
{
|
{
|
||||||
|
unsigned hash = objectHash(t, *this_);
|
||||||
object s = makeString
|
object s = makeString
|
||||||
(t, "%s@%p",
|
(t, "%s@0x%x",
|
||||||
&byteArrayBody(t, className(t, objectClass(t, *this_)), 0),
|
&byteArrayBody(t, className(t, objectClass(t, *this_)), 0),
|
||||||
*this_);
|
hash);
|
||||||
|
|
||||||
return pushReference(t, s);
|
return pushReference(t, s);
|
||||||
}
|
}
|
||||||
|
@ -744,7 +744,7 @@ bitsetSet(uintptr_t* p, unsigned i, bool v)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
bool
|
||||||
bitsetHasMore(uintptr_t* p)
|
bitsetHasMore(uintptr_t* p)
|
||||||
{
|
{
|
||||||
switch (*p) {
|
switch (*p) {
|
||||||
@ -770,7 +770,8 @@ bitsetHasMore(uintptr_t* p)
|
|||||||
unsigned
|
unsigned
|
||||||
bitsetNext(Context* c, uintptr_t* p)
|
bitsetNext(Context* c, uintptr_t* p)
|
||||||
{
|
{
|
||||||
assert(c, bitsetHasMore(p));
|
bool more UNUSED = bitsetHasMore(p);
|
||||||
|
assert(c, more);
|
||||||
|
|
||||||
switch (*p) {
|
switch (*p) {
|
||||||
case 0: abort(c);
|
case 0: abort(c);
|
||||||
|
@ -1708,9 +1708,11 @@ isAssignableFrom(Thread* t, object a, object b)
|
|||||||
if (classFlags(t, a) & ACC_INTERFACE) {
|
if (classFlags(t, a) & ACC_INTERFACE) {
|
||||||
for (; b; b = classSuper(t, b)) {
|
for (; b; b = classSuper(t, b)) {
|
||||||
object itable = classInterfaceTable(t, b);
|
object itable = classInterfaceTable(t, b);
|
||||||
for (unsigned i = 0; i < arrayLength(t, itable); i += 2) {
|
if (itable) {
|
||||||
if (arrayBody(t, itable, i) == a) {
|
for (unsigned i = 0; i < arrayLength(t, itable); i += 2) {
|
||||||
return true;
|
if (arrayBody(t, itable, i) == a) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user