Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/DeoptimizingFixedWithNextNode.java @ 19526:8fc336a04d77
Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 20 Feb 2015 22:22:55 +0100 |
parents | 880717e44675 |
children |
rev | line source |
---|---|
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
1 /* |
16255
e6919996abe9
new constructor (with nullCheck and stateBefore) for ReadNode
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15198
diff
changeset
|
2 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
4 * |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
8 * |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
14 * |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
18 * |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
21 * questions. |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
22 */ |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
23 package com.oracle.graal.nodes; |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
24 |
15198
2c0cfbf454b5
Move LIRTypeTool and Stamp to graal.compiler.common.
Josef Eisl <josef.eisl@jku.at>
parents:
15001
diff
changeset
|
25 import com.oracle.graal.compiler.common.type.*; |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
16897
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:
16822
diff
changeset
|
27 import com.oracle.graal.nodeinfo.*; |
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
28 |
16822
5d468add216f
added @NodeInfo annotations to all Node classes
Doug Simon <doug.simon@oracle.com>
parents:
16332
diff
changeset
|
29 @NodeInfo |
14734
6ae9af961b7c
Introduce separate interfaces for deoptimizing nodes that deopt to a state before, during or after their execution.
Roland Schatz <roland.schatz@oracle.com>
parents:
13293
diff
changeset
|
30 public abstract class DeoptimizingFixedWithNextNode extends FixedWithNextNode implements DeoptimizingNode.DeoptBefore { |
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
31 |
19526
8fc336a04d77
Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19471
diff
changeset
|
32 public static final NodeClass<DeoptimizingFixedWithNextNode> TYPE = NodeClass.create(DeoptimizingFixedWithNextNode.class); |
16897
f90dcdbbb75e
switched to using new NodeFieldIterator and NodeFieldIterable for traversing Node inputs and successors
Doug Simon <doug.simon@oracle.com>
parents:
16841
diff
changeset
|
33 @OptionalInput(InputType.State) protected FrameState stateBefore; |
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
34 |
19471
880717e44675
Use typed NodeClass in node constructors.
Roland Schatz <roland.schatz@oracle.com>
parents:
19403
diff
changeset
|
35 protected DeoptimizingFixedWithNextNode(NodeClass<? extends DeoptimizingFixedWithNextNode> c, Stamp stamp) { |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
16897
diff
changeset
|
36 super(c, stamp); |
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
37 } |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
38 |
19471
880717e44675
Use typed NodeClass in node constructors.
Roland Schatz <roland.schatz@oracle.com>
parents:
19403
diff
changeset
|
39 protected DeoptimizingFixedWithNextNode(NodeClass<? extends DeoptimizingFixedWithNextNode> c, Stamp stamp, FrameState stateBefore) { |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
16897
diff
changeset
|
40 super(c, stamp); |
16255
e6919996abe9
new constructor (with nullCheck and stateBefore) for ReadNode
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15198
diff
changeset
|
41 this.stateBefore = stateBefore; |
e6919996abe9
new constructor (with nullCheck and stateBefore) for ReadNode
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15198
diff
changeset
|
42 } |
e6919996abe9
new constructor (with nullCheck and stateBefore) for ReadNode
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15198
diff
changeset
|
43 |
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
44 @Override |
14734
6ae9af961b7c
Introduce separate interfaces for deoptimizing nodes that deopt to a state before, during or after their execution.
Roland Schatz <roland.schatz@oracle.com>
parents:
13293
diff
changeset
|
45 public FrameState stateBefore() { |
14783
01786db19f7d
Rename deoptState fields to reflect whether they refer to a state before or during.
Roland Schatz <roland.schatz@oracle.com>
parents:
14734
diff
changeset
|
46 return stateBefore; |
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
47 } |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
48 |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
49 @Override |
14734
6ae9af961b7c
Introduce separate interfaces for deoptimizing nodes that deopt to a state before, during or after their execution.
Roland Schatz <roland.schatz@oracle.com>
parents:
13293
diff
changeset
|
50 public void setStateBefore(FrameState f) { |
14783
01786db19f7d
Rename deoptState fields to reflect whether they refer to a state before or during.
Roland Schatz <roland.schatz@oracle.com>
parents:
14734
diff
changeset
|
51 updateUsages(stateBefore, f); |
01786db19f7d
Rename deoptState fields to reflect whether they refer to a state before or during.
Roland Schatz <roland.schatz@oracle.com>
parents:
14734
diff
changeset
|
52 stateBefore = f; |
8892
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
53 } |
2c0c708a0ad6
Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
diff
changeset
|
54 } |