# HG changeset patch # User Roland Schatz # Date 1423570120 -3600 # Node ID 75cf0899be479b68c443a6221e7462d345e7e209 # Parent fb1ee63d5b7be2f74ab6615eab6936f0d9e96ec7 Use serializable interface in DerivedOptionValue. diff -r fb1ee63d5b7b -r 75cf0899be47 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java --- 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 { +public class HotSpotSuitesProvider implements SuitesProvider, OptionSupplier { + + private static final long serialVersionUID = -5755004498526945687L; protected final DerivedOptionValue defaultSuites; protected final PhaseSuite defaultGraphBuilderSuite; diff -r fb1ee63d5b7b -r 75cf0899be47 graal/com.oracle.graal.options/src/com/oracle/graal/options/DerivedOptionValue.java --- 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 { + public interface OptionSupplier extends Supplier, Serializable { + } + private final T initialValue; - private final Supplier supplier; + private final OptionSupplier supplier; - public DerivedOptionValue(Supplier supplier) { + public DerivedOptionValue(OptionSupplier supplier) { this.supplier = supplier; assert OptionValue.getOverrideScope() == null : "derived option value should be initialized outside any override scope"; this.initialValue = createValue();