Merge branch 'master' into powerpc

Conflicts:

	makefile
	src/assembler.h
	src/compile.cpp
	src/compiler.cpp
	src/compiler.h
	src/finder.cpp
This commit is contained in:
Joel Dice
2008-11-11 08:20:49 -07:00
parent 2304a656cf
commit c80eb51c17
47 changed files with 1508 additions and 282 deletions

View File

@ -58,6 +58,21 @@ public class Random {
return next(32);
}
public void nextBytes(byte[] bytes) {
final int length = bytes.length;
for (int i = 0; i < length;) {
int r = nextInt();
for (int j = Math.min(length - i, 4); j > 0; --j) {
bytes[i++] = (byte) r;
r >>= 8;
}
}
}
public long nextLong() {
return ((long) next(32) << 32) + next(32);
}
public double nextDouble() {
return (((long) next(26) << 27) + next(27)) / (double) (1L << 53);
}