Merge branch 'master' of dice:git/vm

This commit is contained in:
Joel Dice 2007-10-31 08:24:52 -06:00
commit fb36d7c605
3 changed files with 19 additions and 0 deletions

View File

@ -19,6 +19,19 @@ public class ByteArrayInputStream extends InputStream {
}
}
public int read(byte[] buffer, int offset, int bufferLength) {
if (position >= length) {
return -1;
}
int remaining = length-position;
if (remaining < bufferLength) {
bufferLength = remaining;
}
System.arraycopy(array, position, buffer, offset, bufferLength);
position += bufferLength;
return bufferLength;
}
public int available() {
return length - position;
}

View File

@ -201,4 +201,8 @@ public class ByteBuffer {
if (position < 0 || position+amount > limit)
throw new IndexOutOfBoundsException();
}
public String toString() {
return "(ByteBuffer with array: " + array + " arrayOffset: " + arrayOffset + " position: " + position + " remaining; " + remaining() + ")";
}
}

View File

@ -326,7 +326,9 @@ ifeq ($(platform),windows)
else
$(cc) $(^) $(lflags) -o $(@)
endif
ifneq ($(platform),darwin)
@$(strip) --strip-all $(@)
endif
@$(show-size) $(@)
$(generator): $(generator-objects)