annotate graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/ForeignCallNode.java @ 10090:ae6f0c381087

split MemoryCheckpoint interface into Single and Multi
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 19 Jun 2013 16:42:56 +0200
parents 3d09efebcc8e
children 51b8585a1d70
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 /*
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
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
9734
1313dd590c62 made RuntimeCallNode no longer be a StateSplit; for runtime calls that are state splits, the new RuntimeCallStateSplitNode class should be used
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
25 import com.oracle.graal.api.code.*;
7300
2912b72d840a More complete and reusable Word type
Christian Wimmer <christian.wimmer@oracle.com>
parents: 7144
diff changeset
26 import com.oracle.graal.api.meta.*;
5814
d241f8b2e6f9 Adapt the coloring filter for binary dumped graphs
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 5580
diff changeset
27 import com.oracle.graal.graph.*;
5060
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
28 import com.oracle.graal.nodes.*;
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
29 import com.oracle.graal.nodes.spi.*;
4ed4295ce15f Update import statements.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 5059
diff changeset
30 import com.oracle.graal.nodes.type.*;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
31
9738
857632c8086a renamed: RuntimeCallNode -> ForeignCallNode, RuntimeCallStateSplitNode -> ForeignCallStateSplitNode
Doug Simon <doug.simon@oracle.com>
parents: 9736
diff changeset
32 /**
857632c8086a renamed: RuntimeCallNode -> ForeignCallNode, RuntimeCallStateSplitNode -> ForeignCallStateSplitNode
Doug Simon <doug.simon@oracle.com>
parents: 9736
diff changeset
33 * Node for a {@linkplain ForeignCallDescriptor foreign} call.
857632c8086a renamed: RuntimeCallNode -> ForeignCallNode, RuntimeCallStateSplitNode -> ForeignCallStateSplitNode
Doug Simon <doug.simon@oracle.com>
parents: 9736
diff changeset
34 */
857632c8086a renamed: RuntimeCallNode -> ForeignCallNode, RuntimeCallStateSplitNode -> ForeignCallStateSplitNode
Doug Simon <doug.simon@oracle.com>
parents: 9736
diff changeset
35 @NodeInfo(nameTemplate = "ForeignCall#{p#descriptor/s}")
10090
ae6f0c381087 split MemoryCheckpoint interface into Single and Multi
Lukas Stadler <lukas.stadler@jku.at>
parents: 9946
diff changeset
36 public class ForeignCallNode extends AbstractStateSplit implements LIRLowerable, DeoptimizingNode, MemoryCheckpoint.Multi {
9734
1313dd590c62 made RuntimeCallNode no longer be a StateSplit; for runtime calls that are state splits, the new RuntimeCallStateSplitNode class should be used
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
37
1313dd590c62 made RuntimeCallNode no longer be a StateSplit; for runtime calls that are state splits, the new RuntimeCallStateSplitNode class should be used
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
38 @Input private final NodeInputList<ValueNode> arguments;
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
39 private final MetaAccessProvider runtime;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
40 @Input private FrameState deoptState;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
41
9735
2e4f035186cf rename: Descriptor -> ForeignCallDescriptor
Doug Simon <doug.simon@oracle.com>
parents: 9734
diff changeset
42 private final ForeignCallDescriptor descriptor;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
43
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
44 public ForeignCallNode(MetaAccessProvider runtime, ForeignCallDescriptor descriptor, ValueNode... arguments) {
9734
1313dd590c62 made RuntimeCallNode no longer be a StateSplit; for runtime calls that are state splits, the new RuntimeCallStateSplitNode class should be used
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
45 super(StampFactory.forKind(Kind.fromJavaClass(descriptor.getResultType())));
1313dd590c62 made RuntimeCallNode no longer be a StateSplit; for runtime calls that are state splits, the new RuntimeCallStateSplitNode class should be used
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
46 this.arguments = new NodeInputList<>(this, arguments);
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents: 6458
diff changeset
47 this.descriptor = descriptor;
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
48 this.runtime = runtime;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
49 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
50
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
51 protected ForeignCallNode(MetaAccessProvider runtime, ForeignCallDescriptor descriptor, Stamp stamp) {
9747
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
52 super(stamp);
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
53 this.arguments = new NodeInputList<>(this);
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
54 this.descriptor = descriptor;
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
55 this.runtime = runtime;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
56 }
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
57
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
58 @Override
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
59 public boolean hasSideEffect() {
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
60 return !runtime.isReexecutable(descriptor);
9747
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
61 }
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
62
9735
2e4f035186cf rename: Descriptor -> ForeignCallDescriptor
Doug Simon <doug.simon@oracle.com>
parents: 9734
diff changeset
63 public ForeignCallDescriptor getDescriptor() {
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents: 6458
diff changeset
64 return descriptor;
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
65 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
66
7864
b66a826acf4b add location identity to MemoryCheckpoint and let WriteNode implement MemoryCheckpoint
Lukas Stadler <lukas.stadler@jku.at>
parents: 7300
diff changeset
67 @Override
9745
b9c5ce8d552d ForeignCallNode kills all memory locations
Doug Simon <doug.simon@oracle.com>
parents: 9741
diff changeset
68 public LocationIdentity[] getLocationIdentities() {
9823
9e6b6d5d6465 rename: getKilledLocationIdentities -> getKilledLocations
Doug Simon <doug.simon@oracle.com>
parents: 9819
diff changeset
69 return runtime.getKilledLocations(descriptor);
9745
b9c5ce8d552d ForeignCallNode kills all memory locations
Doug Simon <doug.simon@oracle.com>
parents: 9741
diff changeset
70 }
b9c5ce8d552d ForeignCallNode kills all memory locations
Doug Simon <doug.simon@oracle.com>
parents: 9741
diff changeset
71
9747
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
72 protected Value[] operands(LIRGeneratorTool gen) {
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
73 Value[] operands = new Value[arguments.size()];
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
74 for (int i = 0; i < operands.length; i++) {
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
75 operands[i] = gen.operand(arguments.get(i));
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
76 }
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
77 return operands;
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
78 }
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
79
9745
b9c5ce8d552d ForeignCallNode kills all memory locations
Doug Simon <doug.simon@oracle.com>
parents: 9741
diff changeset
80 @Override
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
81 public void generate(LIRGeneratorTool gen) {
9739
4cd4926ec683 rename: RuntimeCallTarget -> ForeignCallLinkage
Doug Simon <doug.simon@oracle.com>
parents: 9738
diff changeset
82 ForeignCallLinkage linkage = gen.getRuntime().lookupForeignCall(descriptor);
9747
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
83 Value[] operands = operands(gen);
8e5461c4c82e replaced NewMultiArrayStub use of ForeignCallStub
Doug Simon <doug.simon@oracle.com>
parents: 9745
diff changeset
84 Value result = gen.emitForeignCall(linkage, this, operands);
9734
1313dd590c62 made RuntimeCallNode no longer be a StateSplit; for runtime calls that are state splits, the new RuntimeCallStateSplitNode class should be used
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
85 if (result != null) {
1313dd590c62 made RuntimeCallNode no longer be a StateSplit; for runtime calls that are state splits, the new RuntimeCallStateSplitNode class should be used
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
86 gen.setResult(this, result);
1313dd590c62 made RuntimeCallNode no longer be a StateSplit; for runtime calls that are state splits, the new RuntimeCallStateSplitNode class should be used
Doug Simon <doug.simon@oracle.com>
parents: 9526
diff changeset
87 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
88 }
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
89
5579
8e6622e1fb7e renamed node intrinsic methods in RuntimeCallNode to better distinguish return type
Doug Simon <doug.simon@oracle.com>
parents: 5547
diff changeset
90 @Override
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
91 public FrameState getDeoptimizationState() {
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
92 if (deoptState != null) {
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
93 return deoptState;
9881
7779b1d5ba37 don't synthesize a deoptState in ForeignCallNode is canDeoptimize == false
Lukas Stadler <lukas.stadler@jku.at>
parents: 9823
diff changeset
94 } else if (stateAfter() != null && canDeoptimize()) {
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
95 FrameState stateDuring = stateAfter();
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
96 if ((stateDuring.stackSize() > 0 && stateDuring.stackAt(stateDuring.stackSize() - 1) == this) || (stateDuring.stackSize() > 1 && stateDuring.stackAt(stateDuring.stackSize() - 2) == this)) {
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
97 stateDuring = stateDuring.duplicateModified(stateDuring.bci, stateDuring.rethrowException(), this.kind());
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
98 }
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
99 setDeoptimizationState(stateDuring);
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
100 return stateDuring;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
101 }
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
102 return null;
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
103 }
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
104
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
105 @Override
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
106 public void setDeoptimizationState(FrameState f) {
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
107 updateUsages(deoptState, f);
9946
3d09efebcc8e do not assign FrameStates to ForeignCallNodes that have no side effect and cannot deoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9881
diff changeset
108 assert deoptState == null && canDeoptimize() : "shouldn't assign deoptState to " + this;
3d09efebcc8e do not assign FrameStates to ForeignCallNodes that have no side effect and cannot deoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9881
diff changeset
109 deoptState = f;
3d09efebcc8e do not assign FrameStates to ForeignCallNodes that have no side effect and cannot deoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9881
diff changeset
110 }
3d09efebcc8e do not assign FrameStates to ForeignCallNodes that have no side effect and cannot deoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9881
diff changeset
111
3d09efebcc8e do not assign FrameStates to ForeignCallNodes that have no side effect and cannot deoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9881
diff changeset
112 @Override
3d09efebcc8e do not assign FrameStates to ForeignCallNodes that have no side effect and cannot deoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9881
diff changeset
113 public void setStateAfter(FrameState x) {
3d09efebcc8e do not assign FrameStates to ForeignCallNodes that have no side effect and cannot deoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9881
diff changeset
114 if (hasSideEffect() || canDeoptimize()) {
3d09efebcc8e do not assign FrameStates to ForeignCallNodes that have no side effect and cannot deoptimize
Lukas Stadler <lukas.stadler@jku.at>
parents: 9881
diff changeset
115 super.setStateAfter(x);
9793
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
116 }
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
117 }
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
118
b4f12c603be5 added support for the runtime to specify for each foreign call whether it is re-executable and what memory locations it kills
Doug Simon <doug.simon@oracle.com>
parents: 9792
diff changeset
119 @Override
5579
8e6622e1fb7e renamed node intrinsic methods in RuntimeCallNode to better distinguish return type
Doug Simon <doug.simon@oracle.com>
parents: 5547
diff changeset
120 public String toString(Verbosity verbosity) {
8e6622e1fb7e renamed node intrinsic methods in RuntimeCallNode to better distinguish return type
Doug Simon <doug.simon@oracle.com>
parents: 5547
diff changeset
121 if (verbosity == Verbosity.Name) {
6521
2a0c9f20baa1 consolidated framework for runtime and stub calls and moved declaration of descriptors for such calls to the source file in which they are used
Doug Simon <doug.simon@oracle.com>
parents: 6458
diff changeset
122 return super.toString(verbosity) + "#" + descriptor;
5579
8e6622e1fb7e renamed node intrinsic methods in RuntimeCallNode to better distinguish return type
Doug Simon <doug.simon@oracle.com>
parents: 5547
diff changeset
123 }
8e6622e1fb7e renamed node intrinsic methods in RuntimeCallNode to better distinguish return type
Doug Simon <doug.simon@oracle.com>
parents: 5547
diff changeset
124 return super.toString(verbosity);
8e6622e1fb7e renamed node intrinsic methods in RuntimeCallNode to better distinguish return type
Doug Simon <doug.simon@oracle.com>
parents: 5547
diff changeset
125 }
8892
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
126
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
127 @Override
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
128 public boolean canDeoptimize() {
9819
8aea948c522b added support for the runtime to specify for each foreign call whether deoptimization can occur during the call
Doug Simon <doug.simon@oracle.com>
parents: 9794
diff changeset
129 return runtime.canDeoptimize(descriptor);
8892
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
130 }
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
131
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
132 @Override
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
133 public DeoptimizationReason getDeoptimizationReason() {
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
134 return null;
2c0c708a0ad6 Introduce DeoptimizingNode interface
Gilles Duboscq <duboscq@ssw.jku.at>
parents: 8394
diff changeset
135 }
3733
e233f5660da4 Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff changeset
136 }