comparison graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIR.java @ 13227:1a66453f73db

renamed TargetMethodAssembler to CompilationResultBuilder
author Doug Simon <doug.simon@oracle.com>
date Tue, 03 Dec 2013 10:51:16 +0100
parents b71a1d889db2
children 7e237378923d
comparison
equal deleted inserted replaced
13226:0b4d38339708 13227:1a66453f73db
134 134
135 public void setFirstVariableNumber(int num) { 135 public void setFirstVariableNumber(int num) {
136 firstVariableNumber = num; 136 firstVariableNumber = num;
137 } 137 }
138 138
139 public void emitCode(TargetMethodAssembler tasm) { 139 public void emitCode(CompilationResultBuilder crb) {
140 if (tasm.frameContext != null) { 140 if (crb.frameContext != null) {
141 tasm.frameContext.enter(tasm); 141 crb.frameContext.enter(crb);
142 } 142 }
143 143
144 for (Block b : codeEmittingOrder()) { 144 for (Block b : codeEmittingOrder()) {
145 emitBlock(tasm, b); 145 emitBlock(crb, b);
146 } 146 }
147 } 147 }
148 148
149 private void emitBlock(TargetMethodAssembler tasm, Block block) { 149 private void emitBlock(CompilationResultBuilder crb, Block block) {
150 if (Debug.isDumpEnabled()) { 150 if (Debug.isDumpEnabled()) {
151 tasm.blockComment(String.format("block B%d %s", block.getId(), block.getLoop())); 151 crb.blockComment(String.format("block B%d %s", block.getId(), block.getLoop()));
152 } 152 }
153 153
154 for (LIRInstruction op : lir(block)) { 154 for (LIRInstruction op : lir(block)) {
155 if (Debug.isDumpEnabled()) { 155 if (Debug.isDumpEnabled()) {
156 tasm.blockComment(String.format("%d %s", op.id(), op)); 156 crb.blockComment(String.format("%d %s", op.id(), op));
157 } 157 }
158 158
159 emitOp(tasm, op); 159 emitOp(crb, op);
160 } 160 }
161 } 161 }
162 162
163 private static void emitOp(TargetMethodAssembler tasm, LIRInstruction op) { 163 private static void emitOp(CompilationResultBuilder crb, LIRInstruction op) {
164 try { 164 try {
165 try { 165 try {
166 op.emitCode(tasm); 166 op.emitCode(crb);
167 } catch (AssertionError t) { 167 } catch (AssertionError t) {
168 throw new GraalInternalError(t); 168 throw new GraalInternalError(t);
169 } catch (RuntimeException t) { 169 } catch (RuntimeException t) {
170 throw new GraalInternalError(t); 170 throw new GraalInternalError(t);
171 } 171 }