Mercurial > hg > truffle
annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java @ 11881:da9db8331658
moved Canonicalizable and Simplifiable to the com.oracle.graal.graph project (GRAAL-506)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 01 Oct 2013 20:38:25 +0200 |
parents | 9a747d8e0d0f |
children | 23ccaa863eda |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
8913
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
2 * Copyright (c) 2013, 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) { |
8913
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
54 tool.getRuntime().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) { |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
61 tool.replaceWithValue(state.getEntry(0)); |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
62 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 @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
|
66 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
|
67 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
|
68 Constant constant = value.asConstant(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 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
|
70 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
|
71 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
|
72 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
|
73 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
|
74 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
|
75 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
|
76 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
|
77 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
|
78 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
|
79 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
|
80 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
|
81 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
|
82 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
|
83 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
|
84 case Float: |
9528
2c540cdf4af9
Fix casts in UnboxNode.
Andreas Woess <andreas.woess@jku.at>
parents:
9251
diff
changeset
|
85 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
|
86 case Double: |
9528
2c540cdf4af9
Fix casts in UnboxNode.
Andreas Woess <andreas.woess@jku.at>
parents:
9251
diff
changeset
|
87 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
|
88 default: |
5547
b6617d13ea44
Dropping Ci* prefixes. Some additional renamings in the api.code interface.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5541
diff
changeset
|
89 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
|
90 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
91 } |
8913
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
92 } else if (value instanceof BoxNode) { |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
93 return ((BoxNode) value).getValue(); |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
94 } |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
95 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
|
96 return null; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
97 } |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
98 return this; |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
99 } |
8913
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
100 |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
101 @NodeIntrinsic |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
102 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
|
103 |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
104 @NodeIntrinsic |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
105 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
|
106 |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
107 @NodeIntrinsic |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
108 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
|
109 |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
110 @NodeIntrinsic |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
111 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
|
112 |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
113 @NodeIntrinsic |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
114 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
|
115 |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
116 @NodeIntrinsic |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
117 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
|
118 |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
119 @NodeIntrinsic |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
120 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
|
121 |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
122 @NodeIntrinsic |
653110156f8a
refactored boxing identification and lowering, removed BoxingMethodPool and explicit boxing phases
Lukas Stadler <lukas.stadler@jku.at>
parents:
7660
diff
changeset
|
123 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
|
124 } |