Skip to content

Commit

Permalink
Showing 47 changed files with 41 additions and 100 deletions.
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ public void executeVoid(VirtualFrame frame) {

@Override
public Object isDefined(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyContext context = getContext();

Original file line number Diff line number Diff line change
@@ -345,7 +345,7 @@ public RubyNode[] expandedArgumentNodes(InternalMethod method, RubyNode[] argume

@Override
public Object isDefined(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

if (receiver.isDefined(frame) == nil()) {
return nil();
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ public WriteConstantNode(RubyContext context, SourceSection sourceSection, Strin

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

// Evaluate RHS first.
final Object rhsValue = rhs.execute(frame);
Original file line number Diff line number Diff line change
@@ -100,8 +100,6 @@ public Object cast(RubyNilClass nil) {

@Specialization(guards = {"!isRubyNilClass(object)", "!isRubyArray(object)"})
public Object cast(VirtualFrame frame, RubyBasicObject object) {
notDesignedForCompilation();

final Object result = toArrayNode.call(frame, object, "to_ary", null, new Object[]{});

if (result == DispatchNode.MISSING) {
Original file line number Diff line number Diff line change
@@ -77,8 +77,6 @@ public RubyNilClass cast(RubyNilClass nil) {

@Specialization(guards = {"!isRubyNilClass(object)", "!isRubyHash(object)"})
public Object cast(VirtualFrame frame, RubyBasicObject object) {
notDesignedForCompilation();

final Object result = toHashNode.call(frame, object, "to_hash", null, new Object[]{});

if (result == DispatchNode.MISSING) {
Original file line number Diff line number Diff line change
@@ -30,8 +30,6 @@ public LambdaNode(RubyContext context, SourceSection sourceSection, RubyNode def

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

final InternalMethod method = (InternalMethod) definition.execute(frame);

// TODO(CS): not sure we're closing over the correct state here
Original file line number Diff line number Diff line change
@@ -46,8 +46,6 @@ public RubyProc doRubyProc(RubyProc proc) {

@Specialization
public RubyProc doObject(VirtualFrame frame, RubyBasicObject object) {
notDesignedForCompilation();

return (RubyProc) toProc.call(frame, object, "to_proc", null);
}

Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.cast;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
@@ -36,11 +37,10 @@ protected RubyNilClass castNil(Object[] args) {
protected Object castSingle(Object[] args) {
return args[0];
}


@CompilerDirectives.TruffleBoundary
@Specialization(guards = { "!noArguments(args)", "!singleArgument(args)" })
protected RubyArray castMany(Object[] args) {
notDesignedForCompilation();

return RubyArray.fromObjects(getContext().getCoreLibrary().getArrayClass(), args);
}

Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
package org.jruby.truffle.nodes.cast;

import com.oracle.truffle.api.CompilerAsserts;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
@@ -84,8 +85,6 @@ public RubyArray splat(VirtualFrame frame, RubyArray array) {

@Specialization(guards = {"!isRubyNilClass(object)", "!isRubyArray(object)"})
public RubyArray splat(VirtualFrame frame, Object object) {
notDesignedForCompilation();

final String method;

if (useToAry) {
@@ -102,6 +101,7 @@ public RubyArray splat(VirtualFrame frame, Object object) {
if (array instanceof RubyArray) {
return (RubyArray) array;
} else if (array instanceof RubyNilClass || array == DispatchNode.MISSING) {
CompilerDirectives.transferToInterpreter();
return RubyArray.fromObject(getContext().getCoreLibrary().getArrayClass(), object);
} else {
throw new RaiseException(getContext().getCoreLibrary().typeErrorCantConvertTo(
Original file line number Diff line number Diff line change
@@ -28,11 +28,8 @@ public StringToSymbolNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

@CompilerDirectives.TruffleBoundary
@Specialization
public RubySymbol doString(RubyString string) {
notDesignedForCompilation();

return getContext().getSymbol(string.toString());
}

Original file line number Diff line number Diff line change
@@ -47,8 +47,6 @@ public String coerceRubyString(RubyString string) {

@Specialization(guards = { "!isRubySymbol(object)", "!isRubyString(object)" })
public String coerceObject(VirtualFrame frame, Object object) {
notDesignedForCompilation();

final Object coerced;

try {
@@ -63,7 +61,7 @@ public String coerceObject(VirtualFrame frame, Object object) {
}

if (coerced instanceof RubyString) {
return ((RubyString) coerced).toString();
return coerced.toString();
} else {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().typeErrorBadCoercion(object, "String", "to_str", coerced, this));
Original file line number Diff line number Diff line change
@@ -38,8 +38,6 @@ public RubyArray coerceRubyArray(RubyArray rubyArray) {

@Specialization(guards = "!isRubyArray(object)")
public RubyArray coerceObject(VirtualFrame frame, Object object) {
notDesignedForCompilation();

if (toAryNode == null) {
CompilerDirectives.transferToInterpreter();
toAryNode = insert(DispatchHeadNodeFactory.createMethodCall(getContext()));
Original file line number Diff line number Diff line change
@@ -41,8 +41,6 @@ public RubyString coerceRubyString(RubyString string) {

@Specialization(guards = "!isRubyString(object)")
public RubyString coerceObject(VirtualFrame frame, Object object) {
notDesignedForCompilation();

final Object coerced;

try {
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.control;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
@@ -35,8 +36,6 @@ public FlipFlopNode(RubyContext context, SourceSection sourceSection, RubyNode b

@Override
public boolean executeBoolean(VirtualFrame frame) {
notDesignedForCompilation();

if (exclusive) {
if (stateNode.getState(frame)) {
if (end.executeBoolean(frame)) {
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.control;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.api.utilities.AssumedValue;
@@ -29,8 +30,6 @@ public OnceNode(RubyContext context, SourceSection sourceSection, RubyNode child

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

Object value = valueMemo.get();

if (value == null) {
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.control;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.source.SourceSection;
@@ -30,10 +31,9 @@ public RescueClassesNode(RubyContext context, SourceSection sourceSection, RubyN
this.handlingClassNodes = handlingClassNodes;
}

@ExplodeLoop
@Override
public boolean canHandle(VirtualFrame frame, RubyException exception) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyClass exceptionRubyClass = exception.getLogicalClass();

Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.control;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.source.SourceSection;
@@ -33,10 +34,9 @@ public RescueSplatNode(RubyContext context, SourceSection sourceSection, RubyNod
this.handlingClassesArray = handlingClassesArray;
}

@ExplodeLoop
@Override
public boolean canHandle(VirtualFrame frame, RubyException exception) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyArray handlingClasses = (RubyArray) handlingClassesArray.execute(frame);

Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
package org.jruby.truffle.nodes.control;

import com.oracle.truffle.api.CompilerAsserts;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.ControlFlowException;
import com.oracle.truffle.api.nodes.ExplodeLoop;
@@ -80,11 +81,8 @@ public Object execute(VirtualFrame frame) {
}
}

@ExplodeLoop
private Object handleException(VirtualFrame frame, RaiseException exception) {
CompilerAsserts.neverPartOfCompilation();

notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyBasicObject threadLocals = getContext().getThreadManager().getCurrentThread().getThreadLocals();
threadLocals.getOperations().setInstanceVariable(threadLocals, "$!", exception.getRubyException());
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.control;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.api.source.SourceSection;
@@ -33,7 +34,7 @@ public WhenSplatNode(RubyContext context, SourceSection sourceSection, RubyNode

@Override
public boolean executeBoolean(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final Object caseExpression = readCaseExpression.execute(frame);

Original file line number Diff line number Diff line change
@@ -28,8 +28,6 @@ public CheckMatchVariableTypeNode(RubyContext context, SourceSection sourceSecti
}

public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

final Object childValue = child.execute(frame);

if (!(childValue instanceof RubyMatchData || childValue instanceof RubyNilClass || childValue instanceof RubyNilClass)) {
Original file line number Diff line number Diff line change
@@ -27,8 +27,6 @@ public CheckOutputSeparatorVariableTypeNode(RubyContext context, SourceSection s
}

public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

final Object childValue = child.execute(frame);

if (!(childValue instanceof RubyString) && childValue != nil()) {
Original file line number Diff line number Diff line change
@@ -27,8 +27,6 @@ public CheckProgramNameVariableTypeNode(RubyContext context, SourceSection sourc
}

public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

final Object childValue = child.execute(frame);

if (!(childValue instanceof RubyString)) {
Original file line number Diff line number Diff line change
@@ -27,8 +27,6 @@ public CheckRecordSeparatorVariableTypeNode(RubyContext context, SourceSection s
}

public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

final Object childValue = child.execute(frame);

if (!(childValue instanceof RubyString) && childValue != nil()) {
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.globals;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
@@ -26,7 +27,7 @@ public CheckStdoutVariableTypeNode(RubyContext context, SourceSection sourceSect
}

public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final Object childValue = child.execute(frame);

Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.globals;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
@@ -31,7 +32,7 @@ public ReadMatchReferenceNode(RubyContext context, SourceSection sourceSection,

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final Object match = getContext().getThreadManager().getCurrentThread().getThreadLocals().getInstanceVariable("$~");

@@ -71,8 +72,6 @@ public Object execute(VirtualFrame frame) {

@Override
public Object isDefined(VirtualFrame frame) {
notDesignedForCompilation();

if (execute(frame) != nil()) {
return getContext().makeString("global-variable");
} else {
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.globals;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.runtime.builtin.IRubyObject;
@@ -25,7 +26,7 @@ public UpdateVerbosityNode(RubyContext context, SourceSection sourceSection, Rub
}

public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final Object childValue = child.execute(frame);

Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.literal;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.UnexpectedResultException;
import com.oracle.truffle.api.source.SourceSection;
@@ -32,7 +33,7 @@ public ConcatHashLiteralNode(RubyContext context, SourceSection sourceSection, R

@Override
public RubyHash executeRubyHash(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final List<KeyValue> keyValues = new ArrayList<>();

Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ public GenericHashLiteralNode(RubyContext context, SourceSection sourceSection,

@Override
public RubyHash executeRubyHash(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final List<KeyValue> entries = new ArrayList<>();

Original file line number Diff line number Diff line change
@@ -26,9 +26,7 @@ public IsNilNode(RubyContext context, SourceSection sourceSection, RubyNode chil

@Override
public boolean executeBoolean(VirtualFrame frame) {
notDesignedForCompilation();

return child.execute(frame) instanceof RubyNilClass;
return child.execute(frame) == nil();
}

@Override
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.methods.arguments;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
@@ -55,7 +56,7 @@ public Object execute(VirtualFrame frame) {
}

private Object lookupRestKeywordArgumentHash(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyHash hash = RubyArguments.getUserKeywordsHash(frame.getArguments(), minimum);

Original file line number Diff line number Diff line change
@@ -29,8 +29,6 @@ public ReadPostArgumentNode(RubyContext context, SourceSection sourceSection, in

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

int count = RubyArguments.getUserArgumentsCount(frame.getArguments());
final int effectiveIndex = count + negativeIndex;
assert effectiveIndex < count;
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ private void callInherited(VirtualFrame frame, RubyClass superClass, RubyClass s

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyContext context = getContext();

Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ public DefineOrGetModuleNode(RubyContext context, SourceSection sourceSection, S

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

// Look for a current definition of the module, or create a new one

Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.objects;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.IndirectCallNode;
@@ -41,7 +42,7 @@ public OpenModuleNode(RubyContext context, SourceSection sourceSection, RubyNode

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

// TODO(CS): cast
final RubyModule module = (RubyModule) definingModule.execute(frame);
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.objects;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
@@ -30,7 +31,7 @@ public ReadClassVariableNode(RubyContext context, SourceSection sourceSection, S

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyModule moduleObject = lexicalScope.getLiveModule();

Original file line number Diff line number Diff line change
@@ -101,7 +101,7 @@ public Object execute(VirtualFrame frame) {

@Override
public Object isDefined(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

if (isGlobal) {
final RubyBasicObject receiverValue = (RubyBasicObject) receiver.execute(frame);
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.objects;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
@@ -32,7 +33,7 @@ public WriteClassVariableNode(RubyContext context, SourceSection sourceSection,

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyModule moduleObject = lexicalScope.getLiveModule();

Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ private void lookup(VirtualFrame frame, boolean checkIfDefined) {

@Override
public Object isDefined(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final Object self = RubyArguments.getSelf(frame.getArguments());

Original file line number Diff line number Diff line change
@@ -82,7 +82,6 @@ public final Object execute(VirtualFrame frame) {

if (isSplatted) {
// TODO(CS): need something better to splat the arguments array
notDesignedForCompilation();
final RubyArray argumentsArray = (RubyArray) argumentsObjects[0];
return callNode.call(frame, RubyArguments.pack(superMethod, superMethod.getDeclarationFrame(), self, blockObject,argumentsArray.slowToArray()));
} else {
Original file line number Diff line number Diff line change
@@ -69,8 +69,6 @@ private Object[] unsplat(Object[] argumentsObjects) {

@Override
public Object isDefined(VirtualFrame frame) {
notDesignedForCompilation();

if (RubyArguments.getBlock(frame.getArguments()) == null) {
return nil();
} else {
Original file line number Diff line number Diff line change
@@ -37,8 +37,6 @@ public static boolean includesModule(RubyModule module, RubyModule other) {
}

public static boolean assignableTo(RubyClass thisClass, RubyModule otherClass) {
RubyNode.notDesignedForCompilation();

return includesModule(thisClass, otherClass);
}

12 changes: 0 additions & 12 deletions truffle/src/main/java/org/jruby/truffle/runtime/RubyContext.java
Original file line number Diff line number Diff line change
@@ -162,21 +162,15 @@ public Shape getEmptyShape() {
}

public static String checkInstanceVariableName(RubyContext context, String name, Node currentNode) {
RubyNode.notDesignedForCompilation();

if (!name.startsWith("@")) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(context.getCoreLibrary().nameErrorInstanceNameNotAllowable(name, currentNode));
}

return name;
}

public static String checkClassVariableName(RubyContext context, String name, Node currentNode) {
RubyNode.notDesignedForCompilation();

if (!name.startsWith("@@")) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(context.getCoreLibrary().nameErrorInstanceNameNotAllowable(name, currentNode));
}

@@ -353,8 +347,6 @@ public Object makeTuple(VirtualFrame frame, CallDispatchHeadNode newTupleNode, O
}

public IRubyObject toJRuby(Object object) {
RubyNode.notDesignedForCompilation();

if (object instanceof RubyNilClass) {
return runtime.getNil();
} else if (object == getCoreLibrary().getKernelModule()) {
@@ -381,8 +373,6 @@ public IRubyObject toJRuby(Object object) {
}

public org.jruby.RubyArray toJRuby(RubyArray array) {
RubyNode.notDesignedForCompilation();

final Object[] objects = array.slowToArray();
final IRubyObject[] store = new IRubyObject[objects.length];

@@ -410,8 +400,6 @@ public org.jruby.RubyString toJRuby(RubyString string) {
}

public Object toTruffle(IRubyObject object) {
RubyNode.notDesignedForCompilation();

if (object == runtime.getTopSelf()) {
return getCoreLibrary().getMainObject();
} else if (object == runtime.getKernel()) {
Original file line number Diff line number Diff line change
@@ -45,8 +45,6 @@ public static RubyHash verySlowFromEntries(RubyContext context, List<KeyValue> e

@CompilerDirectives.TruffleBoundary
public static RubyHash verySlowFromEntries(RubyClass hashClass, List<KeyValue> entries, boolean byIdentity) {
RubyNode.notDesignedForCompilation();

final RubyHash hash = new RubyHash(hashClass, null, null, null, 0, null);
verySlowSetKeyValues(hash, entries, byIdentity);
return hash;
Original file line number Diff line number Diff line change
@@ -183,8 +183,6 @@ public void setMainScriptSource(Source source) {
}

public static String expandPath(RubyContext context, String fileName) {
RubyNode.notDesignedForCompilation();

// TODO (nirvdrum 11-Feb-15) This needs to work on Windows without calling into non-Truffle JRuby.
if (context.isRunningOnWindows()) {
final org.jruby.RubyString path = context.toJRuby(context.makeString(fileName));
@@ -200,8 +198,6 @@ public static String expandPath(RubyContext context, String fileName) {
}

public static String expandPath(String fileName, String dir) {
RubyNode.notDesignedForCompilation();

/*
* TODO(cs): this isn't quite correct - I think we want to collapse .., but we don't want to
* resolve symlinks etc. This might be where we want to start borrowing JRuby's
Original file line number Diff line number Diff line change
@@ -68,8 +68,6 @@ public ObjectSpaceManager(RubyContext context) {
}

public synchronized void defineFinalizer(RubyBasicObject object, RubyProc proc) {
RubyNode.notDesignedForCompilation();

// Record the finalizer against the object

FinalizerReference finalizerReference = finalizerReferences.get(object);
@@ -97,8 +95,6 @@ public void run() {
}

public synchronized void undefineFinalizer(RubyBasicObject object) {
RubyNode.notDesignedForCompilation();

final FinalizerReference finalizerReference = finalizerReferences.get(object);

if (finalizerReference != null) {
@@ -141,8 +137,6 @@ public static interface ObjectGraphVisitor {

@TruffleBoundary
public Map<Long, RubyBasicObject> collectLiveObjects() {
RubyNode.notDesignedForCompilation();

final Map<Long, RubyBasicObject> liveObjects = new HashMap<>();

final ObjectGraphVisitor visitor = new ObjectGraphVisitor() {
Original file line number Diff line number Diff line change
@@ -254,8 +254,6 @@ public static double[] unboxDouble(Object[] unboxed, int length) {
}

public static void copy(Object source, Object[] destination, int destinationStart, int length) {
RubyNode.notDesignedForCompilation();

if (length == 0) {
return;
}
Original file line number Diff line number Diff line change
@@ -22,8 +22,6 @@
public class FileUtils {

public static byte[] readAllBytesInterruptedly(RubyContext context, String file) {
RubyNode.notDesignedForCompilation();

final Path path = Paths.get(file);

return context.getThreadManager().runUntilResult(new BlockingActionWithoutGlobalLock<byte[]>() {

0 comments on commit 4486d07

Please sign in to comment.