Mercurial > hg > graal-compiler
changeset 19196:75cf0899be47
Use serializable interface in DerivedOptionValue.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Tue, 10 Feb 2015 13:08:40 +0100 |
parents | fb1ee63d5b7b |
children | c75f5c9c8b6b |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java graal/com.oracle.graal.options/src/com/oracle/graal/options/DerivedOptionValue.java |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java Tue Feb 10 13:08:31 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java Tue Feb 10 13:08:40 2015 +0100 @@ -24,8 +24,6 @@ import static com.oracle.graal.compiler.common.GraalOptions.*; -import java.util.function.*; - import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.common.*; import com.oracle.graal.hotspot.*; @@ -35,13 +33,16 @@ import com.oracle.graal.java.GraphBuilderConfiguration.DebugInfoMode; import com.oracle.graal.java.GraphBuilderPlugins.InlineInvokePlugin; import com.oracle.graal.options.*; +import com.oracle.graal.options.DerivedOptionValue.OptionSupplier; import com.oracle.graal.phases.*; import com.oracle.graal.phases.tiers.*; /** * HotSpot implementation of {@link SuitesProvider}. */ -public class HotSpotSuitesProvider implements SuitesProvider, Supplier<Suites> { +public class HotSpotSuitesProvider implements SuitesProvider, OptionSupplier<Suites> { + + private static final long serialVersionUID = -5755004498526945687L; protected final DerivedOptionValue<Suites> defaultSuites; protected final PhaseSuite<HighTierContext> defaultGraphBuilderSuite;
--- a/graal/com.oracle.graal.options/src/com/oracle/graal/options/DerivedOptionValue.java Tue Feb 10 13:08:31 2015 +0100 +++ b/graal/com.oracle.graal.options/src/com/oracle/graal/options/DerivedOptionValue.java Tue Feb 10 13:08:40 2015 +0100 @@ -22,6 +22,7 @@ */ package com.oracle.graal.options; +import java.io.*; import java.util.function.*; import com.oracle.graal.options.OptionValue.OverrideScope; @@ -31,10 +32,13 @@ */ public class DerivedOptionValue<T> { + public interface OptionSupplier<T> extends Supplier<T>, Serializable { + } + private final T initialValue; - private final Supplier<T> supplier; + private final OptionSupplier<T> supplier; - public DerivedOptionValue(Supplier<T> supplier) { + public DerivedOptionValue(OptionSupplier<T> supplier) { this.supplier = supplier; assert OptionValue.getOverrideScope() == null : "derived option value should be initialized outside any override scope"; this.initialValue = createValue();