Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java @ 22738:eb6d572dfa61
Finalize data section outside of HotSpotCompiledCode
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Wed, 25 Nov 2015 16:28:10 +0100 |
parents | 1bbd4a7c274b |
children | f41ed1d87d68 |
comparison
equal
deleted
inserted
replaced
22737:a93a36e7b419 | 22738:eb6d572dfa61 |
---|---|
115 | 115 |
116 targetCode = compResult.getTargetCode(); | 116 targetCode = compResult.getTargetCode(); |
117 targetCodeSize = compResult.getTargetCodeSize(); | 117 targetCodeSize = compResult.getTargetCodeSize(); |
118 | 118 |
119 DataSection data = compResult.getDataSection(); | 119 DataSection data = compResult.getDataSection(); |
120 data.finalizeLayout(); | 120 assert data.isFinalized() : "data section needs to be finalized before code installation"; |
121 dataSection = new byte[data.getSectionSize()]; | 121 dataSection = new byte[data.getSectionSize()]; |
122 | 122 |
123 ByteBuffer buffer = ByteBuffer.wrap(dataSection).order(ByteOrder.nativeOrder()); | 123 ByteBuffer buffer = ByteBuffer.wrap(dataSection).order(ByteOrder.nativeOrder()); |
124 Builder<DataPatch> patchBuilder = Stream.builder(); | 124 Builder<DataPatch> patchBuilder = Stream.builder(); |
125 data.buildDataSection(buffer, patchBuilder); | 125 data.buildDataSection(buffer, patchBuilder); |