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. |
69 private final BasePhase<? super CoreProviders> postParsingPhase; |
69 private final BasePhase<? super CoreProviders> postParsingPhase; |
70 |
70 |
71 public CachingPEGraphDecoder(Architecture architecture, StructuredGraph graph, Providers providers, GraphBuilderConfiguration graphBuilderConfig, OptimisticOptimizations optimisticOpts, |
71 public CachingPEGraphDecoder(Architecture architecture, StructuredGraph graph, Providers providers, GraphBuilderConfiguration graphBuilderConfig, OptimisticOptimizations optimisticOpts, |
72 AllowAssumptions allowAssumptions, LoopExplosionPlugin loopExplosionPlugin, InvocationPlugins invocationPlugins, InlineInvokePlugin[] inlineInvokePlugins, |
72 AllowAssumptions allowAssumptions, LoopExplosionPlugin loopExplosionPlugin, InvocationPlugins invocationPlugins, InlineInvokePlugin[] inlineInvokePlugins, |
73 ParameterPlugin parameterPlugin, |
73 ParameterPlugin parameterPlugin, |
74 NodePlugin[] nodePlugins, ResolvedJavaMethod callInlinedMethod, SourceLanguagePositionProvider sourceLanguagePositionProvider, |
74 NodePlugin[] nodePlugins, ResolvedJavaMethod callInlinedMethod, ResolvedJavaMethod callInlinedAgnosticMethod, SourceLanguagePositionProvider sourceLanguagePositionProvider, |
75 BasePhase<? super CoreProviders> postParsingPhase) { |
75 BasePhase<? super CoreProviders> postParsingPhase, EconomicMap<ResolvedJavaMethod, EncodedGraph> graphCache) { |
76 super(architecture, graph, providers, loopExplosionPlugin, |
76 super(architecture, graph, providers, loopExplosionPlugin, |
77 invocationPlugins, inlineInvokePlugins, parameterPlugin, nodePlugins, callInlinedMethod, sourceLanguagePositionProvider); |
77 invocationPlugins, inlineInvokePlugins, parameterPlugin, nodePlugins, callInlinedMethod, callInlinedAgnosticMethod, sourceLanguagePositionProvider); |
78 |
78 |
79 this.providers = providers; |
79 this.providers = providers; |
80 this.graphBuilderConfig = graphBuilderConfig; |
80 this.graphBuilderConfig = graphBuilderConfig; |
81 this.optimisticOpts = optimisticOpts; |
81 this.optimisticOpts = optimisticOpts; |
82 this.allowAssumptions = allowAssumptions; |
82 this.allowAssumptions = allowAssumptions; |
|
83 this.graphCache = graphCache; |
83 this.postParsingPhase = postParsingPhase; |
84 this.postParsingPhase = postParsingPhase; |
84 this.graphCache = EconomicMap.create(); |
|
85 } |
85 } |
86 |
86 |
87 protected GraphBuilderPhase.Instance createGraphBuilderPhaseInstance(IntrinsicContext initialIntrinsicContext) { |
87 protected GraphBuilderPhase.Instance createGraphBuilderPhaseInstance(IntrinsicContext initialIntrinsicContext) { |
88 return new GraphBuilderPhase.Instance(providers, graphBuilderConfig, optimisticOpts, initialIntrinsicContext); |
88 return new GraphBuilderPhase.Instance(providers, graphBuilderConfig, optimisticOpts, initialIntrinsicContext); |
89 } |
89 } |