Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/KillingBeginNode.java @ 16919:0fe4732e5181
made use of generated Node classes predicated on value of graal.useGeneratedNodes system property (default is false)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 25 Aug 2014 13:45:12 +0200 |
parents | 06c15e88d383 |
children | ffb974bef674 |
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 /* |
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
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
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.*; |
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.*; |
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
|
27 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
|
28 |
15002
06e50d290784
isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
13153
diff
changeset
|
29 @NodeInfo(allowedUsageTypes = {InputType.Memory}) |
15145
df2ef5204f2b
Remove AbstractBeginNode, move the framestate from AbstractBeginNode to BeginStateSplitNode.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
15002
diff
changeset
|
30 public class KillingBeginNode extends BeginNode 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
|
31 |
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 private 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
|
33 |
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 KillingBeginNode create(LocationIdentity locationIdentity) { |
16919
0fe4732e5181
made use of generated Node classes predicated on value of graal.useGeneratedNodes system property (default is false)
Doug Simon <doug.simon@oracle.com>
parents:
16895
diff
changeset
|
35 return USE_GENERATED_NODES ? new KillingBeginNodeGen(locationIdentity) : new KillingBeginNode(locationIdentity); |
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
|
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 KillingBeginNode(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
|
39 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
|
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 |
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 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
|
43 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
|
44 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
|
45 } |
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
|
46 KillingBeginNode begin = with.graph().add(KillingBeginNode.create(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
|
47 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
|
48 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
|
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 |
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 @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
|
52 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
|
53 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
|
54 } |
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
|
55 } |