src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java
changeset 48861 47f19ff9903c
parent 47216 71c04702a3d5
child 49451 e06f9607f370
equal deleted inserted replaced
48860:5bce1b7e7800 48861:47f19ff9903c
    96         DataSection data = compResult.getDataSection();
    96         DataSection data = compResult.getDataSection();
    97         byte[] dataSection = new byte[data.getSectionSize()];
    97         byte[] dataSection = new byte[data.getSectionSize()];
    98 
    98 
    99         ByteBuffer buffer = ByteBuffer.wrap(dataSection).order(ByteOrder.nativeOrder());
    99         ByteBuffer buffer = ByteBuffer.wrap(dataSection).order(ByteOrder.nativeOrder());
   100         Builder<DataPatch> patchBuilder = Stream.builder();
   100         Builder<DataPatch> patchBuilder = Stream.builder();
   101         data.buildDataSection(buffer, vmConstant -> {
   101         data.buildDataSection(buffer, (position, vmConstant) -> {
   102             patchBuilder.accept(new DataPatch(buffer.position(), new ConstantReference(vmConstant)));
   102             patchBuilder.accept(new DataPatch(position, new ConstantReference(vmConstant)));
   103         });
   103         });
   104 
   104 
   105         int dataSectionAlignment = data.getSectionAlignment();
   105         int dataSectionAlignment = data.getSectionAlignment();
   106         DataPatch[] dataSectionPatches = patchBuilder.build().toArray(len -> new DataPatch[len]);
   106         DataPatch[] dataSectionPatches = patchBuilder.build().toArray(len -> new DataPatch[len]);
   107 
   107