Skip to content

Commit

Permalink
White space check style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Rogers committed Apr 20, 2009
1 parent f90ba62 commit c71eae1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
26 changes: 13 additions & 13 deletions rvm/src/org/jikesrvm/jni/ia32/JNICompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -433,17 +433,17 @@ public static synchronized CompiledMethod compile(NativeMethod method) {
if (!VM.BuildForWindows) {
// TODO: optimize stack adjustment
if (VM.BuildFor32Addr) {
// throw away args, class/this ptr and env
int argsToThrowAway = method.getParameterWords()+2-argsPassedInRegister;
if (argsToThrowAway != 0) {
asm.emitADD_Reg_Imm(SP, argsToThrowAway << LG_WORDSIZE);
}
// throw away args, class/this ptr and env
int argsToThrowAway = method.getParameterWords()+2-argsPassedInRegister;
if (argsToThrowAway != 0) {
asm.emitADD_Reg_Imm(SP, argsToThrowAway << LG_WORDSIZE);
}
} else {
// throw away args, class/this ptr and env
int argsToThrowAway = args.length+2-argsPassedInRegister;
if (argsToThrowAway != 0) {
asm.emitADD_Reg_Imm_Quad(SP, argsToThrowAway << LG_WORDSIZE);
}
// throw away args, class/this ptr and env
int argsToThrowAway = args.length+2-argsPassedInRegister;
if (argsToThrowAway != 0) {
asm.emitADD_Reg_Imm_Quad(SP, argsToThrowAway << LG_WORDSIZE);
}
}
}

Expand Down Expand Up @@ -961,9 +961,9 @@ public static void generateEpilogForJNIMethod(Assembler asm, RVMMethod method) {
bytesToRelease = method.getParameterTypes().length * WORDSIZE;
// TODO: take care of Win64 conventions
for (TypeReference arg : method.getParameterTypes()) {
if (arg.isLongType() || arg.isDoubleType()) {
bytesToRelease += WORDSIZE;
}
if (arg.isLongType() || arg.isDoubleType()) {
bytesToRelease += WORDSIZE;
}
}
}
if (bytesToRelease == 0) {
Expand Down
24 changes: 12 additions & 12 deletions rvm/src/org/jikesrvm/runtime/DynamicLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,18 @@ public static synchronized int load(String libname) {
byte[] asciiName = StringUtilities.stringToBytesNullTerminated(libname);

if (!VM.AutomaticStackGrowth) {
// make sure we have enough stack to load the library.
// This operation has been known to require more than 20K of stack.
RVMThread myThread = RVMThread.getCurrentThread();
Offset remaining = Magic.getFramePointer().diff(myThread.stackLimit);
int stackNeededInBytes = StackframeLayoutConstants.STACK_SIZE_DLOPEN - remaining.toInt();
if (stackNeededInBytes > 0) {
if (myThread.hasNativeStackFrame()) {
throw new java.lang.StackOverflowError("Not enough space to open shared library");
} else {
RVMThread.resizeCurrentStack(myThread.getStackLength() + stackNeededInBytes, null);
}
}
// make sure we have enough stack to load the library.
// This operation has been known to require more than 20K of stack.
RVMThread myThread = RVMThread.getCurrentThread();
Offset remaining = Magic.getFramePointer().diff(myThread.stackLimit);
int stackNeededInBytes = StackframeLayoutConstants.STACK_SIZE_DLOPEN - remaining.toInt();
if (stackNeededInBytes > 0) {
if (myThread.hasNativeStackFrame()) {
throw new java.lang.StackOverflowError("Not enough space to open shared library");
} else {
RVMThread.resizeCurrentStack(myThread.getStackLength() + stackNeededInBytes, null);
}
}
}

Address libHandler = SysCall.sysCall.sysDlopen(asciiName);
Expand Down

0 comments on commit c71eae1

Please sign in to comment.