Skip to content

Commit

Permalink
Showing 12 changed files with 10 additions and 887 deletions.
20 changes: 0 additions & 20 deletions core/src/main/java/org/jruby/truffle/nodes/RubyNode.java
Original file line number Diff line number Diff line change
@@ -24,8 +24,6 @@
import org.jruby.truffle.runtime.core.RubyRange;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.hash.HashSearchResult;
import org.jruby.truffle.runtime.rubinius.RubiniusByteArray;
import org.jruby.truffle.runtime.rubinius.RubiniusChannel;

import java.math.BigInteger;

@@ -179,14 +177,6 @@ public UndefinedPlaceholder executeUndefinedPlaceholder(VirtualFrame frame) thro
return RubyTypesGen.RUBYTYPES.expectUndefinedPlaceholder(execute(frame));
}

public RubiniusByteArray executeRubiniusByteArray(VirtualFrame frame) throws UnexpectedResultException {
return RubyTypesGen.RUBYTYPES.expectRubiniusByteArray(execute(frame));
}

public RubiniusChannel executeRubiniusChannel(VirtualFrame frame) throws UnexpectedResultException {
return RubyTypesGen.RUBYTYPES.expectRubiniusChannel(execute(frame));
}

public RubyEncodingConverter executeRubyEncodingConverter(VirtualFrame frame) throws UnexpectedResultException {
return RubyTypesGen.RUBYTYPES.expectRubyEncodingConverter(execute(frame));
}
@@ -383,16 +373,6 @@ public boolean isRubyTime(Object value) {
return value instanceof RubyTime;
}

@SuppressWarnings("static-method")
public boolean isRubiniusChannel(Object value) {
return value instanceof RubiniusChannel;
}

@SuppressWarnings("static-method")
public boolean isRubiniusByteArray(Object value) {
return value instanceof RubiniusByteArray;
}

@SuppressWarnings("static-method")
public boolean isRubyEncodingConverter(Object value) {
return value instanceof RubyEncodingConverter;
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/truffle/nodes/RubyTypes.java
Original file line number Diff line number Diff line change
@@ -17,9 +17,6 @@
import org.jruby.truffle.runtime.core.RubyHash;
import org.jruby.truffle.runtime.core.RubyRange;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.hash.HashSearchResult;
import org.jruby.truffle.runtime.rubinius.RubiniusByteArray;
import org.jruby.truffle.runtime.rubinius.RubiniusChannel;
import org.jruby.truffle.runtime.LexicalScope;

/**
@@ -57,8 +54,6 @@
RubySymbol.class, //
RubyThread.class, //
RubyTime.class, //
RubiniusChannel.class, //
RubiniusByteArray.class, //
RubyEncodingConverter.class, //
RubyBasicObject.class, //
Object[].class})
17 changes: 0 additions & 17 deletions core/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@
import org.jruby.truffle.runtime.UndefinedPlaceholder;
import org.jruby.truffle.runtime.core.RubyArray;
import org.jruby.truffle.runtime.core.RubyRange;
import org.jruby.truffle.runtime.rubinius.RubiniusByteArray;
import org.jruby.util.ByteList;
import org.jruby.util.Pack;

@@ -1159,20 +1158,4 @@ public RubyArray unpack(RubyString string, RubyString format) {

}

// Rubinius API
@CoreMethod(names = "data")
public abstract static class DataNode extends CoreMethodNode {
public DataNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public DataNode(DataNode prev) {
super(prev);
}

@Specialization
public RubyBasicObject data(RubyString string) {
return new RubiniusByteArray(getContext().getCoreLibrary().getRubiniusLibrary().getByteArrayCLass(), string.getBytes().getUnsafeBytes());
}
}
}

This file was deleted.

107 changes: 0 additions & 107 deletions core/src/main/java/org/jruby/truffle/nodes/rubinius/ChannelNodes.java

This file was deleted.

38 changes: 0 additions & 38 deletions core/src/main/java/org/jruby/truffle/nodes/rubinius/TypeNodes.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.hash.KeyValue;
import org.jruby.truffle.runtime.hash.HashOperations;
import org.jruby.truffle.runtime.rubinius.RubiniusLibrary;
import org.jruby.truffle.translator.TranslatorDriver;
import org.jruby.util.cli.Options;
import org.jruby.util.cli.OutputStrings;
@@ -111,8 +110,6 @@ public class CoreLibrary {
private ArrayNodes.MinBlock arrayMinBlock;
private ArrayNodes.MaxBlock arrayMaxBlock;

@CompilerDirectives.CompilationFinal private RubiniusLibrary rubiniusLibrary;

public CoreLibrary(RubyContext context) {
this.context = context;
}
@@ -297,8 +294,6 @@ public void initializeAfterMethodsAdded() {
objectClass.setConstant(null, "RUBY_RELEASE_DATE", context.makeString(Constants.COMPILE_DATE));
objectClass.setConstant(null, "RUBY_DESCRIPTION", context.makeString(OutputStrings.getVersionString()));

rubiniusLibrary = new RubiniusLibrary(this);

if (Options.TRUFFLE_LOAD_CORE.load()) {
loadRubyCore("jruby/truffle/core.rb");
}
@@ -792,10 +787,6 @@ public RubyClass getIntegerClass() {
return integerClass;
}

public RubiniusLibrary getRubiniusLibrary() {
return rubiniusLibrary;
}

public RubyClass getArgumentErrorClass() {
return argumentErrorClass;
}

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 8 additions & 0 deletions core/src/main/ruby/jruby/truffle/core/main.rb
Original file line number Diff line number Diff line change
@@ -26,6 +26,10 @@ def self.set_encoding(external, internal)
end

module STDOUT
def self.puts(*values)
Kernel.send(:puts, *values)
end

def self.print(*values)
Kernel.send(:print, *values)
end
@@ -55,6 +59,10 @@ def self.set_encoding(external, internal)
$stdout = STDOUT

module STDERR
def self.puts(*values)
Kernel.send(:puts, *values)
end

def self.external_encoding
@external
end
8 changes: 2 additions & 6 deletions core/src/main/ruby/jruby/truffle/core/rubinius/README.md
Original file line number Diff line number Diff line change
@@ -9,14 +9,10 @@ written in Ruby, in some cases modified. We have taken files from commit
8d01207061518355da9b53274fe8766ecf85fdfe. This code was written by Evan Phoenix,
Charles Nutter, et al.

`api/shims` is our own code.

Some of the code from `rubinius-core-api` is also found at
`core/src/main/java/org/jruby/truffle/runtime/rubinius`, and again may be
modified.

https://github.com/rubinius/rubinius-core-api

`api/shims` is our own code.

We try not to modify files from Rubinius, so that they can easily be merged from
upstream in the future. In some cases there are shims that patch up Rubinius
code after it has been loaded, such as `api/shims`. We have also tried to keep

0 comments on commit 8051985

Please sign in to comment.