comparison graal/com.oracle.graal.lir.ptx/src/com/oracle/graal/lir/ptx/PTXControlFlow.java @ 13234:7e237378923d

made the frameContext of a CompilationResultBuilder always non-null and added FrameContext.hasFrame() to determine if a frame is actually generated
author Doug Simon <doug.simon@oracle.com>
date Tue, 03 Dec 2013 18:02:11 +0100
parents 1a66453f73db
children 68b964b6dc8e
comparison
equal deleted inserted replaced
13233:8ea51438445c 13234:7e237378923d
48 this.x = x; 48 this.x = x;
49 } 49 }
50 50
51 @Override 51 @Override
52 public void emitCode(CompilationResultBuilder crb, PTXMacroAssembler masm) { 52 public void emitCode(CompilationResultBuilder crb, PTXMacroAssembler masm) {
53 if (crb.frameContext != null) { 53 crb.frameContext.leave(crb);
54 crb.frameContext.leave(crb);
55 }
56 masm.exit(); 54 masm.exit();
57 } 55 }
58 } 56 }
59 57
60 public static class ReturnNoValOp extends PTXLIRInstruction { 58 public static class ReturnNoValOp extends PTXLIRInstruction {
62 public ReturnNoValOp() { 60 public ReturnNoValOp() {
63 } 61 }
64 62
65 @Override 63 @Override
66 public void emitCode(CompilationResultBuilder crb, PTXMacroAssembler masm) { 64 public void emitCode(CompilationResultBuilder crb, PTXMacroAssembler masm) {
67 if (crb.frameContext != null) { 65 crb.frameContext.leave(crb);
68 crb.frameContext.leave(crb);
69 }
70 masm.ret(); 66 masm.ret();
71 } 67 }
72 } 68 }
73 69
74 public static class BranchOp extends PTXLIRInstruction implements StandardOp.BranchOp { 70 public static class BranchOp extends PTXLIRInstruction implements StandardOp.BranchOp {