src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm/src/org/graalvm/compiler/asm/Assembler.java
changeset 58299 6df94ce3ab2f
parent 55509 d58442b8abc1
child 58679 9c3209ff7550
equal deleted inserted replaced
58298:0152ad7b38b8 58299:6df94ce3ab2f
   160     public byte[] close(boolean trimmedCopy) {
   160     public byte[] close(boolean trimmedCopy) {
   161         checkAndClearLabelsWithPatches();
   161         checkAndClearLabelsWithPatches();
   162         return codeBuffer.close(trimmedCopy);
   162         return codeBuffer.close(trimmedCopy);
   163     }
   163     }
   164 
   164 
       
   165     public byte[] copy(int start, int end) {
       
   166         return codeBuffer.copyData(start, end);
       
   167     }
       
   168 
   165     private void checkAndClearLabelsWithPatches() throws InternalError {
   169     private void checkAndClearLabelsWithPatches() throws InternalError {
   166         Label label = labelsWithPatches;
   170         Label label = labelsWithPatches;
   167         while (label != null) {
   171         while (label != null) {
   168             if (label.patchPositions != null) {
   172             if (label.patchPositions != null) {
   169                 throw new GraalError("Label used by instructions at following offsets has not been bound: %s", label.patchPositions);
   173                 throw new GraalError("Label used by instructions at following offsets has not been bound: %s", label.patchPositions);