src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotCompiledCodeBuilder.java
equal
deleted
inserted
replaced
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 |