# HG changeset patch # User twisti # Date 1397696675 36000 # Node ID 7a9531f50cd88fbcec905baa0294e06c6a24d807 # Parent d74a0522ef1b038b290af313124ed1350907db35 renamed com.oracle.graal.api.code.CompilationResult.frameSize to totalFrameSize diff -r d74a0522ef1b -r 7a9531f50cd8 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationResult.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationResult.java Thu Apr 17 01:57:46 2014 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationResult.java Wed Apr 16 15:04:35 2014 -1000 @@ -460,7 +460,7 @@ private final List exceptionHandlers = new ArrayList<>(); private final List marks = new ArrayList<>(); - private int frameSize = -1; + private int totalFrameSize = -1; private int customStackAreaOffset = -1; private int registerRestoreEpilogueOffset = -1; @@ -525,23 +525,24 @@ } /** - * The frame size of the method in bytes. This includes the return address pushed onto the + * The total frame size of the method in bytes. This includes the return address pushed onto the * stack, if any. * * @return the frame size */ - public int getFrameSize() { - assert frameSize != -1 : "frame size not yet initialized!"; - return frameSize; + public int getTotalFrameSize() { + assert totalFrameSize != -1 : "frame size not yet initialized!"; + return totalFrameSize; } /** - * Sets the frame size in bytes. This includes the return address pushed onto the stack, if any. + * Sets the total frame size in bytes. This includes the return address pushed onto the stack, + * if any. * * @param size the size of the frame in bytes */ - public void setFrameSize(int size) { - frameSize = size; + public void setTotalFrameSize(int size) { + totalFrameSize = size; } /** diff -r d74a0522ef1b -r 7a9531f50cd8 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java Thu Apr 17 01:57:46 2014 +0200 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackend.java Wed Apr 16 15:04:35 2014 -1000 @@ -225,11 +225,7 @@ Assembler masm = createAssembler(frameMap); HotSpotFrameContext frameContext = new HotSpotFrameContext(stub != null, omitFrame); CompilationResultBuilder crb = factory.createBuilder(getCodeCache(), getForeignCalls(), frameMap, masm, frameContext, compilationResult); - /* - * The frame size we get from the frame map does not include the return address but the - * compilation result needs it so add it here. - */ - crb.setFrameSize(frameMap.frameSize() + getTarget().arch.getReturnAddressSize()); + crb.setTotalFrameSize(frameMap.totalFrameSize()); StackSlot deoptimizationRescueSlot = gen.getDeoptimizationRescueSlot(); if (deoptimizationRescueSlot != null && stub == null) { crb.compilationResult.setCustomStackAreaOffset(frameMap.offsetForStackSlot(deoptimizationRescueSlot)); diff -r d74a0522ef1b -r 7a9531f50cd8 graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotBackend.java Thu Apr 17 01:57:46 2014 +0200 +++ b/graal/com.oracle.graal.hotspot.hsail/src/com/oracle/graal/hotspot/hsail/HSAILHotSpotBackend.java Wed Apr 16 15:04:35 2014 -1000 @@ -294,7 +294,7 @@ assert hsailCode.getDataReferences().isEmpty(); // from host code - result.setFrameSize(hostCode.getFrameSize()); + result.setTotalFrameSize(hostCode.getTotalFrameSize()); result.setCustomStackAreaOffset(hostCode.getCustomStackAreaOffset()); result.setRegisterRestoreEpilogueOffset(hostCode.getRegisterRestoreEpilogueOffset()); result.setTargetCode(hostCode.getTargetCode(), hostCode.getTargetCodeSize()); @@ -432,7 +432,7 @@ // save lirGen for later use by setHostGraph CompilationResultBuilder crb = new HSAILCompilationResultBuilder(getCodeCache(), getForeignCalls(), frameMap, masm, frameContext, compilationResult, (HSAILHotSpotLIRGenerationResult) lirGenRes); - crb.setFrameSize(frameMap.frameSize()); + crb.setTotalFrameSize(frameMap.totalFrameSize()); return crb; } diff -r d74a0522ef1b -r 7a9531f50cd8 graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java Thu Apr 17 01:57:46 2014 +0200 +++ b/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotBackend.java Wed Apr 16 15:04:35 2014 -1000 @@ -339,7 +339,7 @@ Assembler masm = createAssembler(frameMap); PTXFrameContext frameContext = new PTXFrameContext(); CompilationResultBuilder crb = factory.createBuilder(getCodeCache(), getForeignCalls(), frameMap, masm, frameContext, compilationResult); - crb.setFrameSize(0); + crb.setTotalFrameSize(0); return crb; } diff -r d74a0522ef1b -r 7a9531f50cd8 graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Thu Apr 17 01:57:46 2014 +0200 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Wed Apr 16 15:04:35 2014 -1000 @@ -174,7 +174,7 @@ // On SPARC we always use stack frames. HotSpotFrameContext frameContext = new HotSpotFrameContext(stub != null); CompilationResultBuilder crb = factory.createBuilder(getProviders().getCodeCache(), getProviders().getForeignCalls(), frameMap, masm, frameContext, compilationResult); - crb.setFrameSize(frameMap.frameSize()); + crb.setTotalFrameSize(frameMap.totalFrameSize()); StackSlot deoptimizationRescueSlot = gen.getDeoptimizationRescueSlot(); if (deoptimizationRescueSlot != null && stub == null) { crb.compilationResult.setCustomStackAreaOffset(frameMap.offsetForStackSlot(deoptimizationRescueSlot)); diff -r d74a0522ef1b -r 7a9531f50cd8 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/CompilationResultBuilder.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/CompilationResultBuilder.java Thu Apr 17 01:57:46 2014 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/CompilationResultBuilder.java Wed Apr 16 15:04:35 2014 -1000 @@ -88,8 +88,8 @@ assert frameContext != null; } - public void setFrameSize(int frameSize) { - compilationResult.setFrameSize(frameSize); + public void setTotalFrameSize(int frameSize) { + compilationResult.setTotalFrameSize(frameSize); } private static final CompilationResult.Mark[] NO_REFS = {}; diff -r d74a0522ef1b -r 7a9531f50cd8 src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Apr 17 01:57:46 2014 +0200 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Wed Apr 16 15:04:35 2014 -1000 @@ -455,7 +455,7 @@ _code = (arrayOop) CompilationResult::targetCode(comp_result); _code_size = CompilationResult::targetCodeSize(comp_result); - _total_frame_size = CompilationResult::frameSize(comp_result); + _total_frame_size = CompilationResult::totalFrameSize(comp_result); _custom_stack_area_offset = CompilationResult::customStackAreaOffset(comp_result); // Pre-calculate the constants section size. This is required for PC-relative addressing. diff -r d74a0522ef1b -r 7a9531f50cd8 src/share/vm/graal/graalJavaAccess.hpp --- a/src/share/vm/graal/graalJavaAccess.hpp Thu Apr 17 01:57:46 2014 +0200 +++ b/src/share/vm/graal/graalJavaAccess.hpp Wed Apr 16 15:04:35 2014 -1000 @@ -116,7 +116,7 @@ long_field(ExternalCompilationResult, entryPoint) \ end_class \ start_class(CompilationResult) \ - int_field(CompilationResult, frameSize) \ + int_field(CompilationResult, totalFrameSize) \ int_field(CompilationResult, customStackAreaOffset) \ oop_field(CompilationResult, targetCode, "[B") \ oop_field(CompilationResult, assumptions, "Lcom/oracle/graal/api/code/Assumptions;") \