changeset 22707:c839b1d02d89

work around for Eclipse bug 477597
author Doug Simon <doug.simon@oracle.com>
date Fri, 25 Sep 2015 17:19:26 +0200
parents 8c20b80554d3
children de3835098c21
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompilerOptions.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippetsOptions.java
diffstat 4 files changed, 85 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Fri Sep 25 15:49:10 2015 -0700
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java	Fri Sep 25 17:19:26 2015 +0200
@@ -22,7 +22,7 @@
  */
 package com.oracle.graal.compiler;
 
-import static com.oracle.graal.compiler.GraalCompiler.Options.EmitLIRRepeatCount;
+import static com.oracle.graal.compiler.GraalCompilerOptions.EmitLIRRepeatCount;
 import static com.oracle.graal.compiler.common.GraalOptions.RegisterPressure;
 import static com.oracle.graal.compiler.common.alloc.RegisterAllocationConfig.ALL_REGISTERS;
 import static com.oracle.graal.phases.common.DeadCodeEliminationPhase.Optionality.Optional;
@@ -44,8 +44,6 @@
 import jdk.internal.jvmci.meta.ResolvedJavaMethod;
 import jdk.internal.jvmci.meta.TriState;
 import jdk.internal.jvmci.meta.VMConstant;
-import jdk.internal.jvmci.options.Option;
-import jdk.internal.jvmci.options.OptionType;
 import jdk.internal.jvmci.options.OptionValue;
 import jdk.internal.jvmci.options.OptionValue.OverrideScope;
 
@@ -95,15 +93,6 @@
     private static final DebugTimer EmitLIR = Debug.timer("EmitLIR");
     private static final DebugTimer EmitCode = Debug.timer("EmitCode");
 
-    static class Options {
-
-        // @formatter:off
-        @Option(help = "Repeatedly run the LIR code generation pass to improve statistical profiling results.", type = OptionType.Debug)
-        public static final OptionValue<Integer> EmitLIRRepeatCount = new OptionValue<>(0);
-        // @formatter:on
-
-    }
-
     /**
      * Encapsulates all the inputs to a {@linkplain GraalCompiler#compile(Request) compilation}.
      */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompilerOptions.java	Fri Sep 25 17:19:26 2015 +0200
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.graal.compiler;
+
+import jdk.internal.jvmci.options.Option;
+import jdk.internal.jvmci.options.OptionType;
+import jdk.internal.jvmci.options.OptionValue;
+
+/**
+ * Options related to {@link GraalCompiler}.
+ *
+ * Note: This must be a top level class to work around for <a
+ * href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=477597">Eclipse bug 477597</a>.
+ */
+class GraalCompilerOptions {
+
+    // @formatter:off
+    @Option(help = "Repeatedly run the LIR code generation pass to improve statistical profiling results.", type = OptionType.Debug)
+    public static final OptionValue<Integer> EmitLIRRepeatCount = new OptionValue<>(0);
+    // @formatter:on
+
+}
\ No newline at end of file
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java	Fri Sep 25 15:49:10 2015 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippets.java	Fri Sep 25 17:19:26 2015 +0200
@@ -52,7 +52,7 @@
 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.verifyOop;
 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.wordSize;
 import static com.oracle.graal.hotspot.replacements.HotSpotReplacementsUtil.writeTlabTop;
-import static com.oracle.graal.hotspot.replacements.NewObjectSnippets.Options.ProfileAllocations;
+import static com.oracle.graal.hotspot.replacements.NewObjectSnippetsOptions.ProfileAllocations;
 import static com.oracle.graal.nodes.PiArrayNode.piArrayCast;
 import static com.oracle.graal.nodes.PiNode.piCast;
 import static com.oracle.graal.nodes.extended.BranchProbabilityNode.FAST_PATH_PROBABILITY;
@@ -75,9 +75,6 @@
 import jdk.internal.jvmci.meta.JavaKind;
 import jdk.internal.jvmci.meta.LocationIdentity;
 import jdk.internal.jvmci.meta.ResolvedJavaType;
-import jdk.internal.jvmci.options.Option;
-import jdk.internal.jvmci.options.OptionType;
-import jdk.internal.jvmci.options.OptionValue;
 
 import com.oracle.graal.api.replacements.Fold;
 import com.oracle.graal.compiler.common.spi.ForeignCallDescriptor;
@@ -130,14 +127,6 @@
 
     public static final LocationIdentity INIT_LOCATION = NamedLocationIdentity.mutable("Initialization");
 
-    static class Options {
-
-        //@formatter:off
-        @Option(help = "", type = OptionType.Debug)
-        static final OptionValue<Boolean> ProfileAllocations = new OptionValue<>(false);
-        //@formatter:on
-    }
-
     static enum ProfileMode {
         AllocatingMethods,
         InstanceOrArray,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/NewObjectSnippetsOptions.java	Fri Sep 25 17:19:26 2015 +0200
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.graal.hotspot.replacements;
+
+import jdk.internal.jvmci.options.Option;
+import jdk.internal.jvmci.options.OptionType;
+import jdk.internal.jvmci.options.OptionValue;
+
+/**
+ * Options related to {@link NewObjectSnippets}.
+ *
+ * Note: This must be a top level class to work around for <a
+ * href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=477597">Eclipse bug 477597</a>.
+ */
+class NewObjectSnippetsOptions {
+
+    //@formatter:off
+    @Option(help = "", type = OptionType.Debug)
+    static final OptionValue<Boolean> ProfileAllocations = new OptionValue<>(false);
+    //@formatter:on
+}
\ No newline at end of file