Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 35d7e5b68a28
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: eeabafeb82d3
Choose a head ref
  • 8 commits
  • 14 files changed
  • 1 contributor

Commits on Feb 7, 2016

  1. Copy the full SHA
    ff9e696 View commit details
  2. Copy the full SHA
    11add73 View commit details
  3. Copy the full SHA
    f1a24dd View commit details
  4. Copy the full SHA
    e622c70 View commit details
  5. Copy the full SHA
    7349d1f View commit details
  6. Copy the full SHA
    de93162 View commit details
  7. [Truffle] Use Function1 from JRuby, instead of our own Function, unti…

    …l we can switch to Java 8.
    chrisseaton committed Feb 7, 2016
    Copy the full SHA
    c8964da View commit details
  8. Copy the full SHA
    eeabafe View commit details
35 changes: 0 additions & 35 deletions truffle/src/main/java/org/jruby/truffle/PolyglotEngineMain.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.language.methods.InternalMethod;
import org.jruby.truffle.util.ArgumentDescriptorUtils;
import org.jruby.truffle.language.arguments.ArgumentDescriptorUtils;

@CoreClass(name = "Method")
public abstract class MethodNodes {
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
import org.jruby.truffle.language.objects.MetaClassNodeGen;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.util.ArgumentDescriptorUtils;
import org.jruby.truffle.language.arguments.ArgumentDescriptorUtils;

@CoreClass(name = "UnboundMethod")
public abstract class UnboundMethodNodes {
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.language.methods.InternalMethod;
import org.jruby.truffle.language.methods.SharedMethodInfo;
import org.jruby.truffle.util.ArgumentDescriptorUtils;
import org.jruby.truffle.language.arguments.ArgumentDescriptorUtils;

@CoreClass(name = "Proc")
public abstract class ProcNodes {
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.util;
package org.jruby.truffle.core.queue;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
@@ -24,15 +24,6 @@ public static MethodHandle getPrivateGetter(Class<?> klass, String fieldName) {
}
}

public static MethodHandle getPrivateSetter(final Class<?> klass, final String fieldName) {
final Field field = getPrivateField(klass, fieldName);
try {
return MethodHandles.lookup().unreflectSetter(field);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}

private static Field getPrivateField(final Class<?> klass, final String fieldName) {
try {
final Field field = klass.getDeclaredField(fieldName);
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.core.thread.ThreadManager.BlockingAction;
import org.jruby.truffle.util.MethodHandleUtils;

import java.lang.invoke.MethodHandle;
import java.util.concurrent.BlockingQueue;
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.core.thread.ThreadManager.BlockingAction;
import org.jruby.truffle.util.MethodHandleUtils;

import java.lang.invoke.MethodHandle;
import java.util.concurrent.ArrayBlockingQueue;
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.language.methods.InternalMethod;
import org.jruby.truffle.util.Function;
import org.jruby.util.IdUtil;
import org.jruby.util.func.Function1;

import java.util.HashMap;
import java.util.Map;
@@ -328,7 +328,7 @@ public static Map<String, Object> getAllClassVariables(DynamicObject module) {

final Map<String, Object> classVariables = new HashMap<>();

classVariableLookup(module, new Function<DynamicObject, Object>() {
classVariableLookup(module, new Function1<Object, DynamicObject>() {
@Override
public Object apply(DynamicObject module) {
classVariables.putAll(Layouts.MODULE.getFields(module).getClassVariables());
@@ -343,7 +343,7 @@ public Object apply(DynamicObject module) {
public static Object lookupClassVariable(DynamicObject module, final String name) {
assert RubyGuards.isRubyModule(module);

return classVariableLookup(module, new Function<DynamicObject, Object>() {
return classVariableLookup(module, new Function1<Object, DynamicObject>() {
@Override
public Object apply(DynamicObject module) {
return Layouts.MODULE.getFields(module).getClassVariables().get(name);
@@ -355,7 +355,7 @@ public Object apply(DynamicObject module) {
public static void setClassVariable(final RubyContext context, DynamicObject module, final String name, final Object value, final Node currentNode) {
assert RubyGuards.isRubyModule(module);

DynamicObject found = classVariableLookup(module, new Function<DynamicObject, DynamicObject>() {
DynamicObject found = classVariableLookup(module, new Function1<DynamicObject, DynamicObject>() {
@Override
public DynamicObject apply(DynamicObject module) {
if (Layouts.MODULE.getFields(module).getClassVariables().containsKey(name)) {
@@ -373,7 +373,7 @@ public DynamicObject apply(DynamicObject module) {
}
}

private static <R> R classVariableLookup(DynamicObject module, Function<DynamicObject, R> action) {
private static <R> R classVariableLookup(DynamicObject module, Function1<R, DynamicObject> action) {
CompilerAsserts.neverPartOfCompilation();

// Look in the current module
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
*
* Contains code modified from JRuby's org.jruby.runtime.Helpers and org.jruby.runtime.ArgumentType.
*/
package org.jruby.truffle.util;
package org.jruby.truffle.language.arguments;

import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.runtime.ArgumentDescriptor;
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.util;
package org.jruby.truffle.tools.callgraph;

import java.util.IdentityHashMap;
import java.util.Map;
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@
import com.oracle.truffle.api.frame.FrameSlot;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.language.methods.SharedMethodInfo;
import org.jruby.truffle.util.IdProvider;

import java.io.PrintStream;

16 changes: 0 additions & 16 deletions truffle/src/main/java/org/jruby/truffle/util/Consumer.java

This file was deleted.

42 changes: 0 additions & 42 deletions truffle/src/main/java/org/jruby/truffle/util/FileUtils.java

This file was deleted.

16 changes: 0 additions & 16 deletions truffle/src/main/java/org/jruby/truffle/util/Function.java

This file was deleted.