annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/KillingBeginNode.java @ 19403:61d3cb8e1280

Add generic parameter to NodeClass. Change Graph#getNodes(Class) to Graph#getNodes(NodeClass).
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 16 Feb 2015 17:47:43 +0100
parents 7e2c87dae93e
children 8fc336a04d77
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11860
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
1 /*
19396
7e2c87dae93e Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18993
diff changeset
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
11860
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
4 *
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
7 * published by the Free Software Foundation.
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
8 *
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
13 * accompanied this code).
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
14 *
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
18 *
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
21 * questions.
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
22 */
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
23 package com.oracle.graal.nodes;
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
24
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
25 import com.oracle.graal.api.meta.*;
19396
7e2c87dae93e Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18993
diff changeset
26 import com.oracle.graal.graph.*;
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
27 import com.oracle.graal.nodeinfo.*;
11860
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
28 import com.oracle.graal.nodes.extended.*;
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
29
15002
06e50d290784 isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents: 13153
diff changeset
30 @NodeInfo(allowedUsageTypes = {InputType.Memory})
19396
7e2c87dae93e Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18993
diff changeset
31 public final class KillingBeginNode extends AbstractBeginNode implements MemoryCheckpoint.Single {
11860
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
32
19403
61d3cb8e1280 Add generic parameter to NodeClass. Change Graph#getNodes(Class) to Graph#getNodes(NodeClass).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19396
diff changeset
33 public static final NodeClass<KillingBeginNode> TYPE = NodeClass.get(KillingBeginNode.class);
17276
ffb974bef674 moved Node valueNumber and valueEquals logic (optionally) to generated nodes
Doug Simon <doug.simon@oracle.com>
parents: 16919
diff changeset
34 protected LocationIdentity locationIdentity;
11860
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
35
18845
f57d86eb036f removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents: 17450
diff changeset
36 public KillingBeginNode(LocationIdentity locationIdentity) {
19396
7e2c87dae93e Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 18993
diff changeset
37 super(TYPE);
11860
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
38 this.locationIdentity = locationIdentity;
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
39 }
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
40
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
41 public static KillingBeginNode begin(FixedNode with, LocationIdentity locationIdentity) {
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
42 if (with instanceof KillingBeginNode) {
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
43 return (KillingBeginNode) with;
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
44 }
18845
f57d86eb036f removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents: 17450
diff changeset
45 KillingBeginNode begin = with.graph().add(new KillingBeginNode(locationIdentity));
11860
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
46 begin.setNext(with);
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
47 return begin;
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
48 }
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
49
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
50 @Override
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
51 public LocationIdentity getLocationIdentity() {
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
52 return locationIdentity;
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
53 }
762dc2f23d1c InvokeWithException: make next successor a special begin node which has the same locationidentity as the invoke
Bernhard Urban <bernhard.urban@jku.at>
parents:
diff changeset
54 }