annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StartNode.java @ 16895:06c15e88d383

added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
author Doug Simon <doug.simon@oracle.com>
date Mon, 18 Aug 2014 14:04:21 +0200
parents cbd42807a31f
children 0fe4732e5181
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5371
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.nodes;
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
9792
06dc2d2324d6 pulled LocationIdentity into a top level class and moved it to the api.meta project
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
25 import com.oracle.graal.api.meta.*;
16841
cbd42807a31f moved NodeInfo and friends into separate com.oracle.graal.nodeinfo project so that annotation processor can be applied to the base Node class
Doug Simon <doug.simon@oracle.com>
parents: 16438
diff changeset
26 import com.oracle.graal.nodeinfo.*;
5831
ed08c40d67de Add a alwaysNull property to ObjectStamp (Phi(null, a! A) get a "a A" stamp and not just "a -")
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 5371
diff changeset
27 import com.oracle.graal.nodes.extended.*;
ed08c40d67de Add a alwaysNull property to ObjectStamp (Phi(null, a! A) get a "a A" stamp and not just "a -")
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 5371
diff changeset
28
5371
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29 /**
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 * The start node of a graph.
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31 */
15002
06e50d290784 isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
32 @NodeInfo(allowedUsageTypes = {InputType.Memory})
10090
ae6f0c381087 split MemoryCheckpoint interface into Single and Multi
Lukas Stadler <lukas.stadler@jku.at>
parents: 9793
diff changeset
33 public class StartNode extends BeginStateSplitNode implements MemoryCheckpoint.Single {
16895
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
34 public static StartNode create() {
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
35 return new StartNodeGen();
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
36 }
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
37
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
38 protected StartNode() {
06c15e88d383 added factory method to all Node classes; replaced Node classes instantiation with calls to factory methods; replaced identity tests on Node classes with ' == <node class>.getGenClass()' idiom
Doug Simon <doug.simon@oracle.com>
parents: 16841
diff changeset
39 }
5371
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40
7864
b66a826acf4b add location identity to MemoryCheckpoint and let WriteNode implement MemoryCheckpoint
Lukas Stadler <lukas.stadler@jku.at>
parents: 7530
diff changeset
41 @Override
10090
ae6f0c381087 split MemoryCheckpoint interface into Single and Multi
Lukas Stadler <lukas.stadler@jku.at>
parents: 9793
diff changeset
42 public LocationIdentity getLocationIdentity() {
ae6f0c381087 split MemoryCheckpoint interface into Single and Multi
Lukas Stadler <lukas.stadler@jku.at>
parents: 9793
diff changeset
43 return LocationIdentity.ANY_LOCATION;
7864
b66a826acf4b add location identity to MemoryCheckpoint and let WriteNode implement MemoryCheckpoint
Lukas Stadler <lukas.stadler@jku.at>
parents: 7530
diff changeset
44 }
5371
3fd6b0ab1146 created StartNode and DispatchBeginNode for clearer visualization of these special nodes in the visualizer
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
45 }