Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationResult.java @ 22739:f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 25 Nov 2015 20:41:26 +0100 |
parents | a93a36e7b419 |
children | 22110ef74a40 |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationResult.java Wed Nov 25 16:28:10 2015 +0100 +++ b/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationResult.java Wed Nov 25 20:41:26 2015 +0100 @@ -780,31 +780,11 @@ * Records a custom infopoint in the code section. * * Compiler implementations can use this method to record non-standard infopoints, which are not - * handled by the dedicated methods like {@link #recordCall}. + * handled by dedicated methods like {@link #recordCall}. * * @param infopoint the infopoint to record, usually a derived class from {@link Infopoint} */ public void addInfopoint(Infopoint infopoint) { - // The infopoints list must always be sorted - if (!infopoints.isEmpty()) { - Infopoint previousInfopoint = infopoints.get(infopoints.size() - 1); - if (previousInfopoint.pcOffset > infopoint.pcOffset) { - // This re-sorting should be very rare - Collections.sort(infopoints); - previousInfopoint = infopoints.get(infopoints.size() - 1); - } - if (previousInfopoint.pcOffset == infopoint.pcOffset) { - if (infopoint.reason.canBeOmitted()) { - return; - } - if (previousInfopoint.reason.canBeOmitted()) { - Infopoint removed = infopoints.remove(infopoints.size() - 1); - assert removed == previousInfopoint; - } else { - throw new RuntimeException("Infopoints that can not be omited should have distinct PCs"); - } - } - } infopoints.add(infopoint); }