Mercurial > hg > graal-compiler
comparison graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/TargetMethodAssembler.java @ 6539:2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Tue, 09 Oct 2012 15:23:38 -0700 |
parents | 4afe23aa0a00 |
children | f5715c5a106a |
comparison
equal
deleted
inserted
replaced
6538:d1ba5ba4f484 | 6539:2463eb24b644 |
---|---|
107 targetMethod.recordExceptionHandler(codeOffset, ei.exceptionEdge.label().position()); | 107 targetMethod.recordExceptionHandler(codeOffset, ei.exceptionEdge.label().position()); |
108 } | 108 } |
109 } | 109 } |
110 | 110 |
111 Debug.metric("TargetMethods").increment(); | 111 Debug.metric("TargetMethods").increment(); |
112 Debug.metric("CodeBytesEmitted").add(targetMethod.targetCodeSize()); | 112 Debug.metric("CodeBytesEmitted").add(targetMethod.getTargetCodeSize()); |
113 Debug.metric("SafepointsEmitted").add(targetMethod.getSafepoints().size()); | 113 Debug.metric("SafepointsEmitted").add(targetMethod.getSafepoints().size()); |
114 Debug.metric("DataPatches").add(targetMethod.getDataReferences().size()); | 114 Debug.metric("DataPatches").add(targetMethod.getDataReferences().size()); |
115 Debug.metric("ExceptionHandlersEmitted").add(targetMethod.getExceptionHandlers().size()); | 115 Debug.metric("ExceptionHandlersEmitted").add(targetMethod.getExceptionHandlers().size()); |
116 Debug.log("Finished target method %s, isStub %b", name, isStub); | 116 Debug.log("Finished target method %s, isStub %b", name, isStub); |
117 return targetMethod; | 117 return targetMethod; |
176 /** | 176 /** |
177 * Returns the integer value of any constants that can be represented by a 32-bit integer value, | 177 * Returns the integer value of any constants that can be represented by a 32-bit integer value, |
178 * including long constants that fit into the 32-bit range. | 178 * including long constants that fit into the 32-bit range. |
179 */ | 179 */ |
180 public int asIntConst(Value value) { | 180 public int asIntConst(Value value) { |
181 assert (value.getKind().stackKind() == Kind.Int || value.getKind() == Kind.Jsr || value.getKind() == Kind.Long) && isConstant(value); | 181 assert (value.getKind().getStackKind() == Kind.Int || value.getKind() == Kind.Jsr || value.getKind() == Kind.Long) && isConstant(value); |
182 long c = ((Constant) value).asLong(); | 182 long c = ((Constant) value).asLong(); |
183 if (!(NumUtil.isInt(c))) { | 183 if (!(NumUtil.isInt(c))) { |
184 throw GraalInternalError.shouldNotReachHere(); | 184 throw GraalInternalError.shouldNotReachHere(); |
185 } | 185 } |
186 return (int) c; | 186 return (int) c; |