Mercurial > hg > graal-jvmci-8
annotate graal/GraalCompiler/src/com/sun/c1x/ir/Placeholder.java @ 2851:14708c03abba
Remove isNonNull
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 07 Jun 2011 11:36:32 +0200 |
parents | bd17ac598c6e |
children |
rev | line source |
---|---|
2730
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
1 /* |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
4 * |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
8 * |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
14 * |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
18 * |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
21 * questions. |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
22 */ |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
23 package com.sun.c1x.ir; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
24 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
25 import com.oracle.graal.graph.*; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
26 import com.sun.c1x.debug.*; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
27 import com.sun.cri.ci.*; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
28 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
29 |
2781
bda5972a40a5
remove unnecessary BlockBegin nodes in frontend
Lukas Stadler <lukas.stadler@jku.at>
parents:
2730
diff
changeset
|
30 public class Placeholder extends StateSplit { |
2730
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
31 |
2781
bda5972a40a5
remove unnecessary BlockBegin nodes in frontend
Lukas Stadler <lukas.stadler@jku.at>
parents:
2730
diff
changeset
|
32 private static final int INPUT_COUNT = 0; |
2730
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
33 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
34 private static final int SUCCESSOR_COUNT = 0; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
35 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
36 @Override |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
37 protected int inputCount() { |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
38 return super.inputCount() + INPUT_COUNT; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
39 } |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
40 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
41 @Override |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
42 protected int successorCount() { |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
43 return super.successorCount() + SUCCESSOR_COUNT; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
44 } |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
45 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
46 public Placeholder(Graph graph) { |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
47 super(CiKind.Void, INPUT_COUNT, SUCCESSOR_COUNT, graph); |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
48 } |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
49 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
50 @Override |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
51 public void accept(ValueVisitor v) { |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
52 assert false; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
53 } |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
54 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
55 @Override |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
56 public void print(LogStream out) { |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
57 assert false; |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
58 } |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
59 |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
60 @Override |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
61 public String shortName() { |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
62 return "Placeholder" + id(); |
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
63 } |
2827
bd17ac598c6e
Graph cloning, initial version (not completely working)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2781
diff
changeset
|
64 |
bd17ac598c6e
Graph cloning, initial version (not completely working)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2781
diff
changeset
|
65 @Override |
bd17ac598c6e
Graph cloning, initial version (not completely working)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2781
diff
changeset
|
66 public Node copy(Graph into) { |
bd17ac598c6e
Graph cloning, initial version (not completely working)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2781
diff
changeset
|
67 Placeholder x = new Placeholder(into); |
bd17ac598c6e
Graph cloning, initial version (not completely working)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2781
diff
changeset
|
68 return x; |
bd17ac598c6e
Graph cloning, initial version (not completely working)
Lukas Stadler <lukas.stadler@jku.at>
parents:
2781
diff
changeset
|
69 } |
2730
027adfafd47e
first batch of GraphBuilder changes to remove dependencies on BlockBegin
Lukas Stadler <lukas.stadler@jku.at>
parents:
diff
changeset
|
70 } |