|
41 | 41 | import java.util.concurrent.ConcurrentHashMap; |
42 | 42 | import java.util.concurrent.ConcurrentMap; |
43 | 43 | import java.util.concurrent.ForkJoinPool; |
| 44 | +import java.util.stream.Collectors; |
44 | 45 |
|
45 | 46 | import com.oracle.graal.pointsto.api.PointstoOptions; |
46 | 47 | import com.oracle.svm.hosted.phases.StrengthenStampsPhase; |
@@ -634,18 +635,20 @@ private void parseDeoptimizationTargetMethods() { |
634 | 635 | * Deoptimization target code for all methods that were manually marked as deoptimization |
635 | 636 | * targets. |
636 | 637 | */ |
637 | | - universe.getMethods().stream() |
| 638 | + List<HostedMethod> deoptTargetMethods = universe.getMethods().stream() |
638 | 639 | .filter(method -> CompilationInfoSupport.singleton().isDeoptTarget(method)) |
639 | | - .forEach(method -> ensureParsed(universe.createDeoptTarget(method), null, new EntryPointReason())); |
| 640 | + .collect(Collectors.toList()); |
| 641 | + deoptTargetMethods.forEach(method -> ensureParsed(universe.createDeoptTarget(method), null, new EntryPointReason())); |
640 | 642 |
|
641 | 643 | /* |
642 | 644 | * Deoptimization target code for deoptimization testing: all methods that are not |
643 | 645 | * blacklisted are possible deoptimization targets. The methods are also flagged so that all |
644 | 646 | * possible deoptimization entry points are emitted. |
645 | 647 | */ |
646 | | - universe.getMethods().stream() |
| 648 | + List<HostedMethod> deoptTargetForTestingMethods = universe.getMethods().stream() |
647 | 649 | .filter(method -> method.getWrapped().isImplementationInvoked() && canDeoptForTesting(method)) |
648 | | - .forEach(this::ensureParsedForDeoptTesting); |
| 650 | + .collect(Collectors.toList()); |
| 651 | + deoptTargetForTestingMethods.forEach(this::ensureParsedForDeoptTesting); |
649 | 652 |
|
650 | 653 | } |
651 | 654 |
|
|
0 commit comments