Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/CheckCastNode.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 | 61d3cb8e1280 |
children | 2fd45bb25118 |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
16252
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
2 * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
23 package com.oracle.graal.nodes.java; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
11839
0e2cceed1caf
Temporarily move encodeDeoptActionAndReason to MetaAccessProvider
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11798
diff
changeset
|
25 import static com.oracle.graal.api.meta.DeoptimizationAction.*; |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
26 import static com.oracle.graal.api.meta.DeoptimizationReason.*; |
10788
ac3cb56f47a0
made use of symbolic constants for branch probabilities
Doug Simon <doug.simon@oracle.com>
parents:
10786
diff
changeset
|
27 import static com.oracle.graal.nodes.extended.BranchProbabilityNode.*; |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
28 |
19250
8ab925a6f724
made Assumptions be part of a StructuredGraph
Doug Simon <doug.simon@oracle.com>
parents:
19239
diff
changeset
|
29 import com.oracle.graal.api.code.*; |
5507
dc71b06d09f8
Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5504
diff
changeset
|
30 import com.oracle.graal.api.meta.*; |
10786
745322b36359
added a field to LogicBinaryNode capturing the probability that the evaluation of the logic node is short-circuited (i.e. only the left input is evaluated)
Doug Simon <doug.simon@oracle.com>
parents:
10762
diff
changeset
|
31 import com.oracle.graal.api.meta.ProfilingInfo.TriState; |
15198
2c0cfbf454b5
Move LIRTypeTool and Stamp to graal.compiler.common.
Josef Eisl <josef.eisl@jku.at>
parents:
15009
diff
changeset
|
32 import com.oracle.graal.compiler.common.type.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
33 import com.oracle.graal.graph.*; |
11881
da9db8331658
moved Canonicalizable and Simplifiable to the com.oracle.graal.graph project (GRAAL-506)
Doug Simon <doug.simon@oracle.com>
parents:
11880
diff
changeset
|
34 import com.oracle.graal.graph.spi.*; |
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
|
35 import com.oracle.graal.nodeinfo.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
36 import com.oracle.graal.nodes.*; |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
37 import com.oracle.graal.nodes.calc.*; |
5060
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
38 import com.oracle.graal.nodes.spi.*; |
4ed4295ce15f
Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5059
diff
changeset
|
39 import com.oracle.graal.nodes.type.*; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
40 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 /** |
6648
7bf5a6c42db7
factored CheckCastDynamicNode out of CheckCastNode
Doug Simon <doug.simon@oracle.com>
parents:
6462
diff
changeset
|
42 * Implements a type check against a compile-time known type. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 */ |
16822
5d468add216f
added @NodeInfo annotations to all Node classes
Doug Simon <doug.simon@oracle.com>
parents:
16422
diff
changeset
|
44 @NodeInfo |
18998
ec0733b5a90a
Allow final modifier on node subclasses and start adding the modifier to leaf classes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18845
diff
changeset
|
45 public final class CheckCastNode extends FixedWithNextNode implements Canonicalizable, Simplifiable, Lowerable, Virtualizable, ValueProxy { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 |
19526
8fc336a04d77
Create TYPE fields for LIRInstruction and CompositeValue. Renaming NodeClass#get to NodeClass#create.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19403
diff
changeset
|
47 public static final NodeClass<CheckCastNode> TYPE = NodeClass.create(CheckCastNode.class); |
17135
ceb34d2d124e
Make fields and constructors protected to allow subclasses in different packages
Christian Wimmer <christian.wimmer@oracle.com>
parents:
16919
diff
changeset
|
48 @Input protected ValueNode object; |
17328
c9bb0da795d4
Backed out of changeset 17322:655f3e6b467b
Doug Simon <doug.simon@oracle.com>
parents:
17327
diff
changeset
|
49 protected final ResolvedJavaType type; |
c9bb0da795d4
Backed out of changeset 17322:655f3e6b467b
Doug Simon <doug.simon@oracle.com>
parents:
17327
diff
changeset
|
50 protected final JavaTypeProfile profile; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 /** |
9478
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
53 * Determines the exception thrown by this node if the check fails: {@link ClassCastException} |
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
54 * if false; {@link ArrayStoreException} if true. |
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
55 */ |
17328
c9bb0da795d4
Backed out of changeset 17322:655f3e6b467b
Doug Simon <doug.simon@oracle.com>
parents:
17327
diff
changeset
|
56 protected final boolean forStoreCheck; |
9478
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
57 |
18845
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
58 public CheckCastNode(ResolvedJavaType type, ValueNode object, JavaTypeProfile profile, boolean forStoreCheck) { |
19396
7e2c87dae93e
Create static final NodeClass field named TYPE in Node subclasses.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19339
diff
changeset
|
59 super(TYPE, StampFactory.declaredTrusted(type)); |
6648
7bf5a6c42db7
factored CheckCastDynamicNode out of CheckCastNode
Doug Simon <doug.simon@oracle.com>
parents:
6462
diff
changeset
|
60 assert type != null; |
7bf5a6c42db7
factored CheckCastDynamicNode out of CheckCastNode
Doug Simon <doug.simon@oracle.com>
parents:
6462
diff
changeset
|
61 this.type = type; |
5370 | 62 this.object = object; |
63 this.profile = profile; | |
9478
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
64 this.forStoreCheck = forStoreCheck; |
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
65 } |
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
66 |
19337
dd3e15cfe5b8
Canonicalize CheckCastNode to unique concrete subtype on creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19306
diff
changeset
|
67 public static ValueNode create(ResolvedJavaType inputType, ValueNode object, JavaTypeProfile profile, boolean forStoreCheck, Assumptions assumptions) { |
dd3e15cfe5b8
Canonicalize CheckCastNode to unique concrete subtype on creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19306
diff
changeset
|
68 ResolvedJavaType type = inputType; |
19239
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
69 ValueNode synonym = findSynonym(type, object); |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
70 if (synonym != null) { |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
71 return synonym; |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
72 } |
19337
dd3e15cfe5b8
Canonicalize CheckCastNode to unique concrete subtype on creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19306
diff
changeset
|
73 if (assumptions != null) { |
dd3e15cfe5b8
Canonicalize CheckCastNode to unique concrete subtype on creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19306
diff
changeset
|
74 ResolvedJavaType uniqueConcreteType = type.findUniqueConcreteSubtype(); |
19339
ba7bd60a8744
Fix CheckCastNode canonicalization during creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19337
diff
changeset
|
75 if (uniqueConcreteType != null && !uniqueConcreteType.equals(type)) { |
19337
dd3e15cfe5b8
Canonicalize CheckCastNode to unique concrete subtype on creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19306
diff
changeset
|
76 assumptions.recordConcreteSubtype(type, uniqueConcreteType); |
dd3e15cfe5b8
Canonicalize CheckCastNode to unique concrete subtype on creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19306
diff
changeset
|
77 type = uniqueConcreteType; |
dd3e15cfe5b8
Canonicalize CheckCastNode to unique concrete subtype on creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19306
diff
changeset
|
78 } |
dd3e15cfe5b8
Canonicalize CheckCastNode to unique concrete subtype on creation.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
19306
diff
changeset
|
79 } |
19239
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
80 return new CheckCastNode(type, object, profile, forStoreCheck); |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
81 } |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
82 |
9478
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
83 public boolean isForStoreCheck() { |
fb22b4d5f475
Allow distinction between ClassCastException and ArrayStoreException. Add more canonicalizations for check casts.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9251
diff
changeset
|
84 return forStoreCheck; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
85 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
86 |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
87 /** |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
88 * Lowers a {@link CheckCastNode} to a {@link GuardingPiNode}. That is: |
15002
06e50d290784
isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14160
diff
changeset
|
89 * |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
90 * <pre> |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
91 * 1: A a = ... |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
92 * 2: B b = (B) a; |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
93 * </pre> |
15002
06e50d290784
isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14160
diff
changeset
|
94 * |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
95 * is lowered to: |
15002
06e50d290784
isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14160
diff
changeset
|
96 * |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
97 * <pre> |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
98 * 1: A a = ... |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
99 * 2: B b = guardingPi(a == null || a instanceof B, a, stamp(B)) |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
100 * </pre> |
15002
06e50d290784
isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14160
diff
changeset
|
101 * |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
102 * or if a is known to be non-null: |
15002
06e50d290784
isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14160
diff
changeset
|
103 * |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
104 * <pre> |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
105 * 1: A a = ... |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
106 * 2: B b = guardingPi(a instanceof B, a, stamp(B, non-null)) |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
107 * </pre> |
15002
06e50d290784
isAllowedUsageType on Nodes
Lukas Stadler <lukas.stadler@oracle.com>
parents:
14160
diff
changeset
|
108 * |
12384
28d80a9260cd
During CheckCast lowering, if null was never seen and a guard is created for the null case, the instanceof should be done on a non-null value.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11881
diff
changeset
|
109 * Note: we use {@link Graph#addWithoutUnique} as opposed to {@link Graph#unique} for the new |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
110 * {@link InstanceOfNode} to maintain the invariant checked by |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
111 * {@code LoweringPhase.checkUsagesAreScheduled()}. |
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
112 */ |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
113 @Override |
11579
ae619d70bf4b
Rename LoweringType to GuardsPhase and make it an attribute of StructuredGraphs
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11387
diff
changeset
|
114 public void lower(LoweringTool tool) { |
18416
0c6504598b65
StampTool: add more methods to create object stamps to avoid using too many boolean arguments, add some javadoc, use them.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
17450
diff
changeset
|
115 Stamp newStamp = StampFactory.declaredTrusted(type); |
11265 | 116 if (stamp() instanceof ObjectStamp && object().stamp() instanceof ObjectStamp) { |
17276
ffb974bef674
moved Node valueNumber and valueEquals logic (optionally) to generated nodes
Doug Simon <doug.simon@oracle.com>
parents:
17154
diff
changeset
|
117 newStamp = ((ObjectStamp) object().stamp()).castTo((ObjectStamp) newStamp); |
11265 | 118 } |
11226
422b0e9b9aed
removed obsolete checkcast snippets
Doug Simon <doug.simon@oracle.com>
parents:
10918
diff
changeset
|
119 ValueNode condition; |
16422
7f20dee1be60
ensure instanceof and null check stay dependent
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16252
diff
changeset
|
120 ValueNode theValue = object; |
17276
ffb974bef674
moved Node valueNumber and valueEquals logic (optionally) to generated nodes
Doug Simon <doug.simon@oracle.com>
parents:
17154
diff
changeset
|
121 if (newStamp instanceof IllegalStamp) { |
11226
422b0e9b9aed
removed obsolete checkcast snippets
Doug Simon <doug.simon@oracle.com>
parents:
10918
diff
changeset
|
122 // This is a check cast that will always fail |
422b0e9b9aed
removed obsolete checkcast snippets
Doug Simon <doug.simon@oracle.com>
parents:
10918
diff
changeset
|
123 condition = LogicConstantNode.contradiction(graph()); |
18416
0c6504598b65
StampTool: add more methods to create object stamps to avoid using too many boolean arguments, add some javadoc, use them.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
17450
diff
changeset
|
124 newStamp = StampFactory.declaredTrusted(type); |
18490
ca81508f2a19
Generalize NULL handling to work on arbitrary pointers.
Roland Schatz <roland.schatz@oracle.com>
parents:
18416
diff
changeset
|
125 } else if (StampTool.isPointerNonNull(object)) { |
18845
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
126 condition = graph().addWithoutUnique(new InstanceOfNode(type, object, profile)); |
11226
422b0e9b9aed
removed obsolete checkcast snippets
Doug Simon <doug.simon@oracle.com>
parents:
10918
diff
changeset
|
127 } else { |
422b0e9b9aed
removed obsolete checkcast snippets
Doug Simon <doug.simon@oracle.com>
parents:
10918
diff
changeset
|
128 if (profile != null && profile.getNullSeen() == TriState.FALSE) { |
18845
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
129 FixedGuardNode nullCheck = graph().add(new FixedGuardNode(graph().unique(new IsNullNode(object)), UnreachedCode, InvalidateReprofile, true)); |
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
130 PiNode nullGuarded = graph().unique(new PiNode(object, object().stamp().join(StampFactory.objectNonNull()), nullCheck)); |
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
131 InstanceOfNode typeTest = graph().addWithoutUnique(new InstanceOfNode(type, nullGuarded, profile)); |
12384
28d80a9260cd
During CheckCast lowering, if null was never seen and a guard is created for the null case, the instanceof should be done on a non-null value.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11881
diff
changeset
|
132 graph().addBeforeFixed(this, nullCheck); |
10729
2a4ad6ab345e
disabled new lowering of checkcast until performance regression is fixed
Doug Simon <doug.simon@oracle.com>
parents:
10712
diff
changeset
|
133 condition = typeTest; |
16422
7f20dee1be60
ensure instanceof and null check stay dependent
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16252
diff
changeset
|
134 /* |
7f20dee1be60
ensure instanceof and null check stay dependent
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16252
diff
changeset
|
135 * The PiNode is injecting an extra guard into the type so make sure it's used in |
7f20dee1be60
ensure instanceof and null check stay dependent
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16252
diff
changeset
|
136 * the GuardingPi, otherwise we can lose the null guard if the InstanceOf is |
7f20dee1be60
ensure instanceof and null check stay dependent
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16252
diff
changeset
|
137 * optimized away. |
7f20dee1be60
ensure instanceof and null check stay dependent
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16252
diff
changeset
|
138 */ |
7f20dee1be60
ensure instanceof and null check stay dependent
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
16252
diff
changeset
|
139 theValue = nullGuarded; |
17276
ffb974bef674
moved Node valueNumber and valueEquals logic (optionally) to generated nodes
Doug Simon <doug.simon@oracle.com>
parents:
17154
diff
changeset
|
140 newStamp = newStamp.join(StampFactory.objectNonNull()); |
12384
28d80a9260cd
During CheckCast lowering, if null was never seen and a guard is created for the null case, the instanceof should be done on a non-null value.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11881
diff
changeset
|
141 nullCheck.lower(tool); |
10729
2a4ad6ab345e
disabled new lowering of checkcast until performance regression is fixed
Doug Simon <doug.simon@oracle.com>
parents:
10712
diff
changeset
|
142 } else { |
11226
422b0e9b9aed
removed obsolete checkcast snippets
Doug Simon <doug.simon@oracle.com>
parents:
10918
diff
changeset
|
143 // TODO (ds) replace with probability of null-seen when available |
422b0e9b9aed
removed obsolete checkcast snippets
Doug Simon <doug.simon@oracle.com>
parents:
10918
diff
changeset
|
144 double shortCircuitProbability = NOT_FREQUENT_PROBABILITY; |
18845
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
145 InstanceOfNode typeTest = graph().addWithoutUnique(new InstanceOfNode(type, object, profile)); |
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
146 condition = LogicNode.or(graph().unique(new IsNullNode(object)), typeTest, shortCircuitProbability); |
10729
2a4ad6ab345e
disabled new lowering of checkcast until performance regression is fixed
Doug Simon <doug.simon@oracle.com>
parents:
10712
diff
changeset
|
147 } |
10693
f8adf47cc05e
checkcast is lowered to instanceof (GRAAL-248)
Doug Simon <doug.simon@oracle.com>
parents:
9786
diff
changeset
|
148 } |
18845
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
149 GuardingPiNode checkedObject = graph().add(new GuardingPiNode(theValue, condition, false, forStoreCheck ? ArrayStoreException : ClassCastException, InvalidateReprofile, newStamp)); |
11226
422b0e9b9aed
removed obsolete checkcast snippets
Doug Simon <doug.simon@oracle.com>
parents:
10918
diff
changeset
|
150 graph().replaceFixedWithFixed(this, checkedObject); |
11798
2fbb9fd55dde
made lowering recursive instead of iterative
Doug Simon <doug.simon@oracle.com>
parents:
11652
diff
changeset
|
151 checkedObject.lower(tool); |
5379
c862951e769d
moved checkcast lowering into LoweringPhase and added -G:HIRLowerCheckcast option to enable it (disabled by default) as it is not yet stable
Doug Simon <doug.simon@oracle.com>
parents:
5372
diff
changeset
|
152 } |
c862951e769d
moved checkcast lowering into LoweringPhase and added -G:HIRLowerCheckcast option to enable it (disabled by default) as it is not yet stable
Doug Simon <doug.simon@oracle.com>
parents:
5372
diff
changeset
|
153 |
c862951e769d
moved checkcast lowering into LoweringPhase and added -G:HIRLowerCheckcast option to enable it (disabled by default) as it is not yet stable
Doug Simon <doug.simon@oracle.com>
parents:
5372
diff
changeset
|
154 @Override |
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:
5720
diff
changeset
|
155 public boolean inferStamp() { |
15754
45285c8eccbd
Never use the current node's stamp in ValueNode.inferStamp overrides.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
15260
diff
changeset
|
156 if (object().stamp() instanceof ObjectStamp) { |
18416
0c6504598b65
StampTool: add more methods to create object stamps to avoid using too many boolean arguments, add some javadoc, use them.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
17450
diff
changeset
|
157 ObjectStamp castStamp = (ObjectStamp) StampFactory.declaredTrusted(type); |
15754
45285c8eccbd
Never use the current node's stamp in ValueNode.inferStamp overrides.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
15260
diff
changeset
|
158 return updateStamp(((ObjectStamp) object().stamp()).castTo(castStamp)); |
11265 | 159 } |
160 return false; | |
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:
5720
diff
changeset
|
161 } |
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:
5720
diff
changeset
|
162 |
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:
5720
diff
changeset
|
163 @Override |
11880
9a747d8e0d0f
broadened types in Canonicalizable interface so that it can be moved to the com.oracle.graal.graph project (GRAAL-506)
Doug Simon <doug.simon@oracle.com>
parents:
11839
diff
changeset
|
164 public Node canonical(CanonicalizerTool tool) { |
19239
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
165 ValueNode synonym = findSynonym(type, object()); |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
166 if (synonym != null) { |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
167 return synonym; |
16252
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
168 } |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
169 |
19250
8ab925a6f724
made Assumptions be part of a StructuredGraph
Doug Simon <doug.simon@oracle.com>
parents:
19239
diff
changeset
|
170 Assumptions assumptions = graph().getAssumptions(); |
19306
a0a760b0fb5f
pulled method evolution dependencies out of Assumptions and directly into StructuredGraph
Doug Simon <doug.simon@oracle.com>
parents:
19250
diff
changeset
|
171 if (assumptions != null) { |
16252
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
172 ResolvedJavaType exactType = type.findUniqueConcreteSubtype(); |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
173 if (exactType != null && !exactType.equals(type)) { |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
174 // Propagate more precise type information to usages of the checkcast. |
19250
8ab925a6f724
made Assumptions be part of a StructuredGraph
Doug Simon <doug.simon@oracle.com>
parents:
19239
diff
changeset
|
175 assumptions.recordConcreteSubtype(type, exactType); |
18845
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
176 return new CheckCastNode(exactType, object, profile, forStoreCheck); |
16252
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
177 } |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
178 } |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
179 |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
180 return this; |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
181 } |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
182 |
19239
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
183 private static ValueNode findSynonym(ResolvedJavaType type, ValueNode object) { |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
184 ResolvedJavaType objectType = StampTool.typeOrNull(object); |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
185 if (objectType != null && type.isAssignableFrom(objectType)) { |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
186 // we don't have to check for null types here because they will also pass the |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
187 // checkcast. |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
188 return object; |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
189 } |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
190 |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
191 if (StampTool.isPointerAlwaysNull(object)) { |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
192 return object; |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
193 } |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
194 return null; |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
195 } |
637ca4d37bca
Extensions and fixes to inline and canonicalize during parsing.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
18998
diff
changeset
|
196 |
16252
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
197 @Override |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
198 public void simplify(SimplifierTool tool) { |
10918
3736fb3dcc56
checkcastnode: fix comment and scope in unittest
Bernhard Urban <bernhard.urban@jku.at>
parents:
10877
diff
changeset
|
199 // if the previous node is also a checkcast, with a less precise and compatible type, |
3736fb3dcc56
checkcastnode: fix comment and scope in unittest
Bernhard Urban <bernhard.urban@jku.at>
parents:
10877
diff
changeset
|
200 // replace both with one checkcast checking the more specific type. |
9543
f8a5f7f7d0bd
CheckCastNode: eliminate the other way around
Bernhard Urban <bernhard.urban@jku.at>
parents:
9494
diff
changeset
|
201 if (predecessor() instanceof CheckCastNode) { |
f8a5f7f7d0bd
CheckCastNode: eliminate the other way around
Bernhard Urban <bernhard.urban@jku.at>
parents:
9494
diff
changeset
|
202 CheckCastNode ccn = (CheckCastNode) predecessor(); |
f8a5f7f7d0bd
CheckCastNode: eliminate the other way around
Bernhard Urban <bernhard.urban@jku.at>
parents:
9494
diff
changeset
|
203 if (ccn != null && ccn.type != null && ccn == object && ccn.forStoreCheck == forStoreCheck && ccn.type.isAssignableFrom(type)) { |
9602
19c5a07c7843
Introduce a graph() method that returns a StructuredGraph, to make many explicit casts unnecessary
Christian Wimmer <christian.wimmer@oracle.com>
parents:
9543
diff
changeset
|
204 StructuredGraph graph = ccn.graph(); |
18845
f57d86eb036f
removed Node factory methods
Doug Simon <doug.simon@oracle.com>
parents:
18490
diff
changeset
|
205 CheckCastNode newccn = graph.add(new CheckCastNode(type, ccn.object, ccn.profile, ccn.forStoreCheck)); |
9543
f8a5f7f7d0bd
CheckCastNode: eliminate the other way around
Bernhard Urban <bernhard.urban@jku.at>
parents:
9494
diff
changeset
|
206 graph.replaceFixedWithFixed(ccn, newccn); |
16252
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
207 replaceAtUsages(newccn); |
a762ddb12b43
change some node types from Canonicalizable to Simplifiable
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15831
diff
changeset
|
208 graph.removeFixed(this); |
5417
791eb4f85b29
Use exact type for check cast canonicalization if available
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
5379
diff
changeset
|
209 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
210 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
211 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
212 |
5370 | 213 public ValueNode object() { |
214 return object; | |
215 } | |
216 | |
217 /** | |
6648
7bf5a6c42db7
factored CheckCastDynamicNode out of CheckCastNode
Doug Simon <doug.simon@oracle.com>
parents:
6462
diff
changeset
|
218 * Gets the type being cast to. |
5370 | 219 */ |
6648
7bf5a6c42db7
factored CheckCastDynamicNode out of CheckCastNode
Doug Simon <doug.simon@oracle.com>
parents:
6462
diff
changeset
|
220 public ResolvedJavaType type() { |
7bf5a6c42db7
factored CheckCastDynamicNode out of CheckCastNode
Doug Simon <doug.simon@oracle.com>
parents:
6462
diff
changeset
|
221 return type; |
5370 | 222 } |
223 | |
5541
b4c406861c33
More renamings to drop Ri* prefix completely. Deleted graph.BitMap class and replaced with java.util.BitSet.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5540
diff
changeset
|
224 public JavaTypeProfile profile() { |
5370 | 225 return profile; |
226 } | |
6710
6db6881c1270
add Virtualizable and VirtualizerTool, refactor PEA to use it
Lukas Stadler <lukas.stadler@jku.at>
parents:
6648
diff
changeset
|
227 |
6db6881c1270
add Virtualizable and VirtualizerTool, refactor PEA to use it
Lukas Stadler <lukas.stadler@jku.at>
parents:
6648
diff
changeset
|
228 @Override |
6db6881c1270
add Virtualizable and VirtualizerTool, refactor PEA to use it
Lukas Stadler <lukas.stadler@jku.at>
parents:
6648
diff
changeset
|
229 public void virtualize(VirtualizerTool tool) { |
7394
94f032472c28
changed PEA interface:
Lukas Stadler <lukas.stadler@jku.at>
parents:
7337
diff
changeset
|
230 State state = tool.getObjectState(object); |
94f032472c28
changed PEA interface:
Lukas Stadler <lukas.stadler@jku.at>
parents:
7337
diff
changeset
|
231 if (state != null && state.getState() == EscapeState.Virtual) { |
8961
1b5eeb50e690
PEA: fix virtualization of CheckCastNode (check type)
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
232 if (type.isAssignableFrom(state.getVirtualObject().type())) { |
1b5eeb50e690
PEA: fix virtualization of CheckCastNode (check type)
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
233 tool.replaceWithVirtual(state.getVirtualObject()); |
1b5eeb50e690
PEA: fix virtualization of CheckCastNode (check type)
Lukas Stadler <lukas.stadler@jku.at>
parents:
7530
diff
changeset
|
234 } |
6710
6db6881c1270
add Virtualizable and VirtualizerTool, refactor PEA to use it
Lukas Stadler <lukas.stadler@jku.at>
parents:
6648
diff
changeset
|
235 } |
6db6881c1270
add Virtualizable and VirtualizerTool, refactor PEA to use it
Lukas Stadler <lukas.stadler@jku.at>
parents:
6648
diff
changeset
|
236 } |
10762
c483912aaf70
add ValueProxy interface and infrastructure
Lukas Stadler <lukas.stadler@jku.at>
parents:
10730
diff
changeset
|
237 |
c483912aaf70
add ValueProxy interface and infrastructure
Lukas Stadler <lukas.stadler@jku.at>
parents:
10730
diff
changeset
|
238 @Override |
15009
e49f62425090
introduce non-ValueNode Proxy interface
Lukas Stadler <lukas.stadler@oracle.com>
parents:
15002
diff
changeset
|
239 public ValueNode getOriginalNode() { |
10762
c483912aaf70
add ValueProxy interface and infrastructure
Lukas Stadler <lukas.stadler@jku.at>
parents:
10730
diff
changeset
|
240 return object; |
c483912aaf70
add ValueProxy interface and infrastructure
Lukas Stadler <lukas.stadler@jku.at>
parents:
10730
diff
changeset
|
241 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
242 } |