annotate graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderContext.java @ 19854:4178f9830a27

Assign the state after when appending the node and not automatically in the main graph builder loop.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 14 Mar 2015 19:15:51 +0100
parents 93b74f0db076
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19050
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 package com.oracle.graal.java;
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
25 import com.oracle.graal.api.code.*;
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
26 import com.oracle.graal.api.meta.*;
19241
30c8d110b281 More Truffle graph builder plugins and parse time canonicalizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19178
diff changeset
27 import com.oracle.graal.api.replacements.*;
19050
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
28 import com.oracle.graal.nodes.*;
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29 import com.oracle.graal.nodes.calc.*;
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 import com.oracle.graal.nodes.spi.*;
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
32 /**
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
33 * Used by a {@link GraphBuilderPlugin} to interface with a graph builder object.
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
34 */
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
35 public interface GraphBuilderContext {
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
36
19811
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
37 /**
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
38 * Information about a snippet or method substitution currently being processed by the graph
19839
93b74f0db076 don't treat Truffle method inlining substitutions as graph builder replacements
Doug Simon <doug.simon@oracle.com>
parents: 19811
diff changeset
39 * builder. When in the scope of a replacement, the graph builder does not check the value kinds
93b74f0db076 don't treat Truffle method inlining substitutions as graph builder replacements
Doug Simon <doug.simon@oracle.com>
parents: 19811
diff changeset
40 * flowing through the JVM state since replacements can employ non-Java kinds to represent
93b74f0db076 don't treat Truffle method inlining substitutions as graph builder replacements
Doug Simon <doug.simon@oracle.com>
parents: 19811
diff changeset
41 * values such as raw machine words and pointers.
19811
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
42 */
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
43 public interface Replacement {
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
44
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
45 /**
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
46 * Gets the method being replaced.
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
47 */
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
48 ResolvedJavaMethod getOriginalMethod();
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
49
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
50 /**
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
51 * Gets the replacement method.
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
52 */
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
53 ResolvedJavaMethod getReplacementMethod();
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
54
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
55 /**
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
56 * Determines if this replacement is being inlined as a compiler intrinsic. A compiler
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
57 * intrinsic is atomic with respect to deoptimization. Deoptimization within a compiler
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
58 * intrinsic will restart the interpreter at the intrinsified call.
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
59 */
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
60 boolean isIntrinsic();
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
61 }
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
62
19050
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
63 <T extends ControlSinkNode> T append(T fixed);
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
64
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
65 <T extends ControlSplitNode> T append(T fixed);
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
66
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
67 <T extends FixedWithNextNode> T append(T fixed);
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
68
19155
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
69 <T extends FloatingNode> T append(T value);
19050
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
70
19241
30c8d110b281 More Truffle graph builder plugins and parse time canonicalizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19178
diff changeset
71 <T extends ValueNode> T append(T value);
30c8d110b281 More Truffle graph builder plugins and parse time canonicalizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19178
diff changeset
72
19050
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
73 StampProvider getStampProvider();
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
74
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
75 MetaAccessProvider getMetaAccess();
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
76
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
77 Assumptions getAssumptions();
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
78
19178
c8091ec0fdc0 added graph builder plugins for FrameWithoutBoxing
Doug Simon <doug.simon@oracle.com>
parents: 19167
diff changeset
79 ConstantReflectionProvider getConstantReflection();
c8091ec0fdc0 added graph builder plugins for FrameWithoutBoxing
Doug Simon <doug.simon@oracle.com>
parents: 19167
diff changeset
80
19241
30c8d110b281 More Truffle graph builder plugins and parse time canonicalizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19178
diff changeset
81 SnippetReflectionProvider getSnippetReflection();
30c8d110b281 More Truffle graph builder plugins and parse time canonicalizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19178
diff changeset
82
19050
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
83 void push(Kind kind, ValueNode value);
19155
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
84
19496
9525e4d5b385 disable (asserting) type checks in the FrameStateBuilder when parsing a replacement
Doug Simon <doug.simon@oracle.com>
parents: 19409
diff changeset
85 StructuredGraph getGraph();
9525e4d5b385 disable (asserting) type checks in the FrameStateBuilder when parsing a replacement
Doug Simon <doug.simon@oracle.com>
parents: 19409
diff changeset
86
19854
4178f9830a27 Assign the state after when appending the node and not automatically in the main graph builder loop.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19839
diff changeset
87 FrameState createStateAfter();
4178f9830a27 Assign the state after when appending the node and not automatically in the main graph builder loop.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19839
diff changeset
88
19155
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
89 /**
19776
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
90 * Gets the parsing context for the method that inlines the method being parsed by this context.
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
91 */
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
92 GraphBuilderContext getParent();
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
93
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
94 /**
19791
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
95 * Gets the root method for the graph building process.
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
96 */
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
97 ResolvedJavaMethod getRootMethod();
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
98
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
99 /**
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
100 * Gets the method currently being parsed.
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
101 */
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
102 ResolvedJavaMethod getMethod();
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
103
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
104 /**
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
105 * Gets the index of the bytecode instruction currently being parsed.
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
106 */
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
107 int bci();
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
108
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
109 /**
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
110 * Gets the inline depth of this context. 0 implies this is the context for the
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
111 * {@linkplain #getRootMethod() root method}.
19776
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
112 */
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
113 int getDepth();
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
114
16ad9711b44f always inline intrinsics in the graph builder as well as any methods (recursively) called from an instrinsic
Doug Simon <doug.simon@oracle.com>
parents: 19496
diff changeset
115 /**
19791
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
116 * Determines if the current parsing context is a snippet or method substitution.
19409
1307b475f10d added BytecodeParser.parsingReplacement field to distinguish parsing method replacements (or snippets) from normal method parsing
Doug Simon <doug.simon@oracle.com>
parents: 19241
diff changeset
117 */
19811
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
118 default boolean parsingReplacement() {
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
119 return getReplacement() == null;
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
120 }
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
121
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
122 /**
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
123 * Gets the replacement of the current parsing context or {@code null} if not
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
124 * {@link #parsingReplacement() parsing a replacement}.
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
125 */
1e27e31aca11 fixed bug in managing replacement scope during bytecode parsing and improved API for querying replacement info from graph builder plugins
Doug Simon <doug.simon@oracle.com>
parents: 19791
diff changeset
126 Replacement getReplacement();
19409
1307b475f10d added BytecodeParser.parsingReplacement field to distinguish parsing method replacements (or snippets) from normal method parsing
Doug Simon <doug.simon@oracle.com>
parents: 19241
diff changeset
127
1307b475f10d added BytecodeParser.parsingReplacement field to distinguish parsing method replacements (or snippets) from normal method parsing
Doug Simon <doug.simon@oracle.com>
parents: 19241
diff changeset
128 /**
19167
ce23018b970a rename: makeNonNull -> nullCheckedValue
Doug Simon <doug.simon@oracle.com>
parents: 19155
diff changeset
129 * @see GuardingPiNode#nullCheckedValue(ValueNode)
19155
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
130 */
19167
ce23018b970a rename: makeNonNull -> nullCheckedValue
Doug Simon <doug.simon@oracle.com>
parents: 19155
diff changeset
131 static ValueNode nullCheckedValue(GraphBuilderContext builder, ValueNode value) {
ce23018b970a rename: makeNonNull -> nullCheckedValue
Doug Simon <doug.simon@oracle.com>
parents: 19155
diff changeset
132 ValueNode nonNullValue = GuardingPiNode.nullCheckedValue(value);
19155
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
133 if (nonNullValue != value) {
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
134 builder.append((FixedWithNextNode) nonNullValue);
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
135 }
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
136 return nonNullValue;
ac9ad302e12f added utility to GraphBuilderContext for generating a receiver null check from within an InvocationPlugin for a non-static method
Doug Simon <doug.simon@oracle.com>
parents: 19050
diff changeset
137 }
19496
9525e4d5b385 disable (asserting) type checks in the FrameStateBuilder when parsing a replacement
Doug Simon <doug.simon@oracle.com>
parents: 19409
diff changeset
138
19791
14e703edb2ab use GraphBuilderPlugins for method substitutions, intrinsics and snippets (GRAAL-982)
Doug Simon <doug.simon@oracle.com>
parents: 19783
diff changeset
139 boolean eagerResolving();
19521
9c4168877444 Create CompilerAsserts tests. Add graph builder context on bailout. Consolidate CompilerAsserts Truffle API class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19496
diff changeset
140
9c4168877444 Create CompilerAsserts tests. Add graph builder context on bailout. Consolidate CompilerAsserts Truffle API class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 19496
diff changeset
141 BailoutException bailout(String string);
19050
75da87c96605 initial commit of GraphBuilderPhase plugins
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
142 }