Skip to content

Commit

Permalink
Showing 1 changed file with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -150,7 +150,6 @@ public Object isSubclassOf(VirtualFrame frame, RubyBasicObject self, RubyBasicOb
@Specialization(guards = "!isRubyModule(other)")
public Object isSubclassOfOther(VirtualFrame frame, RubyBasicObject self, RubyBasicObject other) {
CompilerDirectives.transferToInterpreter();

throw new RaiseException(getContext().getCoreLibrary().typeError("compared with non class/module", this));
}

@@ -183,7 +182,6 @@ public Object isSubclassOfOrEqualTo(VirtualFrame frame, RubyBasicObject self, Ru
@Specialization(guards = "!isRubyModule(other)")
public Object isSubclassOfOrEqualToOther(VirtualFrame frame, RubyBasicObject self, RubyBasicObject other) {
CompilerDirectives.transferToInterpreter();

throw new RaiseException(getContext().getCoreLibrary().typeError("compared with non class/module", this));
}

@@ -220,7 +218,6 @@ public Object isSuperclassOf(VirtualFrame frame, RubyBasicObject self, RubyBasic
@Specialization(guards = "!isRubyModule(other)")
public Object isSuperclassOfOther(VirtualFrame frame, RubyBasicObject self, RubyBasicObject other) {
CompilerDirectives.transferToInterpreter();

throw new RaiseException(getContext().getCoreLibrary().typeError("compared with non class/module", this));
}

@@ -253,7 +250,6 @@ public Object isSuperclassOfOrEqualTo(VirtualFrame frame, RubyBasicObject self,
@Specialization(guards = "!isRubyModule(other)")
public Object isSuperclassOfOrEqualToOther(VirtualFrame frame, RubyBasicObject self, RubyBasicObject other) {
CompilerDirectives.transferToInterpreter();

throw new RaiseException(getContext().getCoreLibrary().typeError("compared with non class/module", this));
}

@@ -305,8 +301,6 @@ public Object compare(VirtualFrame frame, RubyBasicObject self, RubyBasicObject

@Specialization(guards = "!isRubyModule(other)")
public Object compareOther(VirtualFrame frame, RubyBasicObject self, RubyBasicObject other) {
CompilerDirectives.transferToInterpreter();

return nil();
}

@@ -336,8 +330,6 @@ public RubyNode coerceOldNameToString(RubyNode oldName) {

@Specialization
public RubyBasicObject aliasMethod(RubyBasicObject module, String newName, String oldName) {
CompilerDirectives.transferToInterpreter();

getModel(module).alias(this, newName, oldName);
return module;
}
@@ -448,7 +440,6 @@ public AttrNode(RubyContext context, SourceSection sourceSection) {

@Specialization
public RubyBasicObject attr(VirtualFrame frame, RubyBasicObject module, Object[] names) {
CompilerDirectives.transferToInterpreter();
final boolean setter;
if (names.length == 2 && names[1] instanceof Boolean) {
setter = (boolean) names[1];
@@ -1202,16 +1193,12 @@ public InitializeCopyNode(RubyContext context, SourceSection sourceSection) {

@Specialization(guards = { "!isRubyClass(self)", "isRubyModule(from)", "!isRubyClass(from)" })
public Object initializeCopyModule(RubyBasicObject self, RubyBasicObject from) {
CompilerDirectives.transferToInterpreter();

getModel(self).initCopy(from);
return nil();
}

@Specialization(guards = {"isRubyClass(self)", "isRubyClass(from)"})
public Object initializeCopy(RubyBasicObject self, RubyBasicObject from) {
CompilerDirectives.transferToInterpreter();

if (from == getContext().getCoreLibrary().getBasicObjectClass()) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().typeError("can't copy the root class", this));
@@ -1496,8 +1483,6 @@ public RubyNode coerceToString(RubyNode name) {

@Specialization
public boolean isPrivateMethodDefined(RubyBasicObject module, String name) {
CompilerDirectives.transferToInterpreter();

InternalMethod method = ModuleOperations.lookupMethod(module, name);
return method != null && method.getVisibility().isPrivate();
}
@@ -1546,8 +1531,6 @@ public RubyNode coerceToString(RubyNode name) {

@Specialization
public boolean isProtectedMethodDefined(RubyBasicObject module, String name) {
CompilerDirectives.transferToInterpreter();

InternalMethod method = ModuleOperations.lookupMethod(module, name);
return method != null && method.getVisibility().isProtected();
}
@@ -1597,8 +1580,6 @@ public RubyNode coerceToString(RubyNode name) {

@Specialization
public RubyBasicObject publicInstanceMethod(RubyBasicObject module, String name) {
CompilerDirectives.transferToInterpreter();

// TODO(CS, 11-Jan-15) cache this lookup
final InternalMethod method = ModuleOperations.lookupMethod(module, name);

@@ -1658,8 +1639,6 @@ public RubyNode coerceToString(RubyNode name) {

@Specialization
public boolean isPublicMethodDefined(RubyBasicObject module, String name) {
CompilerDirectives.transferToInterpreter();

InternalMethod method = ModuleOperations.lookupMethod(module, name);
return method != null && method.getVisibility() == Visibility.PUBLIC;
}
@@ -1709,8 +1688,6 @@ public RubyNode coerceToString(RubyNode name) {

@Specialization
public RubyBasicObject instanceMethod(RubyBasicObject module, String name) {
CompilerDirectives.transferToInterpreter();

// TODO(CS, 11-Jan-15) cache this lookup
final InternalMethod method = ModuleOperations.lookupMethod(module, name);

@@ -1943,8 +1920,6 @@ public SetVisibilityNode(RubyContext context, SourceSection sourceSection, Visib

@Specialization
public RubyBasicObject setVisibility(VirtualFrame frame, RubyBasicObject module, Object[] names) {
CompilerDirectives.transferToInterpreter();

if (names.length == 0) {
setCurrentVisibility(visibility);
} else {

0 comments on commit 72106c1

Please sign in to comment.