Skip to content

Commit

Permalink
[Truffle] Remove some notDesignedForCompilations.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed May 6, 2015
1 parent 3827161 commit b1185e0
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.methods;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.Frame;
import com.oracle.truffle.api.frame.FrameSlot;
import com.oracle.truffle.api.frame.VirtualFrame;
Expand Down Expand Up @@ -39,7 +40,7 @@ public AddMethodNode(RubyContext context, SourceSection section, RubyNode receiv

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

final Object receiverObject = receiver.execute(frame);

Expand Down Expand Up @@ -67,8 +68,6 @@ public RubySymbol execute(VirtualFrame frame) {
}

private static Visibility getVisibility(Frame frame, String name) {
notDesignedForCompilation();

if (ModuleOperations.isMethodPrivateFromName(name)) {
return Visibility.PRIVATE;
} else {
Expand All @@ -77,8 +76,6 @@ private static Visibility getVisibility(Frame frame, String name) {
}

private static Visibility getVisibility(Frame frame) {
notDesignedForCompilation();

while (frame != null) {
Visibility visibility = findVisibility(frame);
if (visibility != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ public Object alias(RubyBignum value) {

@Specialization
public Object alias(RubyModule module) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

module.alias(this, newName, oldName);
return null;
}

@Specialization(guards = {"!isRubyModule(object)", "!isRubyBignum(object)"})
public Object alias(RubyBasicObject object) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

object.getSingletonClass(this).alias(this, newName, oldName);
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public CatchReturnAsErrorNode(RubyContext context, SourceSection sourceSection,

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

try {
return body.execute(frame);
} catch (ReturnException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package org.jruby.truffle.nodes.methods;

import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.MaterializedFrame;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
Expand Down Expand Up @@ -41,7 +42,7 @@ public MethodDefinitionNode(RubyContext context, SourceSection sourceSection, St
}

public InternalMethod executeMethod(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final MaterializedFrame declarationFrame;

Expand All @@ -51,12 +52,6 @@ public InternalMethod executeMethod(VirtualFrame frame) {
declarationFrame = null;
}

return executeMethod(frame, declarationFrame);
}

public InternalMethod executeMethod(VirtualFrame frame, MaterializedFrame declarationFrame) {
notDesignedForCompilation();

return new InternalMethod(sharedMethodInfo, name, null, null, false, callTarget, declarationFrame);
}

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

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.FrameSlot;
import com.oracle.truffle.api.frame.FrameSlotKind;
import com.oracle.truffle.api.frame.VirtualFrame;
Expand All @@ -34,7 +35,7 @@ public SetMethodDeclarationContext(RubyContext context, SourceSection sourceSect

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

FrameSlot slot = frame.getFrameDescriptor().findOrAddFrameSlot(RubyModule.VISIBILITY_FRAME_SLOT_ID, "visibility for " + what, FrameSlotKind.Object);
Object oldVisibility = frame.getValue(slot);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public SymbolProcNode(RubyContext context, SourceSection sourceSection, String s

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

final Object[] args = frame.getArguments();
final Object receiver = RubyArguments.getUserArgument(args, 0);
final Object[] arguments = RubyArguments.extractUserArguments(args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
package org.jruby.truffle.nodes.methods;

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;
Expand All @@ -29,7 +30,7 @@ public UndefNode(RubyContext context, SourceSection sourceSection, RubyNode modu

@Override
public void executeVoid(VirtualFrame frame) {
notDesignedForCompilation();
CompilerDirectives.transferToInterpreter();

final RubyModule moduleObject;

Expand Down

0 comments on commit b1185e0

Please sign in to comment.