|
43 | 43 |
|
44 | 44 | /** |
45 | 45 | * Node that marks a static final field as initialized. This is basically just a store of the value |
46 | | - * true in the {@link StaticFinalFieldFoldingFeature#fieldInitializationStatus} array. But we cannot |
47 | | - * immediately emit a {@link StoreIndexedNode} in the bytecode parser because we do not know at the |
48 | | - * time of parsing if the field can actually be optimized or not. So this node is emitted for every |
49 | | - * static final field store, and then just removed if the field cannot be optimized. |
| 46 | + * true in the {@link StaticFinalFieldFoldingSingleton#fieldInitializationStatus} array. But we |
| 47 | + * cannot immediately emit a {@link StoreIndexedNode} in the bytecode parser because we do not know |
| 48 | + * at the time of parsing if the field can actually be optimized or not. So this node is emitted for |
| 49 | + * every static final field store, and then just removed if the field cannot be optimized. |
50 | 50 | */ |
51 | 51 | @NodeInfo(size = NodeSize.SIZE_1, cycles = NodeCycles.CYCLES_1) |
52 | 52 | public final class MarkStaticFinalFieldInitializedNode extends AbstractStateSplit implements Simplifiable { |
@@ -75,10 +75,10 @@ public void simplify(SimplifierTool tool) { |
75 | 75 | } |
76 | 76 | assert field instanceof HostedField; |
77 | 77 |
|
78 | | - StaticFinalFieldFoldingFeature feature = StaticFinalFieldFoldingFeature.singleton(); |
79 | | - Integer fieldCheckIndex = feature.getFieldCheckIndex(field); |
| 78 | + StaticFinalFieldFoldingSingleton singleton = StaticFinalFieldFoldingSingleton.singleton(); |
| 79 | + Integer fieldCheckIndex = singleton.getFieldCheckIndex(field); |
80 | 80 | if (fieldCheckIndex != null) { |
81 | | - ConstantNode fieldInitializationStatusNode = ConstantNode.forConstant(tool.getSnippetReflection().forObject(feature.fieldInitializationStatus), tool.getMetaAccess(), graph()); |
| 81 | + ConstantNode fieldInitializationStatusNode = ConstantNode.forConstant(tool.getSnippetReflection().forObject(singleton.fieldInitializationStatus), tool.getMetaAccess(), graph()); |
82 | 82 | ConstantNode fieldCheckIndexNode = ConstantNode.forInt(fieldCheckIndex, graph()); |
83 | 83 | ConstantNode trueNode = ConstantNode.forBoolean(true, graph()); |
84 | 84 | StoreIndexedNode replacementNode = graph().add(new StoreIndexedNode(fieldInitializationStatusNode, fieldCheckIndexNode, null, null, JavaKind.Boolean, trueNode)); |
|
0 commit comments