48
48
public class PythonEngineOptions {
49
49
@ CompilationFinal private OptionValues optionValues ;
50
50
51
- @ CompilationFinal private int builtinsInliningMaxCallerSize ;
52
- @ CompilationFinal private boolean catchAllExceptions ;
53
- @ CompilationFinal private boolean emulatedJython ;
54
- @ CompilationFinal private boolean exposeInternalSources ;
55
- @ CompilationFinal private boolean withThread ;
51
+ private final int builtinsInliningMaxCallerSize ;
52
+ private final boolean catchAllExceptions ;
53
+ private final boolean emulatedJython ;
54
+ private final boolean exposeInternalSources ;
55
+ private final boolean withThread ;
56
56
57
57
PythonEngineOptions (OptionValues optionValues ) {
58
+ CompilerAsserts .neverPartOfCompilation ();
58
59
this .optionValues = optionValues ;
59
- setOptionValues (optionValues );
60
+ this .builtinsInliningMaxCallerSize = readIntegerOption (PythonOptions .BuiltinsInliningMaxCallerSize );
61
+ this .catchAllExceptions = readBooleanOption (PythonOptions .CatchAllExceptions );
62
+ this .emulatedJython = readBooleanOption (PythonOptions .EmulateJython );
63
+ this .exposeInternalSources = readBooleanOption (PythonOptions .ExposeInternalSources );
64
+ this .withThread = readBooleanOption (PythonOptions .WithThread );
60
65
}
61
66
62
67
public static PythonEngineOptions fromOptionValues (OptionValues optionValues ) {
@@ -71,20 +76,6 @@ private int readIntegerOption(OptionKey<Integer> key) {
71
76
return key .getValue (optionValues );
72
77
}
73
78
74
- public void setOptionValues (OptionValues newOptions ) {
75
- CompilerAsserts .neverPartOfCompilation ();
76
- optionValues = newOptions ;
77
- cacheOptions ();
78
- }
79
-
80
- private void cacheOptions () {
81
- this .builtinsInliningMaxCallerSize = readIntegerOption (PythonOptions .BuiltinsInliningMaxCallerSize );
82
- this .catchAllExceptions = readBooleanOption (PythonOptions .CatchAllExceptions );
83
- this .emulatedJython = readBooleanOption (PythonOptions .EmulateJython );
84
- this .exposeInternalSources = readBooleanOption (PythonOptions .ExposeInternalSources );
85
- this .withThread = readBooleanOption (PythonOptions .WithThread );
86
- }
87
-
88
79
public boolean areInternalSourcesExposed () {
89
80
return this .exposeInternalSources ;
90
81
}
0 commit comments