1 /* |
1 /* |
2 * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
34 import org.graalvm.compiler.graph.NodeClass; |
34 import org.graalvm.compiler.graph.NodeClass; |
35 import org.graalvm.compiler.nodeinfo.NodeInfo; |
35 import org.graalvm.compiler.nodeinfo.NodeInfo; |
36 import org.graalvm.compiler.nodes.ValueNode; |
36 import org.graalvm.compiler.nodes.ValueNode; |
37 import org.graalvm.compiler.nodes.calc.FloatingNode; |
37 import org.graalvm.compiler.nodes.calc.FloatingNode; |
38 import org.graalvm.compiler.nodes.spi.ArrayLengthProvider; |
38 import org.graalvm.compiler.nodes.spi.ArrayLengthProvider; |
39 import org.graalvm.compiler.nodes.spi.Virtualizable; |
39 import org.graalvm.compiler.nodes.spi.VirtualizableAllocation; |
40 import org.graalvm.compiler.nodes.spi.VirtualizerTool; |
40 import org.graalvm.compiler.nodes.spi.VirtualizerTool; |
41 import org.graalvm.compiler.nodes.util.GraphUtil; |
41 import org.graalvm.compiler.nodes.util.GraphUtil; |
42 |
42 |
43 /** |
43 /** |
44 * Selects one object from a {@link CommitAllocationNode}. The object is identified by its |
44 * Selects one object from a {@link CommitAllocationNode}. The object is identified by its |
45 * {@link VirtualObjectNode}. |
45 * {@link VirtualObjectNode}. |
46 */ |
46 */ |
47 @NodeInfo(cycles = CYCLES_0, size = SIZE_0) |
47 @NodeInfo(cycles = CYCLES_0, size = SIZE_0) |
48 public final class AllocatedObjectNode extends FloatingNode implements Virtualizable, ArrayLengthProvider { |
48 public final class AllocatedObjectNode extends FloatingNode implements VirtualizableAllocation, ArrayLengthProvider { |
49 |
49 |
50 public static final NodeClass<AllocatedObjectNode> TYPE = NodeClass.create(AllocatedObjectNode.class); |
50 public static final NodeClass<AllocatedObjectNode> TYPE = NodeClass.create(AllocatedObjectNode.class); |
51 @Input VirtualObjectNode virtualObject; |
51 @Input VirtualObjectNode virtualObject; |
52 @Input(Extension) CommitAllocationNode commit; |
52 @Input(Extension) CommitAllocationNode commit; |
53 |
53 |