Skip to content

Commit d266e65

Browse files
committed
Remove --prism option
1 parent fa59235 commit d266e65

File tree

4 files changed

+2
-30
lines changed

4 files changed

+2
-30
lines changed

src/main/java/org/truffleruby/options/LanguageOptions.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ public final class LanguageOptions {
131131
public final boolean RUN_TWICE;
132132
/** --experimental-engine-caching=RUN_TWICE */
133133
public final boolean EXPERIMENTAL_ENGINE_CACHING;
134-
/** --prism=true */
135-
public final boolean PRISM;
136134

137135
public LanguageOptions(Env env, OptionValues options, boolean singleContext) {
138136
CORE_LOAD_PATH = options.get(OptionsCatalog.CORE_LOAD_PATH_KEY);
@@ -189,7 +187,6 @@ public LanguageOptions(Env env, OptionValues options, boolean singleContext) {
189187
SHARED_OBJECTS_FORCE = options.get(OptionsCatalog.SHARED_OBJECTS_FORCE_KEY);
190188
RUN_TWICE = options.get(OptionsCatalog.RUN_TWICE_KEY);
191189
EXPERIMENTAL_ENGINE_CACHING = options.hasBeenSet(OptionsCatalog.EXPERIMENTAL_ENGINE_CACHING_KEY) ? options.get(OptionsCatalog.EXPERIMENTAL_ENGINE_CACHING_KEY) : RUN_TWICE;
192-
PRISM = options.get(OptionsCatalog.PRISM_KEY);
193190
}
194191

195192
public Object fromDescriptor(OptionDescriptor descriptor) {
@@ -302,8 +299,6 @@ public Object fromDescriptor(OptionDescriptor descriptor) {
302299
return RUN_TWICE;
303300
case "ruby.experimental-engine-caching":
304301
return EXPERIMENTAL_ENGINE_CACHING;
305-
case "ruby.prism":
306-
return PRISM;
307302
default:
308303
return null;
309304
}
@@ -363,8 +358,7 @@ public static boolean areOptionsCompatible(OptionValues one, OptionValues two) {
363358
one.get(OptionsCatalog.SHARED_OBJECTS_DEBUG_KEY).equals(two.get(OptionsCatalog.SHARED_OBJECTS_DEBUG_KEY)) &&
364359
one.get(OptionsCatalog.SHARED_OBJECTS_FORCE_KEY).equals(two.get(OptionsCatalog.SHARED_OBJECTS_FORCE_KEY)) &&
365360
one.get(OptionsCatalog.RUN_TWICE_KEY).equals(two.get(OptionsCatalog.RUN_TWICE_KEY)) &&
366-
one.get(OptionsCatalog.EXPERIMENTAL_ENGINE_CACHING_KEY).equals(two.get(OptionsCatalog.EXPERIMENTAL_ENGINE_CACHING_KEY)) &&
367-
one.get(OptionsCatalog.PRISM_KEY).equals(two.get(OptionsCatalog.PRISM_KEY));
361+
one.get(OptionsCatalog.EXPERIMENTAL_ENGINE_CACHING_KEY).equals(two.get(OptionsCatalog.EXPERIMENTAL_ENGINE_CACHING_KEY));
368362
}
369363

370364
public static boolean areOptionsCompatibleOrLog(TruffleLogger logger, LanguageOptions oldOptions, LanguageOptions newOptions) {
@@ -749,13 +743,6 @@ public static boolean areOptionsCompatibleOrLog(TruffleLogger logger, LanguageOp
749743
return false;
750744
}
751745

752-
oldValue = oldOptions.PRISM;
753-
newValue = newOptions.PRISM;
754-
if (!newValue.equals(oldValue)) {
755-
logger.fine("not reusing pre-initialized context: --prism differs, was: " + oldValue + " and is now: " + newValue);
756-
return false;
757-
}
758-
759746
return true;
760747
}
761748
}

src/main/java/org/truffleruby/parser/TranslatorDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public RootCallTarget parse(RubySource rubySource, ParserContext parserContext,
106106
MaterializedFrame parentFrame, LexicalScope staticLexicalScope, Node currentNode) {
107107
this.parseEnvironment = new ParseEnvironment(language, rubySource, null, parserContext, currentNode);
108108

109-
if (language.options.PRISM) {
109+
if (true) {
110110
return new YARPTranslatorDriver(context).parse(rubySource, parserContext, argumentNames,
111111
parentFrame, staticLexicalScope, currentNode);
112112
}

src/options.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ LANGUAGE_OPTIONS:
5252
- RUN_TWICE
5353
- CHECK_CLONE_UNINITIALIZED_CORRECTNESS
5454
- ALWAYS_CLONE_ALL
55-
- PRISM
5655
- BUILDING_CORE_CEXTS
5756
- INSTRUMENT_ALL_NODES
5857

@@ -264,5 +263,3 @@ INTERNAL: # Options for debugging the TruffleRuby implementation
264263

265264
# Options for the regular expression engines
266265
COMPARE_REGEX_ENGINES: [compare-regex-engines, boolean, false, 'Uses both Joni and the TRegex engine and compares their results']
267-
268-
PRISM: [prism, boolean, true, 'Use Prism as the parser for Ruby code']

src/shared/java/org/truffleruby/shared/options/OptionsCatalog.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ public final class OptionsCatalog {
164164
public static final OptionKey<Boolean> RUN_TWICE_KEY = new OptionKey<>(false);
165165
public static final OptionKey<Boolean> EXPERIMENTAL_ENGINE_CACHING_KEY = new OptionKey<>(RUN_TWICE_KEY.getDefaultValue());
166166
public static final OptionKey<Boolean> COMPARE_REGEX_ENGINES_KEY = new OptionKey<>(false);
167-
public static final OptionKey<Boolean> PRISM_KEY = new OptionKey<>(true);
168167

169168
public static final OptionDescriptor LOAD_PATHS = OptionDescriptor
170169
.newBuilder(LOAD_PATHS_KEY, "ruby.load-paths")
@@ -1318,14 +1317,6 @@ public final class OptionsCatalog {
13181317
.usageSyntax("")
13191318
.build();
13201319

1321-
public static final OptionDescriptor PRISM = OptionDescriptor
1322-
.newBuilder(PRISM_KEY, "ruby.prism")
1323-
.help("Use Prism as the parser for Ruby code")
1324-
.category(OptionCategory.INTERNAL)
1325-
.stability(OptionStability.EXPERIMENTAL)
1326-
.usageSyntax("")
1327-
.build();
1328-
13291320
public static OptionDescriptor fromName(String name) {
13301321
switch (name) {
13311322
case "ruby.load-paths":
@@ -1616,8 +1607,6 @@ public static OptionDescriptor fromName(String name) {
16161607
return EXPERIMENTAL_ENGINE_CACHING;
16171608
case "ruby.compare-regex-engines":
16181609
return COMPARE_REGEX_ENGINES;
1619-
case "ruby.prism":
1620-
return PRISM;
16211610
default:
16221611
return null;
16231612
}
@@ -1769,7 +1758,6 @@ public static OptionDescriptor[] allDescriptors() {
17691758
RUN_TWICE,
17701759
EXPERIMENTAL_ENGINE_CACHING,
17711760
COMPARE_REGEX_ENGINES,
1772-
PRISM,
17731761
};
17741762
}
17751763
}

0 commit comments

Comments
 (0)