Skip to content

Commit

Permalink
Cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrodriguez committed Feb 14, 2022
1 parent 3e7b4fe commit 604d98e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ public static boolean snippetsAreEncoded() {
return encodedSnippets != null;
}

public static void maybeEncodeSnippets(OptionValues options) {
if (!IS_IN_NATIVE_IMAGE && snippetEncoder != null) {
snippetEncoder.encode(options);
}
}

public void clearSnippetParameterNames() {
assert snippetEncoder != null;
snippetEncoder.clearSnippetParameterNames();
Expand All @@ -202,8 +196,6 @@ public boolean encode(OptionValues options) {
public StructuredGraph getSnippet(ResolvedJavaMethod method, ResolvedJavaMethod original, Object[] args, BitSet nonNullParameters, boolean trackNodeSourcePosition,
NodeSourcePosition replaceePosition, OptionValues options) {
if (IS_IN_NATIVE_IMAGE) {
maybeEncodeSnippets(options);

// Snippets graphs can contain foreign object references and
// outlive a single compilation.
try (CompilationContext scope = HotSpotGraalServices.enterGlobalCompilationContext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ synchronized void registerConditionalPlugin(InvocationPlugin plugin) {
conditionalPlugins.add(plugin);
}

@SuppressWarnings("try")
private StructuredGraph buildGraph(ResolvedJavaMethod method, ResolvedJavaMethod original, Object receiver, BitSet nonNullParameters,
boolean trackNodeSourcePosition, OptionValues options, ReplacementsImpl snippetReplacements) {
assert method.hasBytecodes() : "Snippet must not be abstract or native";
Expand Down

0 comments on commit 604d98e

Please sign in to comment.