Skip to content

Commit

Permalink
Showing 19 changed files with 64 additions and 67 deletions.
Original file line number Diff line number Diff line change
@@ -173,7 +173,7 @@ protected NativeSockets nativeSockets() {
}

protected static int getCacheLimit() {
return Options.TRUFFLE_DISPATCH_POLYMORPHIC_MAX;
return Options.DISPATCH_POLYMORPHIC_MAX;
}

// Helper methods for caching
Original file line number Diff line number Diff line change
@@ -235,10 +235,10 @@ public SendNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);

dispatchNode = new CallDispatchHeadNode(context, true,
Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT,
Options.DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT,
MissingBehavior.CALL_METHOD_MISSING);

if ((boolean) Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
if ((boolean) Options.DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
dispatchNode.forceUncached();
}
}
Original file line number Diff line number Diff line change
@@ -1432,10 +1432,10 @@ public PublicSendNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);

dispatchNode = new CallDispatchHeadNode(context, false,
Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT,
Options.DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT,
MissingBehavior.CALL_METHOD_MISSING);

if ((boolean) Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
if ((boolean) Options.DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
dispatchNode.forceUncached();
}
}
@@ -1611,7 +1611,7 @@ public RespondToNode(RubyContext context, SourceSection sourceSection) {
dispatch = new DoesRespondDispatchHeadNode(context, false, false, MissingBehavior.RETURN_MISSING, null);
dispatchIgnoreVisibility = new DoesRespondDispatchHeadNode(context, true, false, MissingBehavior.RETURN_MISSING, null);

if ((boolean) Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
if ((boolean) Options.DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
dispatch.forceUncached();
dispatchIgnoreVisibility.forceUncached();
}
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ public void resume(Object[] store) {
@Override
public Object start() {
CompilerDirectives.transferToInterpreter();
return new Object[Options.TRUFFLE_ARRAYS_UNINITIALIZED_SIZE];
return new Object[Options.ARRAYS_UNINITIALIZED_SIZE];
}

@Override
Original file line number Diff line number Diff line change
@@ -4191,9 +4191,9 @@ public DynamicObject sortVeryShortIntegerFixnum(VirtualFrame frame, DynamicObjec

// Selection sort - written very carefully to allow PE

for (int i = 0; i < Options.TRUFFLE_ARRAYS_SMALL; i++) {
for (int i = 0; i < Options.ARRAYS_SMALL; i++) {
if (i < size) {
for (int j = i + 1; j < Options.TRUFFLE_ARRAYS_SMALL; j++) {
for (int j = i + 1; j < Options.ARRAYS_SMALL; j++) {
if (j < size) {
if (castSortValue(compareDispatchNode.call(frame, store[j], "<=>", null, store[i])) < 0) {
final int temp = store[j];
@@ -4219,9 +4219,9 @@ public DynamicObject sortVeryShortLongFixnum(VirtualFrame frame, DynamicObject a

// Selection sort - written very carefully to allow PE

for (int i = 0; i < Options.TRUFFLE_ARRAYS_SMALL; i++) {
for (int i = 0; i < Options.ARRAYS_SMALL; i++) {
if (i < size) {
for (int j = i + 1; j < Options.TRUFFLE_ARRAYS_SMALL; j++) {
for (int j = i + 1; j < Options.ARRAYS_SMALL; j++) {
if (j < size) {
if (castSortValue(compareDispatchNode.call(frame, store[j], "<=>", null, store[i])) < 0) {
final long temp = store[j];
@@ -4282,7 +4282,7 @@ private int castSortValue(Object value) {
}

protected static boolean isSmall(DynamicObject array) {
return Layouts.ARRAY.getSize(array) <= Options.TRUFFLE_ARRAYS_SMALL;
return Layouts.ARRAY.getSize(array) <= Options.ARRAYS_SMALL;
}

}
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ public RubyNode getValue(int index) {
public static HashLiteralNode create(RubyContext context, SourceSection sourceSection, RubyNode[] keyValues) {
if (keyValues.length == 0) {
return new EmptyHashLiteralNode(context, sourceSection);
} else if (keyValues.length <= Options.TRUFFLE_HASH_PACKED_ARRAY_MAX * 2) {
} else if (keyValues.length <= Options.HASH_PACKED_ARRAY_MAX * 2) {
return new SmallHashLiteralNode(context, sourceSection, keyValues);
} else {
return new GenericHashLiteralNode(context, sourceSection, keyValues);
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ public Object construct(VirtualFrame frame, DynamicObject hashClass, Object[] ar
final int size = Layouts.ARRAY.getSize(array);
final Object[] newStore = PackedArrayStrategy.createStore();

for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < size) {
final Object pair = store[n];

@@ -145,7 +145,7 @@ public static boolean noiseIsSmallArrayOfPairs(Object[] args) {

final Object[] store = (Object[]) Layouts.ARRAY.getStore(array);

if (store.length > Options.TRUFFLE_HASH_PACKED_ARRAY_MAX) {
if (store.length > Options.HASH_PACKED_ARRAY_MAX) {
System.err.println("too long");
}

@@ -171,7 +171,7 @@ public static boolean isSmallArrayOfPairs(Object[] args) {

final Object[] store = (Object[]) Layouts.ARRAY.getStore(array);

if (store.length > Options.TRUFFLE_HASH_PACKED_ARRAY_MAX) {
if (store.length > Options.HASH_PACKED_ARRAY_MAX) {
return false;
}

@@ -226,7 +226,7 @@ public Object getPackedArray(VirtualFrame frame, DynamicObject hash, Object key)
final Object[] store = (Object[]) Layouts.HASH.getStore(hash);
final int size = Layouts.HASH.getSize(hash);

for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < size) {
if (hashed == PackedArrayStrategy.getHashed(store, n)) {
final boolean equal;
@@ -436,7 +436,7 @@ public Object deletePackedArray(VirtualFrame frame, DynamicObject hash, Object k
final Object[] store = (Object[]) Layouts.HASH.getStore(hash);
final int size = Layouts.HASH.getSize(hash);

for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < size) {
if (hashed == PackedArrayStrategy.getHashed(store, n)) {
if (eqlNode.callBoolean(frame, PackedArrayStrategy.getKey(store, n), "eql?", null, key)) {
@@ -534,7 +534,7 @@ public DynamicObject eachPackedArray(VirtualFrame frame, DynamicObject hash, Dyn
int count = 0;

try {
for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (CompilerDirectives.inInterpreter()) {
count++;
}
@@ -759,7 +759,7 @@ public DynamicObject mapPackedArray(VirtualFrame frame, DynamicObject hash, Dyna
Object resultStore = arrayBuilderNode.start(length);

try {
for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < length) {
final Object key = PackedArrayStrategy.getKey(store, n);
final Object value = PackedArrayStrategy.getValue(store, n);
@@ -909,11 +909,11 @@ public DynamicObject mergePackedPacked(VirtualFrame frame, DynamicObject hash, D

int conflictsCount = 0;

for (int a = 0; a < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; a++) {
for (int a = 0; a < Options.HASH_PACKED_ARRAY_MAX; a++) {
if (a < storeASize) {
boolean merge = true;

for (int b = 0; b < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; b++) {
for (int b = 0; b < Options.HASH_PACKED_ARRAY_MAX; b++) {
if (b < storeBSize) {
if (eqlNode.callBoolean(frame, PackedArrayStrategy.getKey(storeA, a), "eql?", null, PackedArrayStrategy.getKey(storeB, b))) {
conflictsCount++;
@@ -946,7 +946,7 @@ public DynamicObject mergePackedPacked(VirtualFrame frame, DynamicObject hash, D

final int mergedSize = storeBSize + mergeFromACount;

if (storeBSize + mergeFromACount <= Options.TRUFFLE_HASH_PACKED_ARRAY_MAX) {
if (storeBSize + mergeFromACount <= Options.HASH_PACKED_ARRAY_MAX) {
resultIsSmallProfile.enter();

final Object[] merged = PackedArrayStrategy.createStore();
@@ -1039,7 +1039,7 @@ public DynamicObject mergePackedBuckets(VirtualFrame frame, DynamicObject hash,
final Object[] hashStore = (Object[]) Layouts.HASH.getStore(hash);
final int hashSize = Layouts.HASH.getSize(hash);

for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < hashSize) {
setNode.executeSet(frame, merged, PackedArrayStrategy.getKey(hashStore, n), PackedArrayStrategy.getValue(hashStore, n), isCompareByIdentity);
}
@@ -1073,7 +1073,7 @@ public DynamicObject mergeBucketsPacked(VirtualFrame frame, DynamicObject hash,
final Object[] otherStore = (Object[]) Layouts.HASH.getStore(other);
final int otherSize = Layouts.HASH.getSize(other);

for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < otherSize) {
setNode.executeSet(frame, merged, PackedArrayStrategy.getKey(otherStore, n), PackedArrayStrategy.getValue(otherStore, n), isCompareByIdentity);
}
@@ -1310,7 +1310,7 @@ public DynamicObject rehashPackedArray(VirtualFrame frame, DynamicObject hash) {
final Object[] store = (Object[]) Layouts.HASH.getStore(hash);
final int size = Layouts.HASH.getSize(hash);

for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < size) {
PackedArrayStrategy.setHashed(store, n, hashNode.hash(frame, PackedArrayStrategy.getKey(store, n)));
}
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ public Object setPackedArray(VirtualFrame frame, DynamicObject hash, Object key,
final Object[] store = (Object[]) Layouts.HASH.getStore(hash);
final int size = Layouts.HASH.getSize(hash);

for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < size) {
if (hashed == PackedArrayStrategy.getHashed(store, n)) {
final boolean equal;
@@ -113,7 +113,7 @@ public Object setPackedArray(VirtualFrame frame, DynamicObject hash, Object key,

extendProfile.enter();

if (strategyProfile.profile(size + 1 <= Options.TRUFFLE_HASH_PACKED_ARRAY_MAX)) {
if (strategyProfile.profile(size + 1 <= Options.HASH_PACKED_ARRAY_MAX)) {
PackedArrayStrategy.setHashedKeyValue(store, size, hashed, key, value);
Layouts.HASH.setSize(hash, size + 1);
return value;
Original file line number Diff line number Diff line change
@@ -63,12 +63,12 @@ public CachedBoxedMethodMissingDispatchNode(
*/

if (callNode.isCallTargetCloningAllowed()
&& (Options.TRUFFLE_DISPATCH_METHODMISSING_ALWAYS_CLONED || method.getSharedMethodInfo().shouldAlwaysSplit())) {
&& (Options.DISPATCH_METHODMISSING_ALWAYS_CLONED || method.getSharedMethodInfo().shouldAlwaysSplit())) {
insert(callNode);
callNode.cloneCallTarget();
}

if (callNode.isInlinable() && Options.TRUFFLE_DISPATCH_METHODMISSING_ALWAYS_INLINED) {
if (callNode.isInlinable() && Options.DISPATCH_METHODMISSING_ALWAYS_INLINED) {
insert(callNode);
callNode.forceInlining();
}
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ public DispatchNode call() throws Exception {

final DispatchNode newDispathNode;

if (depth == Options.TRUFFLE_DISPATCH_POLYMORPHIC_MAX) {
if (depth == Options.DISPATCH_POLYMORPHIC_MAX) {
newDispathNode = new UncachedDispatchNode(getContext(), ignoreVisibility, getDispatchAction(), missingBehavior);
} else {
depth++;
@@ -257,12 +257,12 @@ private DispatchNode createMethodMissingNode(
receiverObject.toString() + " didn't have a #method_missing", this));
}

if ((boolean) Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
if ((boolean) Options.DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
return new UncachedDispatchNode(getContext(), ignoreVisibility, getDispatchAction(), missingBehavior);
}

return new CachedBoxedMethodMissingDispatchNode(getContext(), methodName, first, shape,
getContext().getCoreLibrary().getMetaClass(receiverObject), method, Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT, getDispatchAction());
getContext().getCoreLibrary().getMetaClass(receiverObject), method, Options.DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT, getDispatchAction());
}

default: {
Original file line number Diff line number Diff line change
@@ -90,15 +90,15 @@ public Object execute(VirtualFrame frame) {
}

private DynamicObject translate(ArithmeticException exception) {
if (Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA) {
if (Options.EXCEPTIONS_PRINT_JAVA) {
exception.printStackTrace();
}

return getContext().getCoreLibrary().zeroDivisionError(this);
}

private DynamicObject translate(UnsupportedSpecializationException exception) {
if (Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA) {
if (Options.EXCEPTIONS_PRINT_JAVA) {
exception.printStackTrace();
}

@@ -163,7 +163,7 @@ private DynamicObject translate(UnsupportedSpecializationException exception) {
}

public DynamicObject translate(Throwable throwable) {
if (Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA || (boolean) Options.TRUFFLE_EXCEPTIONS_PRINT_UNCAUGHT_JAVA) {
if (Options.EXCEPTIONS_PRINT_JAVA || (boolean) Options.EXCEPTIONS_PRINT_UNCAUGHT_JAVA) {
throwable.printStackTrace();
}

Original file line number Diff line number Diff line change
@@ -85,10 +85,10 @@ protected CallNodeWrapperNode createBlockCallNode(CallTarget callTarget) {
final DirectCallNode callNode = Truffle.getRuntime().createDirectCallNode(callTarget);
final CallNodeWrapperNode callNodeWrapperNode = new CallNodeWrapperNode(callNode);

if (Options.TRUFFLE_INLINER_ALWAYS_CLONE_YIELD && callNode.isCallTargetCloningAllowed()) {
if (Options.INLINER_ALWAYS_CLONE_YIELD && callNode.isCallTargetCloningAllowed()) {
callNode.cloneCallTarget();
}
if (Options.TRUFFLE_INLINER_ALWAYS_INLINE_YIELD && callNode.isInlinable()) {
if (Options.INLINER_ALWAYS_INLINE_YIELD && callNode.isInlinable()) {
callNode.forceInlining();
}
return callNodeWrapperNode;
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ public NNode(RubyContext context, int repeats, PackNode child) {
public Object execute(VirtualFrame frame) {
if (CompilerDirectives.inCompiledCode()
&& CompilerDirectives.isCompilationConstant(repeats)
&& repeats <= Options.TRUFFLE_PACK_UNROLL_LIMIT) {
&& repeats <= Options.PACK_UNROLL_LIMIT) {
return executeExploded(frame);
}

37 changes: 17 additions & 20 deletions truffle/src/main/java/org/jruby/truffle/runtime/Options.java
Original file line number Diff line number Diff line change
@@ -11,30 +11,27 @@

public class Options {

public static final String TRUFFLE_CORE_LOAD_PATH = org.jruby.util.cli.Options.TRUFFLE_CORE_LOAD_PATH.load();
public static final String CORE_LOAD_PATH = org.jruby.util.cli.Options.TRUFFLE_CORE_LOAD_PATH.load();

public static final int TRUFFLE_DISPATCH_POLYMORPHIC_MAX = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_POLYMORPHIC_MAX.load();
public static final int TRUFFLE_ARRAYS_UNINITIALIZED_SIZE = org.jruby.util.cli.Options.TRUFFLE_ARRAYS_UNINITIALIZED_SIZE.load();
public static final int TRUFFLE_ARRAYS_SMALL = org.jruby.util.cli.Options.TRUFFLE_ARRAYS_SMALL.load();
public static final int TRUFFLE_HASH_PACKED_ARRAY_MAX = org.jruby.util.cli.Options.TRUFFLE_HASH_PACKED_ARRAY_MAX.load();
public static final int DISPATCH_POLYMORPHIC_MAX = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_POLYMORPHIC_MAX.load();
public static final int ARRAYS_UNINITIALIZED_SIZE = org.jruby.util.cli.Options.TRUFFLE_ARRAYS_UNINITIALIZED_SIZE.load();
public static final int ARRAYS_SMALL = org.jruby.util.cli.Options.TRUFFLE_ARRAYS_SMALL.load();
public static final int HASH_PACKED_ARRAY_MAX = org.jruby.util.cli.Options.TRUFFLE_HASH_PACKED_ARRAY_MAX.load();

public static final int TRUFFLE_INSTRUMENTATION_SERVER_PORT = org.jruby.util.cli.Options.TRUFFLE_INSTRUMENTATION_SERVER_PORT.load();
public static final boolean TRUFFLE_EXCEPTIONS_PRINT_JAVA = org.jruby.util.cli.Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA.load();
public static final boolean TRUFFLE_EXCEPTIONS_PRINT_UNCAUGHT_JAVA = org.jruby.util.cli.Options.TRUFFLE_EXCEPTIONS_PRINT_UNCAUGHT_JAVA.load();
public static final boolean TRUFFLE_COVERAGE = org.jruby.util.cli.Options.TRUFFLE_COVERAGE.load();
public static final int INSTRUMENTATION_SERVER_PORT = org.jruby.util.cli.Options.TRUFFLE_INSTRUMENTATION_SERVER_PORT.load();
public static final boolean EXCEPTIONS_PRINT_JAVA = org.jruby.util.cli.Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA.load();
public static final boolean EXCEPTIONS_PRINT_UNCAUGHT_JAVA = org.jruby.util.cli.Options.TRUFFLE_EXCEPTIONS_PRINT_UNCAUGHT_JAVA.load();
public static final boolean COVERAGE = org.jruby.util.cli.Options.TRUFFLE_COVERAGE.load();

public static final boolean TRUFFLE_BACKTRACES_HIDE_CORE_FILES = org.jruby.util.cli.Options.TRUFFLE_BACKTRACES_HIDE_CORE_FILES.load();
public static final boolean BACKTRACES_HIDE_CORE_FILES = org.jruby.util.cli.Options.TRUFFLE_BACKTRACES_HIDE_CORE_FILES.load();

public static final boolean TRUFFLE_INLINER_ALWAYS_CLONE_YIELD = org.jruby.util.cli.Options.TRUFFLE_INLINER_ALWAYS_CLONE_YIELD.load();
public static final boolean TRUFFLE_INLINER_ALWAYS_INLINE_YIELD = org.jruby.util.cli.Options.TRUFFLE_INLINER_ALWAYS_INLINE_YIELD.load();
public static final boolean TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED.load();
public static final boolean TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT.load();
public static final boolean TRUFFLE_DISPATCH_METHODMISSING_ALWAYS_CLONED = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_METHODMISSING_ALWAYS_CLONED.load();
public static final boolean TRUFFLE_DISPATCH_METHODMISSING_ALWAYS_INLINED = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_METHODMISSING_ALWAYS_INLINED.load();
public static final boolean INLINER_ALWAYS_CLONE_YIELD = org.jruby.util.cli.Options.TRUFFLE_INLINER_ALWAYS_CLONE_YIELD.load();
public static final boolean INLINER_ALWAYS_INLINE_YIELD = org.jruby.util.cli.Options.TRUFFLE_INLINER_ALWAYS_INLINE_YIELD.load();
public static final boolean DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED.load();
public static final boolean DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT.load();
public static final boolean DISPATCH_METHODMISSING_ALWAYS_CLONED = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_METHODMISSING_ALWAYS_CLONED.load();
public static final boolean DISPATCH_METHODMISSING_ALWAYS_INLINED = org.jruby.util.cli.Options.TRUFFLE_DISPATCH_METHODMISSING_ALWAYS_INLINED.load();

public static final int TRUFFLE_PACK_UNROLL_LIMIT = org.jruby.util.cli.Options.TRUFFLE_PACK_UNROLL_LIMIT.load();

public static final boolean TRUFFLE_METRICS_TIME = org.jruby.util.cli.Options.TRUFFLE_METRICS_TIME.load();
public static final boolean TRUFFLE_METRICS_MEMORY_USED_ON_EXIT = org.jruby.util.cli.Options.TRUFFLE_METRICS_MEMORY_USED_ON_EXIT.load();
public static final int PACK_UNROLL_LIMIT = org.jruby.util.cli.Options.TRUFFLE_PACK_UNROLL_LIMIT.load();

}
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ public RubyContext(Ruby runtime) {

// TODO(CS, 28-Jan-15) this is global
// TODO(CS, 28-Jan-15) maybe not do this for core?
if ((boolean) Options.TRUFFLE_COVERAGE) {
if ((boolean) Options.COVERAGE) {
coverageTracker = new CoverageTracker();
} else {
coverageTracker = null;
@@ -163,8 +163,8 @@ public RubyContext(Ruby runtime) {
rubiniusPrimitiveManager = new RubiniusPrimitiveManager();
rubiniusPrimitiveManager.addAnnotatedPrimitives();

if (Options.TRUFFLE_INSTRUMENTATION_SERVER_PORT != 0) {
instrumentationServerManager = new InstrumentationServerManager(this, Options.TRUFFLE_INSTRUMENTATION_SERVER_PORT);
if (Options.INSTRUMENTATION_SERVER_PORT != 0) {
instrumentationServerManager = new InstrumentationServerManager(this, Options.INSTRUMENTATION_SERVER_PORT);
instrumentationServerManager.start();
} else {
instrumentationServerManager = null;
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ public enum FormattingFlags {
public static BacktraceFormatter createDefaultFormatter(RubyContext context) {
final EnumSet<FormattingFlags> flags = EnumSet.noneOf(FormattingFlags.class);

if (!Options.TRUFFLE_BACKTRACES_HIDE_CORE_FILES) {
if (!Options.BACKTRACES_HIDE_CORE_FILES) {
flags.add(FormattingFlags.INCLUDE_CORE_FILES);
}

Original file line number Diff line number Diff line change
@@ -180,7 +180,7 @@ public class CoreLibrary {
@CompilationFinal private InternalMethod basicObjectSendMethod;

private static String getCoreLoadPath() {
String path = Options.TRUFFLE_CORE_LOAD_PATH;
String path = Options.CORE_LOAD_PATH;

while (path.endsWith("/")) {
path = path.substring(0, path.length() - 1);
Original file line number Diff line number Diff line change
@@ -87,11 +87,11 @@ public static boolean verifyStore(Object store, int size, Entry firstInSequence,

assert foundSizeSequence == size : String.format("%d %d", foundSizeSequence, size);
} else if (store instanceof Object[]) {
assert ((Object[]) store).length == Options.TRUFFLE_HASH_PACKED_ARRAY_MAX * PackedArrayStrategy.ELEMENTS_PER_ENTRY : ((Object[]) store).length;
assert ((Object[]) store).length == Options.HASH_PACKED_ARRAY_MAX * PackedArrayStrategy.ELEMENTS_PER_ENTRY : ((Object[]) store).length;

final Object[] packedStore = (Object[]) store;

for (int n = 0; n < Options.TRUFFLE_HASH_PACKED_ARRAY_MAX; n++) {
for (int n = 0; n < Options.HASH_PACKED_ARRAY_MAX; n++) {
if (n < size) {
assert packedStore[n * 2] != null;
assert packedStore[n * 2 + 1] != null;
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
public abstract class PackedArrayStrategy {

public static final int ELEMENTS_PER_ENTRY = 3;
public static final int MAX_ELEMENTS = Options.TRUFFLE_HASH_PACKED_ARRAY_MAX * ELEMENTS_PER_ENTRY;
public static final int MAX_ELEMENTS = Options.HASH_PACKED_ARRAY_MAX * ELEMENTS_PER_ENTRY;

public static Object[] createStore(int hashed, Object key, Object value) {
final Object[] store = createStore();

0 comments on commit b02e712

Please sign in to comment.