1 /* |
1 /* |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
299 * the plugins are run during the decoding process. If they aren't handled at this point |
299 * the plugins are run during the decoding process. If they aren't handled at this point |
300 * then they will never be handled. |
300 * then they will never be handled. |
301 */ |
301 */ |
302 @Override |
302 @Override |
303 public boolean canDeferPlugin(GeneratedInvocationPlugin plugin) { |
303 public boolean canDeferPlugin(GeneratedInvocationPlugin plugin) { |
304 return plugin.getSource().equals(Fold.class) || plugin.getSource().equals(Node.NodeIntrinsic.class); |
304 return plugin.isGeneratedFromFoldOrNodeIntrinsic(); |
305 } |
305 } |
306 |
306 |
307 @Override |
307 @Override |
308 public BailoutException bailout(String string) { |
308 public BailoutException bailout(String string) { |
309 BailoutException bailout = new PermanentBailoutException(string); |
309 BailoutException bailout = new PermanentBailoutException(string); |
583 private final ParameterPlugin parameterPlugin; |
583 private final ParameterPlugin parameterPlugin; |
584 private final NodePlugin[] nodePlugins; |
584 private final NodePlugin[] nodePlugins; |
585 private final EconomicMap<SpecialCallTargetCacheKey, Object> specialCallTargetCache; |
585 private final EconomicMap<SpecialCallTargetCacheKey, Object> specialCallTargetCache; |
586 private final EconomicMap<ResolvedJavaMethod, Object> invocationPluginCache; |
586 private final EconomicMap<ResolvedJavaMethod, Object> invocationPluginCache; |
587 private final ResolvedJavaMethod callInlinedMethod; |
587 private final ResolvedJavaMethod callInlinedMethod; |
|
588 private final ResolvedJavaMethod callInlinedAgnosticMethod; |
588 protected final SourceLanguagePositionProvider sourceLanguagePositionProvider; |
589 protected final SourceLanguagePositionProvider sourceLanguagePositionProvider; |
589 |
590 |
590 public PEGraphDecoder(Architecture architecture, StructuredGraph graph, CoreProviders providers, LoopExplosionPlugin loopExplosionPlugin, InvocationPlugins invocationPlugins, |
591 public PEGraphDecoder(Architecture architecture, StructuredGraph graph, CoreProviders providers, LoopExplosionPlugin loopExplosionPlugin, InvocationPlugins invocationPlugins, |
591 InlineInvokePlugin[] inlineInvokePlugins, |
592 InlineInvokePlugin[] inlineInvokePlugins, |
592 ParameterPlugin parameterPlugin, |
593 ParameterPlugin parameterPlugin, |
593 NodePlugin[] nodePlugins, ResolvedJavaMethod callInlinedMethod, SourceLanguagePositionProvider sourceLanguagePositionProvider) { |
594 NodePlugin[] nodePlugins, ResolvedJavaMethod callInlinedMethod, ResolvedJavaMethod callInlinedAgnosticMethod, SourceLanguagePositionProvider sourceLanguagePositionProvider) { |
594 super(architecture, graph, providers, true); |
595 super(architecture, graph, providers, true); |
595 this.loopExplosionPlugin = loopExplosionPlugin; |
596 this.loopExplosionPlugin = loopExplosionPlugin; |
596 this.invocationPlugins = invocationPlugins; |
597 this.invocationPlugins = invocationPlugins; |
597 this.inlineInvokePlugins = inlineInvokePlugins; |
598 this.inlineInvokePlugins = inlineInvokePlugins; |
598 this.parameterPlugin = parameterPlugin; |
599 this.parameterPlugin = parameterPlugin; |
599 this.nodePlugins = nodePlugins; |
600 this.nodePlugins = nodePlugins; |
|
601 this.callInlinedAgnosticMethod = callInlinedAgnosticMethod; |
600 this.specialCallTargetCache = EconomicMap.create(Equivalence.DEFAULT); |
602 this.specialCallTargetCache = EconomicMap.create(Equivalence.DEFAULT); |
601 this.invocationPluginCache = EconomicMap.create(Equivalence.DEFAULT); |
603 this.invocationPluginCache = EconomicMap.create(Equivalence.DEFAULT); |
602 this.callInlinedMethod = callInlinedMethod; |
604 this.callInlinedMethod = callInlinedMethod; |
603 this.sourceLanguagePositionProvider = sourceLanguagePositionProvider; |
605 this.sourceLanguagePositionProvider = sourceLanguagePositionProvider; |
604 } |
606 } |