annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java @ 14085:af84c0b2e74f

Don't remove UnboxNode if the incoming type is wrong.
author Roland Schatz <roland.schatz@oracle.com>
date Thu, 06 Mar 2014 10:40:00 +0100
parents 0fc653a9e019
children fd7fcd2d2072
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
1 /*
14085
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
2 * Copyright (c) 2013, 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.extended;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
24
5507
dc71b06d09f8 Moving classes from cri.ri to api.meta.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5504
diff changeset
25 import com.oracle.graal.api.meta.*;
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: 11579
diff changeset
26 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
27 import com.oracle.graal.graph.spi.*;
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
28 import com.oracle.graal.nodes.*;
10569
6b9ebfcf5fc5 make BoxNode and UnboxNode floating
Lukas Stadler <lukas.stadler@jku.at>
parents: 9528
diff changeset
29 import com.oracle.graal.nodes.calc.*;
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
30 import com.oracle.graal.nodes.spi.*;
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
31 import com.oracle.graal.nodes.type.*;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
32
10569
6b9ebfcf5fc5 make BoxNode and UnboxNode floating
Lukas Stadler <lukas.stadler@jku.at>
parents: 9528
diff changeset
33 public class UnboxNode extends FloatingNode implements Virtualizable, Lowerable, Canonicalizable {
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
34
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
35 @Input private ValueNode value;
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
36 private final Kind boxingKind;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
37
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
38 public UnboxNode(ValueNode value, Kind boxingKind) {
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
39 super(StampFactory.forKind(boxingKind.getStackKind()));
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
40 this.value = value;
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
41 this.boxingKind = boxingKind;
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
42 }
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
43
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
44 public Kind getBoxingKind() {
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
45 return boxingKind;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
46 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
47
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
48 public ValueNode getValue() {
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
49 return value;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
50 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
51
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
52 @Override
11579
ae619d70bf4b Rename LoweringType to GuardsPhase and make it an attribute of StructuredGraphs
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 10569
diff changeset
53 public void lower(LoweringTool tool) {
12045
0fc653a9e019 made GraalCodeCacheProvider independent of CodeCacheProvider and renamed the former to LoweringProvider (GRAAL-511)
Doug Simon <doug.simon@oracle.com>
parents: 11959
diff changeset
54 tool.getLowerer().lower(this, tool);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
55 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
56
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
57 @Override
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
58 public void virtualize(VirtualizerTool tool) {
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
59 State state = tool.getObjectState(value);
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
60 if (state != null && state.getState() == EscapeState.Virtual) {
14085
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
61 ResolvedJavaType objectType = state.getVirtualObject().type();
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
62 ResolvedJavaType expectedType = tool.getMetaAccessProvider().lookupJavaType(boxingKind.toBoxedJavaClass());
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
63 if (objectType == expectedType) {
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
64 tool.replaceWithValue(state.getEntry(0));
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
65 }
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
66 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
67 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
68
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
69 @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: 11579
diff changeset
70 public Node canonical(CanonicalizerTool tool) {
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
71 if (value.isConstant()) {
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
72 Constant constant = value.asConstant();
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
73 Object o = constant.asObject();
4549
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
74 if (o != null) {
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
75 switch (boxingKind) {
4549
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
76 case Boolean:
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
77 return ConstantNode.forBoolean((Boolean) o, graph());
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
78 case Byte:
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
79 return ConstantNode.forByte((Byte) o, graph());
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
80 case Char:
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
81 return ConstantNode.forChar((Character) o, graph());
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
82 case Short:
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
83 return ConstantNode.forShort((Short) o, graph());
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
84 case Int:
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
85 return ConstantNode.forInt((Integer) o, graph());
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
86 case Long:
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
87 return ConstantNode.forLong((Long) o, graph());
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
88 case Float:
9528
2c540cdf4af9 Fix casts in UnboxNode.
Andreas Woess <andreas.woess@jku.at>
parents: 9251
diff changeset
89 return ConstantNode.forFloat((Float) o, graph());
4549
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
90 case Double:
9528
2c540cdf4af9 Fix casts in UnboxNode.
Andreas Woess <andreas.woess@jku.at>
parents: 9251
diff changeset
91 return ConstantNode.forDouble((Double) o, graph());
4549
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
92 default:
5547
b6617d13ea44 Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5541
diff changeset
93 ValueNodeUtil.shouldNotReachHere();
4549
2bab0e314b5c Fixed a bug in the canonicalizer of the UnboxNode (brought up by Truffle).
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4309
diff changeset
94 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
95 }
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
96 } else if (value instanceof BoxNode) {
14085
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
97 BoxNode box = (BoxNode) value;
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
98 if (boxingKind == box.getBoxingKind()) {
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
99 return box.getValue();
af84c0b2e74f Don't remove UnboxNode if the incoming type is wrong.
Roland Schatz <roland.schatz@oracle.com>
parents: 12045
diff changeset
100 }
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
101 }
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
102 if (usages().isEmpty()) {
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
103 return null;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
104 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
105 return this;
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
106 }
8913
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
107
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
108 @NodeIntrinsic
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
109 public static native boolean unbox(Boolean value, @ConstantNodeParameter Kind kind);
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
110
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
111 @NodeIntrinsic
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
112 public static native byte unbox(Byte value, @ConstantNodeParameter Kind kind);
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
113
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
114 @NodeIntrinsic
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
115 public static native char unbox(Character value, @ConstantNodeParameter Kind kind);
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
116
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
117 @NodeIntrinsic
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
118 public static native double unbox(Double value, @ConstantNodeParameter Kind kind);
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
119
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
120 @NodeIntrinsic
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
121 public static native float unbox(Float value, @ConstantNodeParameter Kind kind);
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
122
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
123 @NodeIntrinsic
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
124 public static native int unbox(Integer value, @ConstantNodeParameter Kind kind);
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
125
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
126 @NodeIntrinsic
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
127 public static native long unbox(Long value, @ConstantNodeParameter Kind kind);
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
128
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
129 @NodeIntrinsic
653110156f8a refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents: 7660
diff changeset
130 public static native short unbox(Short value, @ConstantNodeParameter Kind kind);
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
131 }