Skip to content

Commit

Permalink
Showing 78 changed files with 203 additions and 106 deletions.
3 changes: 3 additions & 0 deletions truffle/src/main/java/org/jruby/truffle/RubyContext.java
Original file line number Diff line number Diff line change
@@ -33,6 +33,9 @@
import org.jruby.truffle.core.array.ArrayOperations;
import org.jruby.truffle.core.rope.RopeTable;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.core.symbol.SymbolTable;
import org.jruby.truffle.core.thread.ThreadManager;
import org.jruby.truffle.extra.AttachmentsManager;
import org.jruby.truffle.language.*;
import org.jruby.truffle.language.arguments.RubyArguments;
import org.jruby.truffle.platform.TrufflePOSIXHandler;
2 changes: 2 additions & 0 deletions truffle/src/main/java/org/jruby/truffle/core/ClassLayout.java
Original file line number Diff line number Diff line change
@@ -11,6 +11,8 @@

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import org.jruby.truffle.core.module.ModuleFields;
import org.jruby.truffle.core.module.ModuleLayout;
import org.jruby.truffle.om.dsl.api.Layout;
import org.jruby.truffle.om.dsl.api.Nullable;

3 changes: 3 additions & 0 deletions truffle/src/main/java/org/jruby/truffle/core/ClassNodes.java
Original file line number Diff line number Diff line change
@@ -19,6 +19,9 @@
import com.oracle.truffle.api.object.ObjectType;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.core.module.ModuleFields;
import org.jruby.truffle.core.module.ModuleNodes;
import org.jruby.truffle.core.module.ModuleNodesFactory;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
19 changes: 18 additions & 1 deletion truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java
Original file line number Diff line number Diff line change
@@ -30,15 +30,32 @@
import org.jruby.ext.ffi.Platform.OS_TYPE;
import org.jruby.runtime.Constants;
import org.jruby.runtime.encoding.EncodingService;
import org.jruby.truffle.core.encoding.EncodingConverterNodesFactory;
import org.jruby.truffle.core.encoding.EncodingNodes;
import org.jruby.truffle.core.encoding.EncodingNodesFactory;
import org.jruby.truffle.core.encoding.EncodingOperations;
import org.jruby.truffle.core.fiber.FiberNodesFactory;
import org.jruby.truffle.core.method.MethodNodesFactory;
import org.jruby.truffle.core.method.UnboundMethodNodesFactory;
import org.jruby.truffle.core.module.ModuleNodes;
import org.jruby.truffle.core.module.ModuleNodesFactory;
import org.jruby.truffle.core.numeric.BignumNodesFactory;
import org.jruby.truffle.core.numeric.FixnumNodesFactory;
import org.jruby.truffle.core.numeric.FloatNodesFactory;
import org.jruby.truffle.core.numeric.IntegerNodesFactory;
import org.jruby.truffle.core.range.RangeNodesFactory;
import org.jruby.truffle.core.regexp.MatchDataNodesFactory;
import org.jruby.truffle.core.regexp.RegexpNodesFactory;
import org.jruby.truffle.core.string.StringNodesFactory;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.core.symbol.SymbolNodesFactory;
import org.jruby.truffle.core.thread.ThreadBacktraceLocationLayoutImpl;
import org.jruby.truffle.core.thread.ThreadBacktraceLocationNodesFactory;
import org.jruby.truffle.core.thread.ThreadNodesFactory;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.array.ArrayNodes;
import org.jruby.truffle.core.array.ArrayNodesFactory;
import org.jruby.truffle.core.fixnum.FixnumNodesFactory;
import org.jruby.truffle.core.hash.HashNodesFactory;
import org.jruby.truffle.stdlib.BigDecimalNodesFactory;
import org.jruby.truffle.stdlib.DigestNodesFactory;
Original file line number Diff line number Diff line change
@@ -18,11 +18,11 @@
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.numeric.FixnumLowerNodeGen;
import org.jruby.truffle.language.*;
import org.jruby.truffle.language.arguments.*;
import org.jruby.truffle.core.cast.TaintResultNode;
import org.jruby.truffle.language.control.SequenceNode;
import org.jruby.truffle.core.fixnum.FixnumLowerNodeGen;
import org.jruby.truffle.language.methods.ExceptionTranslatingNode;
import org.jruby.truffle.language.objects.SelfNode;
import org.jruby.truffle.language.objects.SingletonClassNode;
Original file line number Diff line number Diff line change
@@ -30,10 +30,14 @@
import org.jcodings.specific.UTF8Encoding;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.encoding.EncodingNodes;
import org.jruby.truffle.core.encoding.EncodingOperations;
import org.jruby.truffle.core.format.parser.PrintfCompiler;
import org.jruby.truffle.core.format.runtime.PackResult;
import org.jruby.truffle.core.format.runtime.exceptions.*;
import org.jruby.truffle.core.method.MethodFilter;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.core.thread.ThreadBacktraceLocationLayoutImpl;
import org.jruby.truffle.language.*;
import org.jruby.truffle.language.arguments.RubyArguments;
import org.jruby.truffle.core.cast.BooleanCastWithDefaultNodeGen;
@@ -67,7 +71,7 @@
import org.jruby.truffle.language.methods.InternalMethod;
import org.jruby.truffle.language.methods.SharedMethodInfo;
import org.jruby.truffle.core.rope.Rope;
import org.jruby.truffle.core.ThreadManager.BlockingAction;
import org.jruby.truffle.core.thread.ThreadManager.BlockingAction;
import org.jruby.truffle.language.translator.TranslatorDriver;
import org.jruby.truffle.language.translator.TranslatorDriver.ParserContext;
import org.jruby.util.ByteList;
19 changes: 19 additions & 0 deletions truffle/src/main/java/org/jruby/truffle/core/Layouts.java
Original file line number Diff line number Diff line change
@@ -12,14 +12,33 @@
import com.oracle.truffle.api.object.HiddenKey;
import org.jruby.truffle.core.array.ArrayLayout;
import org.jruby.truffle.core.array.ArrayLayoutImpl;
import org.jruby.truffle.core.encoding.EncodingConverterLayout;
import org.jruby.truffle.core.encoding.EncodingConverterLayoutImpl;
import org.jruby.truffle.core.encoding.EncodingLayout;
import org.jruby.truffle.core.encoding.EncodingLayoutImpl;
import org.jruby.truffle.core.fiber.FiberLayout;
import org.jruby.truffle.core.fiber.FiberLayoutImpl;
import org.jruby.truffle.core.hash.HashLayout;
import org.jruby.truffle.core.hash.HashLayoutImpl;
import org.jruby.truffle.core.method.MethodLayout;
import org.jruby.truffle.core.method.MethodLayoutImpl;
import org.jruby.truffle.core.method.UnboundMethodLayout;
import org.jruby.truffle.core.method.UnboundMethodLayoutImpl;
import org.jruby.truffle.core.module.ModuleLayout;
import org.jruby.truffle.core.module.ModuleLayoutImpl;
import org.jruby.truffle.core.numeric.BignumLayout;
import org.jruby.truffle.core.numeric.BignumLayoutImpl;
import org.jruby.truffle.core.range.*;
import org.jruby.truffle.core.regexp.MatchDataLayout;
import org.jruby.truffle.core.regexp.MatchDataLayoutImpl;
import org.jruby.truffle.core.regexp.RegexpLayout;
import org.jruby.truffle.core.regexp.RegexpLayoutImpl;
import org.jruby.truffle.core.string.StringLayout;
import org.jruby.truffle.core.string.StringLayoutImpl;
import org.jruby.truffle.core.symbol.SymbolLayout;
import org.jruby.truffle.core.symbol.SymbolLayoutImpl;
import org.jruby.truffle.core.thread.ThreadLayout;
import org.jruby.truffle.core.thread.ThreadLayoutImpl;
import org.jruby.truffle.stdlib.BigDecimalLayout;
import org.jruby.truffle.stdlib.BigDecimalLayoutImpl;
import org.jruby.truffle.stdlib.psych.EmitterLayout;
2 changes: 2 additions & 0 deletions truffle/src/main/java/org/jruby/truffle/core/MainNodes.java
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.core.module.ModuleNodes;
import org.jruby.truffle.core.module.ModuleNodesFactory;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.RubyContext;

Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
import org.jruby.truffle.language.NotProvided;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.core.ThreadManager.BlockingAction;
import org.jruby.truffle.core.thread.ThreadManager.BlockingAction;

import java.util.concurrent.locks.ReentrantLock;

Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@
import com.oracle.truffle.api.utilities.CyclicAssumption;
import org.jruby.RubyGC;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.thread.ThreadManager;
import org.jruby.truffle.core.thread.ThreadNodes;
import org.jruby.truffle.language.control.RaiseException;

import java.lang.ref.ReferenceQueue;
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.core.module.IncludedModule;
import org.jruby.truffle.language.ModuleChain;

public class PrependMarker implements ModuleChain {
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
import org.jruby.truffle.language.objects.AllocateObjectNodeGen;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.core.ThreadManager.BlockingAction;
import org.jruby.truffle.core.thread.ThreadManager.BlockingAction;
import org.jruby.truffle.util.MethodHandleUtils;

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

import java.lang.invoke.MethodHandle;
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@
import org.jruby.truffle.core.format.parser.PackCompiler;
import org.jruby.truffle.core.format.runtime.PackResult;
import org.jruby.truffle.core.format.runtime.exceptions.*;
import org.jruby.truffle.core.numeric.FixnumLowerNodeGen;
import org.jruby.truffle.core.rope.*;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
@@ -43,7 +44,6 @@
import org.jruby.truffle.core.coerce.ToIntNode;
import org.jruby.truffle.core.coerce.ToIntNodeGen;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.fixnum.FixnumLowerNodeGen;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.language.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.language.dispatch.MissingBehavior;
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@

import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.fixnum.FixnumLiteralNode;
import org.jruby.truffle.core.numeric.FixnumLiteralNode;
import org.jruby.truffle.RubyContext;

public abstract class PrimitiveArrayNodeFactory {
Original file line number Diff line number Diff line change
@@ -7,8 +7,6 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/


package org.jruby.truffle.core.coerce;

import com.oracle.truffle.api.CompilerDirectives;
@@ -18,10 +16,10 @@
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.utilities.ConditionProfile;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.numeric.FloatNodesFactory;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.FloatNodes;
import org.jruby.truffle.core.FloatNodesFactory;
import org.jruby.truffle.core.numeric.FloatNodes;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.language.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.RubyContext;
Original file line number Diff line number Diff line change
@@ -7,11 +7,12 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.encoding;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import org.jcodings.transcode.EConv;
import org.jruby.truffle.core.BasicObjectLayout;
import org.jruby.truffle.om.dsl.api.Layout;
import org.jruby.truffle.om.dsl.api.Nullable;

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.core;
package org.jruby.truffle.core.encoding;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.Specialization;
@@ -24,6 +24,7 @@
import org.jruby.Ruby;
import org.jruby.runtime.Visibility;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.truffle.core.*;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.language.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.RubyContext;
Original file line number Diff line number Diff line change
@@ -7,11 +7,12 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.encoding;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import org.jcodings.Encoding;
import org.jruby.truffle.core.BasicObjectLayout;
import org.jruby.truffle.om.dsl.api.Layout;
import org.jruby.truffle.om.dsl.api.Nullable;
import org.jruby.util.ByteList;
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.core;
package org.jruby.truffle.core.encoding;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
@@ -22,7 +22,9 @@
import org.jcodings.specific.UTF8Encoding;
import org.jcodings.util.CaseInsensitiveBytesHash;
import org.jcodings.util.Hash;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.core.symbol.SymbolNodes;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.core.coerce.ToStrNode;
import org.jruby.truffle.core.coerce.ToStrNodeGen;
Original file line number Diff line number Diff line change
@@ -10,13 +10,14 @@
* Some of the code in this class is transposed from org.jruby.runtime.encoding.EncodingService,
* licensed under the same EPL1.0/GPL 2.0/LGPL 2.1 used throughout.
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.encoding;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.object.DynamicObject;
import org.jcodings.Encoding;
import org.jcodings.EncodingDB;
import org.jruby.truffle.core.Layouts;
import org.jruby.util.ByteList;

public abstract class EncodingOperations {
Original file line number Diff line number Diff line change
@@ -7,10 +7,11 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.fiber;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import org.jruby.truffle.core.BasicObjectLayout;
import org.jruby.truffle.om.dsl.api.Layout;
import org.jruby.truffle.om.dsl.api.Nullable;
import org.jruby.truffle.om.dsl.api.Volatile;
Original file line number Diff line number Diff line change
@@ -7,10 +7,11 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.fiber;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.RubyContext;

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.core;
package org.jruby.truffle.core.fiber;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
@@ -17,18 +17,18 @@
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.*;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.cast.SingleValueCastNode;
import org.jruby.truffle.core.cast.SingleValueCastNodeGen;
import org.jruby.truffle.core.FiberNodesFactory.FiberTransferNodeFactory;
import org.jruby.truffle.language.methods.UnsupportedOperationBehavior;
import org.jruby.truffle.core.rubinius.ThreadPrimitiveNodes.ThreadRaisePrimitiveNode;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.BreakException;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.language.control.ReturnException;
import org.jruby.truffle.core.ThreadManager.BlockingAction;
import org.jruby.truffle.core.thread.ThreadManager.BlockingAction;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
@@ -155,7 +155,7 @@ public static void cleanup(RubyContext context, DynamicObject fiber) {
private static Object[] waitForResume(RubyContext context, final DynamicObject fiber) {
assert RubyGuards.isRubyFiber(fiber);

final FiberMessage message = context.getThreadManager().runUntilResult(null, new ThreadManager.BlockingAction<FiberMessage>() {
final FiberMessage message = context.getThreadManager().runUntilResult(null, new BlockingAction<FiberMessage>() {
@Override
public FiberMessage block() throws InterruptedException {
return Layouts.FIBER.getMessageQueue(fiber).take();
@@ -271,7 +271,7 @@ public abstract static class ResumeNode extends CoreMethodArrayArgumentsNode {

public ResumeNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
fiberTransferNode = FiberTransferNodeFactory.create(context, sourceSection, new RubyNode[] { null, null, null });
fiberTransferNode = FiberNodesFactory.FiberTransferNodeFactory.create(context, sourceSection, new RubyNode[] { null, null, null });
}

@Specialization
@@ -288,7 +288,7 @@ public abstract static class YieldNode extends CoreMethodArrayArgumentsNode {

public YieldNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
fiberTransferNode = FiberTransferNodeFactory.create(context, sourceSection, new RubyNode[] { null, null, null });
fiberTransferNode = FiberNodesFactory.FiberTransferNodeFactory.create(context, sourceSection, new RubyNode[] { null, null, null });
}

@Specialization
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import org.jruby.truffle.core.format.nodes.PackNode;
import org.jruby.truffle.core.format.nodes.SourceNode;
import org.jruby.truffle.core.FixnumOrBignumNode;
import org.jruby.truffle.core.numeric.FixnumOrBignumNode;
import org.jruby.truffle.RubyContext;

import java.math.BigInteger;
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.core.format.nodes.PackNode;
import org.jruby.truffle.core.format.runtime.MissingValue;
import org.jruby.truffle.core.FixnumOrBignumNode;
import org.jruby.truffle.core.numeric.FixnumOrBignumNode;
import org.jruby.truffle.RubyContext;

import java.math.BigInteger;
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.core;
package org.jruby.truffle.core.method;

import org.jruby.runtime.Visibility;
import org.jruby.truffle.language.methods.InternalMethod;
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.core;
package org.jruby.truffle.core.method;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
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.core;
package org.jruby.truffle.core.method;

import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.CompilerDirectives;
@@ -23,6 +23,7 @@
import com.oracle.truffle.api.source.SourceSection;
import org.jcodings.specific.UTF8Encoding;
import org.jruby.runtime.ArgumentDescriptor;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.RubyRootNode;
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.core;
package org.jruby.truffle.core.method;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
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.core;
package org.jruby.truffle.core.method;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
@@ -17,6 +17,7 @@
import org.jcodings.specific.UTF8Encoding;
import org.jruby.runtime.ArgumentDescriptor;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.methods.CanBindMethodToModuleNode;
Original file line number Diff line number Diff line change
@@ -7,9 +7,10 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.module;

import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.core.PrependMarker;
import org.jruby.truffle.language.ModuleChain;

import java.util.Iterator;
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.core;
package org.jruby.truffle.core.module;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.object.DynamicObject;
Original file line number Diff line number Diff line change
@@ -7,8 +7,9 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.module;

import org.jruby.truffle.core.PrependMarker;
import org.jruby.truffle.language.ModuleChain;

public class IncludedModulesIterator extends AncestorIterator {
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.core;
package org.jruby.truffle.core.module;

import com.oracle.truffle.api.Assumption;
import com.oracle.truffle.api.CompilerDirectives;
@@ -16,6 +16,8 @@
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.utilities.CyclicAssumption;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.method.MethodFilter;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.literal.LiteralNode;
Original file line number Diff line number Diff line change
@@ -7,13 +7,12 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.module;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import org.jruby.truffle.core.BasicObjectLayout;
import org.jruby.truffle.om.dsl.api.Layout;
import org.jruby.truffle.core.ModuleFields;

@Layout
public interface ModuleLayout extends BasicObjectLayout {
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.core;
package org.jruby.truffle.core.module;

import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.CompilerDirectives;
@@ -32,8 +32,9 @@
import org.jcodings.specific.UTF8Encoding;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.array.ArrayHelpers;
import org.jruby.truffle.core.array.ArrayOperations;
import org.jruby.truffle.core.method.MethodFilter;
import org.jruby.truffle.core.string.StringNodes;
import org.jruby.truffle.core.string.StringNodesFactory;
import org.jruby.truffle.core.string.StringOperations;
@@ -49,9 +50,6 @@
import org.jruby.truffle.core.coerce.*;
import org.jruby.truffle.language.constants.ReadConstantNode;
import org.jruby.truffle.language.control.SequenceNode;
import org.jruby.truffle.core.ModuleNodesFactory.GenerateAccessorNodeGen;
import org.jruby.truffle.core.ModuleNodesFactory.SetMethodVisibilityNodeGen;
import org.jruby.truffle.core.ModuleNodesFactory.SetVisibilityNodeGen;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.language.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.language.methods.AddMethodNode;
@@ -423,8 +421,8 @@ public abstract static class AttrNode extends CoreMethodArrayArgumentsNode {

public AttrNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
this.generateGetterNode = GenerateAccessorNodeGen.create(context, sourceSection, true, null, null);
this.generateSetterNode = GenerateAccessorNodeGen.create(context, sourceSection, false, null, null);
this.generateGetterNode = ModuleNodesFactory.GenerateAccessorNodeGen.create(context, sourceSection, true, null, null);
this.generateSetterNode = ModuleNodesFactory.GenerateAccessorNodeGen.create(context, sourceSection, false, null, null);
}

@Specialization
@@ -456,8 +454,8 @@ public abstract static class AttrAccessorNode extends CoreMethodArrayArgumentsNo

public AttrAccessorNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
this.generateGetterNode = GenerateAccessorNodeGen.create(context, sourceSection, true, null, null);
this.generateSetterNode = GenerateAccessorNodeGen.create(context, sourceSection, false, null, null);
this.generateGetterNode = ModuleNodesFactory.GenerateAccessorNodeGen.create(context, sourceSection, true, null, null);
this.generateSetterNode = ModuleNodesFactory.GenerateAccessorNodeGen.create(context, sourceSection, false, null, null);
}

@Specialization
@@ -478,7 +476,7 @@ public abstract static class AttrReaderNode extends CoreMethodArrayArgumentsNode

public AttrReaderNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
this.generateGetterNode = GenerateAccessorNodeGen.create(context, sourceSection, true, null, null);
this.generateGetterNode = ModuleNodesFactory.GenerateAccessorNodeGen.create(context, sourceSection, true, null, null);
}

@Specialization
@@ -498,7 +496,7 @@ public abstract static class AttrWriterNode extends CoreMethodArrayArgumentsNode

public AttrWriterNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
this.generateSetterNode = GenerateAccessorNodeGen.create(context, sourceSection, false, null, null);
this.generateSetterNode = ModuleNodesFactory.GenerateAccessorNodeGen.create(context, sourceSection, false, null, null);
}

@Specialization
@@ -1324,7 +1322,7 @@ public abstract static class ModuleFunctionNode extends CoreMethodArrayArguments

public ModuleFunctionNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
setVisibilityNode = SetVisibilityNodeGen.create(context, sourceSection, Visibility.MODULE_FUNCTION, null, null);
setVisibilityNode = ModuleNodesFactory.SetVisibilityNodeGen.create(context, sourceSection, Visibility.MODULE_FUNCTION, null, null);
}

@Specialization
@@ -1396,7 +1394,7 @@ public abstract static class PublicNode extends CoreMethodArrayArgumentsNode {

public PublicNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
setVisibilityNode = SetVisibilityNodeGen.create(context, sourceSection, Visibility.PUBLIC, null, null);
setVisibilityNode = ModuleNodesFactory.SetVisibilityNodeGen.create(context, sourceSection, Visibility.PUBLIC, null, null);
}

public abstract DynamicObject executePublic(VirtualFrame frame, DynamicObject module, Object[] args);
@@ -1417,7 +1415,7 @@ public abstract static class PublicClassMethodNode extends CoreMethodArrayArgume
public PublicClassMethodNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
this.singletonClassNode = SingletonClassNodeGen.create(context, sourceSection, null);
this.setMethodVisibilityNode = SetMethodVisibilityNodeGen.create(context, sourceSection, Visibility.PUBLIC, null, null);
this.setMethodVisibilityNode = ModuleNodesFactory.SetMethodVisibilityNodeGen.create(context, sourceSection, Visibility.PUBLIC, null, null);
}

@Specialization
@@ -1439,7 +1437,7 @@ public abstract static class PrivateNode extends CoreMethodArrayArgumentsNode {

public PrivateNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
setVisibilityNode = SetVisibilityNodeGen.create(context, sourceSection, Visibility.PRIVATE, null, null);
setVisibilityNode = ModuleNodesFactory.SetVisibilityNodeGen.create(context, sourceSection, Visibility.PRIVATE, null, null);
}

public abstract DynamicObject executePrivate(VirtualFrame frame, DynamicObject module, Object[] args);
@@ -1482,7 +1480,7 @@ public abstract static class PrivateClassMethodNode extends CoreMethodArrayArgum
public PrivateClassMethodNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
this.singletonClassNode = SingletonClassNodeGen.create(context, sourceSection, null);
this.setMethodVisibilityNode = SetMethodVisibilityNodeGen.create(context, sourceSection, Visibility.PRIVATE, null, null);
this.setMethodVisibilityNode = ModuleNodesFactory.SetMethodVisibilityNodeGen.create(context, sourceSection, Visibility.PRIVATE, null, null);
}

@Specialization
@@ -1780,7 +1778,7 @@ public abstract static class ProtectedNode extends CoreMethodArrayArgumentsNode

public ProtectedNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
setVisibilityNode = SetVisibilityNodeGen.create(context, sourceSection, Visibility.PROTECTED, null, null);
setVisibilityNode = ModuleNodesFactory.SetVisibilityNodeGen.create(context, sourceSection, Visibility.PROTECTED, null, null);
}

@Specialization
@@ -1942,7 +1940,7 @@ public abstract static class SetVisibilityNode extends RubyNode {
public SetVisibilityNode(RubyContext context, SourceSection sourceSection, Visibility visibility) {
super(context, sourceSection);
this.visibility = visibility;
this.setMethodVisibilityNode = SetMethodVisibilityNodeGen.create(context, sourceSection, visibility, null, null);
this.setMethodVisibilityNode = ModuleNodesFactory.SetMethodVisibilityNodeGen.create(context, sourceSection, visibility, null, null);
}

public abstract DynamicObject executeSetVisibility(VirtualFrame frame, DynamicObject module, Object[] arguments);
Original file line number Diff line number Diff line change
@@ -7,10 +7,11 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import org.jruby.truffle.core.BasicObjectLayout;
import org.jruby.truffle.om.dsl.api.Layout;

import java.math.BigInteger;
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.core;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
@@ -17,6 +17,7 @@
import com.oracle.truffle.api.utilities.BranchProfile;
import com.oracle.truffle.api.source.SourceSection;
import org.jcodings.specific.USASCIIEncoding;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.cast.BooleanCastNode;
import org.jruby.truffle.core.cast.BooleanCastNodeGen;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
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.core.fixnum;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.NodeCost;
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.core.fixnum;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.Specialization;
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.core.fixnum;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
@@ -23,7 +23,6 @@
import org.jcodings.specific.USASCIIEncoding;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.fixnum.FixnumNodesFactory.RightShiftNodeFactory;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.language.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.language.methods.UnsupportedOperationBehavior;
@@ -874,7 +873,7 @@ public Object leftShiftWithOverflow(long a, int b) {
public Object leftShiftNeg(VirtualFrame frame, long a, int b) {
if (rightShiftNode == null) {
CompilerDirectives.transferToInterpreter();
rightShiftNode = insert(RightShiftNodeFactory.create(getContext(), getSourceSection(), new RubyNode[]{ null, null }));
rightShiftNode = insert(FixnumNodesFactory.RightShiftNodeFactory.create(getContext(), getSourceSection(), new RubyNode[]{ null, null }));
}
return rightShiftNode.executeRightShift(frame, a, -b);
}
Original file line number Diff line number Diff line change
@@ -7,13 +7,15 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.utilities.ConditionProfile;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.CoreLibrary;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.RubyContext;

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.core;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
@@ -19,6 +19,10 @@
import com.oracle.truffle.api.source.SourceSection;
import org.jcodings.specific.USASCIIEncoding;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.core.CoreClass;
import org.jruby.truffle.core.CoreMethod;
import org.jruby.truffle.core.CoreMethodArrayArgumentsNode;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.language.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.language.NotProvided;
Original file line number Diff line number Diff line change
@@ -7,13 +7,14 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.utilities.BranchProfile;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
Original file line number Diff line number Diff line change
@@ -7,14 +7,16 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.numeric;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.dsl.Cached;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.numeric.FixnumOrBignumNode;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.language.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.language.methods.UnsupportedOperationBehavior;
Original file line number Diff line number Diff line change
@@ -7,10 +7,11 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.range;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import org.jruby.truffle.core.BasicObjectLayout;
import org.jruby.truffle.om.dsl.api.Layout;

@Layout
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.core;
package org.jruby.truffle.core.range;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
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.core;
package org.jruby.truffle.core.range;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
Original file line number Diff line number Diff line change
@@ -7,13 +7,14 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.range;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.dsl.*;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.*;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.cast.BooleanCastNodeGen;
Original file line number Diff line number Diff line change
@@ -7,12 +7,13 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.regexp;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.core.regexp.RegexpNodes;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.language.RubyNode;
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
import org.jcodings.transcode.EConv;
import org.jcodings.transcode.EConvResult;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.core.EncodingConverterNodes;
import org.jruby.truffle.core.encoding.EncodingConverterNodes;
import org.jruby.truffle.core.rope.RopeNodes;
import org.jruby.truffle.core.rope.RopeNodesFactory;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.EncodingNodes;
import org.jruby.truffle.core.encoding.EncodingNodes;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.Layouts;

Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.utilities.ConditionProfile;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.BignumNodes;
import org.jruby.truffle.core.numeric.BignumNodes;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.Layouts;

Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
import com.oracle.truffle.api.utilities.BranchProfile;
import com.oracle.truffle.api.source.SourceSection;
import org.jcodings.specific.UTF8Encoding;
import org.jruby.truffle.core.FixnumOrBignumNode;
import org.jruby.truffle.core.numeric.FixnumOrBignumNode;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.core.Layouts;
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@
import org.jruby.truffle.stdlib.sockets.FDSet;
import org.jruby.truffle.stdlib.sockets.FDSetFactory;
import org.jruby.truffle.stdlib.sockets.FDSetFactoryFactory;
import org.jruby.truffle.core.ThreadManager;
import org.jruby.truffle.core.thread.ThreadManager;
import org.jruby.util.ByteList;
import org.jruby.util.Dir;
import org.jruby.util.unsafe.UnsafeHolder;
Original file line number Diff line number Diff line change
@@ -11,12 +11,12 @@

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.method.MethodNodesFactory;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.arguments.NodeArrayToObjectArrayNode;
import org.jruby.truffle.language.arguments.ReadAllArgumentsNode;
import org.jruby.truffle.language.arguments.ReadBlockNode;
import org.jruby.truffle.core.MethodNodesFactory.CallNodeFactory;
import org.jruby.truffle.language.literal.LiteralNode;
import org.jruby.truffle.language.NotProvided;
import org.jruby.truffle.language.control.ReturnID;
@@ -40,7 +40,7 @@ public int getPrimitiveArity() {
@Override
public RubyNode createCallPrimitiveNode(RubyContext context, SourceSection sourceSection, ReturnID returnID) {
return new CallRubiniusPrimitiveNode(context, sourceSection,
CallNodeFactory.create(context, sourceSection, new RubyNode[] {
MethodNodesFactory.CallNodeFactory.create(context, sourceSection, new RubyNode[] {
new LiteralNode(context, sourceSection, method),
new ReadAllArgumentsNode(context, sourceSection),
new ReadBlockNode(context, sourceSection, NotProvided.INSTANCE)
@@ -49,7 +49,7 @@ public RubyNode createCallPrimitiveNode(RubyContext context, SourceSection sourc

@Override
public RubyNode createInvokePrimitiveNode(RubyContext context, SourceSection sourceSection, RubyNode[] arguments) {
return CallNodeFactory.create(context, sourceSection, new RubyNode[] {
return MethodNodesFactory.CallNodeFactory.create(context, sourceSection, new RubyNode[] {
new LiteralNode(context, sourceSection, method),
new NodeArrayToObjectArrayNode(context, sourceSection, arguments),
new ReadBlockNode(context, sourceSection, NotProvided.INSTANCE)
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@

import com.oracle.truffle.api.dsl.NodeFactory;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.core.numeric.FixnumLowerNodeGen;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.arguments.MissingArgumentBehaviour;
import org.jruby.truffle.language.arguments.ReadPreArgumentNode;
import org.jruby.truffle.core.fixnum.FixnumLowerNodeGen;
import org.jruby.truffle.language.objects.SelfNode;
import org.jruby.truffle.language.control.ReturnID;
import org.jruby.truffle.RubyContext;
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.cast.ArrayAttributeCastNodeGen;
import org.jruby.truffle.core.cast.TaintResultNode;
import org.jruby.truffle.core.EncodingNodes;
import org.jruby.truffle.core.encoding.EncodingNodes;
import org.jruby.truffle.core.rope.RopeNodes;
import org.jruby.truffle.core.rope.RopeNodesFactory;
import org.jruby.truffle.core.string.StringGuards;
@@ -82,7 +82,7 @@
import org.jruby.truffle.language.NotProvided;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.control.RaiseException;
import org.jruby.truffle.core.EncodingOperations;
import org.jruby.truffle.core.encoding.EncodingOperations;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.core.rope.CodeRange;
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@
import org.jruby.truffle.platform.signal.Signal;
import org.jruby.truffle.platform.signal.SignalHandler;
import org.jruby.truffle.platform.signal.SignalOperations;
import org.jruby.truffle.core.ThreadManager;
import org.jruby.truffle.core.thread.ThreadManager;
import org.jruby.util.io.PosixShim;

import java.lang.management.ManagementFactory;
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.core;
package org.jruby.truffle.core.string;

import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.ExplodeLoop;
Original file line number Diff line number Diff line change
@@ -40,9 +40,12 @@
import org.jcodings.specific.ASCIIEncoding;
import org.jcodings.specific.UTF8Encoding;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.encoding.EncodingNodes;
import org.jruby.truffle.core.encoding.EncodingOperations;
import org.jruby.truffle.core.format.parser.UnpackCompiler;
import org.jruby.truffle.core.format.runtime.PackResult;
import org.jruby.truffle.core.format.runtime.exceptions.*;
import org.jruby.truffle.core.numeric.FixnumLowerNodeGen;
import org.jruby.truffle.core.rope.*;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
@@ -55,7 +58,6 @@
import org.jruby.truffle.core.coerce.ToStrNode;
import org.jruby.truffle.core.coerce.ToStrNodeGen;
import org.jruby.truffle.core.array.ArrayCoreMethodNode;
import org.jruby.truffle.core.fixnum.FixnumLowerNodeGen;
import org.jruby.truffle.language.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.language.dispatch.DispatchHeadNodeFactory;
import org.jruby.truffle.language.objects.*;
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
import org.jcodings.Encoding;
import org.jruby.RubyEncoding;
import org.jruby.truffle.core.array.ArrayOperations;
import org.jruby.truffle.core.EncodingNodes;
import org.jruby.truffle.core.encoding.EncodingNodes;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.RubyContext;
Original file line number Diff line number Diff line change
@@ -7,10 +7,11 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.symbol;

import com.oracle.truffle.api.object.DynamicObject;
import org.jcodings.Encoding;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.core.rope.CodeRange;
import org.jruby.util.ByteList;
import org.jruby.util.CodeRangeable;
Original file line number Diff line number Diff line change
@@ -7,10 +7,11 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.symbol;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
import org.jruby.truffle.core.BasicObjectLayout;
import org.jruby.truffle.om.dsl.api.Nullable;
import org.jruby.truffle.core.rope.Rope;

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.core;
package org.jruby.truffle.core.symbol;

import com.oracle.truffle.api.CallTarget;
import com.oracle.truffle.api.CompilerDirectives;
@@ -21,6 +21,8 @@
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.runtime.ArgumentDescriptor;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.encoding.EncodingNodes;
import org.jruby.truffle.language.RubyRootNode;
import org.jruby.truffle.language.arguments.CheckArityNode;
import org.jruby.truffle.language.control.SequenceNode;
Original file line number Diff line number Diff line change
@@ -7,12 +7,13 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.symbol;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.object.DynamicObject;
import org.jcodings.specific.USASCIIEncoding;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.core.rope.Rope;
import org.jruby.truffle.core.rope.RopeOperations;
import org.jruby.truffle.core.string.StringOperations;
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.core;
package org.jruby.truffle.core.thread;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
Original file line number Diff line number Diff line change
@@ -7,14 +7,17 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.thread;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jcodings.specific.UTF8Encoding;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.CoreClass;
import org.jruby.truffle.core.CoreMethod;
import org.jruby.truffle.core.UnaryCoreMethodNode;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.language.backtrace.Activation;
import org.jruby.truffle.language.backtrace.BacktraceFormatter;
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.core;
package org.jruby.truffle.core.thread;

import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.object.DynamicObjectFactory;
@@ -19,7 +19,7 @@
import org.jruby.truffle.om.dsl.api.Layout;
import org.jruby.truffle.om.dsl.api.Nullable;
import org.jruby.truffle.om.dsl.api.Volatile;
import org.jruby.truffle.core.FiberManager;
import org.jruby.truffle.core.fiber.FiberManager;

import java.util.List;
import java.util.concurrent.CountDownLatch;
Original file line number Diff line number Diff line change
@@ -7,14 +7,16 @@
* GNU General Public License version 2
* GNU Lesser General Public License version 2.1
*/
package org.jruby.truffle.core;
package org.jruby.truffle.core.thread;

import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.object.DynamicObject;
import jnr.posix.DefaultNativeTimeval;
import jnr.posix.Timeval;
import org.jruby.RubyThread.Status;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.core.fiber.FiberNodes;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.language.backtrace.BacktraceFormatter;
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.core;
package org.jruby.truffle.core.thread;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
@@ -19,6 +19,9 @@
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.RubyThread.Status;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.fiber.FiberManager;
import org.jruby.truffle.core.fiber.FiberNodes;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.NotProvided;
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
* GNU Lesser General Public License version 2.1
*/

package org.jruby.truffle.core;
package org.jruby.truffle.extra;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.Truffle;
@@ -28,6 +28,9 @@
import com.oracle.truffle.api.source.Source;
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.tools.LineToProbesMap;
import org.jruby.truffle.core.BindingNodes;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.core.ProcNodes;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.RubyLanguage;
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.RubyLanguage;
import org.jruby.truffle.language.methods.InternalMethod;
import org.jruby.truffle.core.AttachmentsManager;
import org.jruby.truffle.extra.AttachmentsManager;
import org.jruby.truffle.language.translator.TranslatorDriver;
import org.jruby.truffle.language.translator.TranslatorDriver.ParserContext;

Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.KernelNodes;
import org.jruby.truffle.core.KernelNodesFactory;
import org.jruby.truffle.core.ModuleNodes;
import org.jruby.truffle.core.module.ModuleNodes;
import org.jruby.truffle.language.LexicalScope;
import org.jruby.truffle.language.RubyConstant;
import org.jruby.truffle.RubyContext;
Original file line number Diff line number Diff line change
@@ -28,9 +28,14 @@
import org.jruby.runtime.ArgumentDescriptor;
import org.jruby.runtime.Helpers;
import org.jruby.runtime.Visibility;
import org.jruby.truffle.core.encoding.EncodingNodes;
import org.jruby.truffle.core.module.ModuleNodesFactory;
import org.jruby.truffle.core.range.RangeNodesFactory;
import org.jruby.truffle.core.regexp.InterpolatedRegexpNode;
import org.jruby.truffle.core.regexp.MatchDataNodesFactory;
import org.jruby.truffle.core.regexp.RegexpNodes;
import org.jruby.truffle.core.regexp.RegexpNodesFactory;
import org.jruby.truffle.core.string.InterpolatedStringNode;
import org.jruby.truffle.core.string.StringNodesFactory;
import org.jruby.truffle.language.control.*;
import org.jruby.truffle.language.exceptions.*;
@@ -45,12 +50,10 @@
import org.jruby.truffle.language.constants.ReadLiteralConstantNode;
import org.jruby.truffle.language.constants.WriteConstantNode;
import org.jruby.truffle.core.*;
import org.jruby.truffle.core.ModuleNodesFactory.AliasMethodNodeFactory;
import org.jruby.truffle.core.ModuleNodesFactory.UndefMethodNodeFactory;
import org.jruby.truffle.core.ProcNodes.Type;
import org.jruby.truffle.core.array.*;
import org.jruby.truffle.core.array.ArrayNodes.PushOneNode;
import org.jruby.truffle.core.fixnum.FixnumLiteralNode;
import org.jruby.truffle.core.numeric.FixnumLiteralNode;
import org.jruby.truffle.core.hash.ConcatHashLiteralNode;
import org.jruby.truffle.core.hash.HashLiteralNode;
import org.jruby.truffle.core.hash.HashNodesFactory;
@@ -143,7 +146,7 @@ public RubyNode visitAliasNode(org.jruby.ast.AliasNode node) {
final DynamicObject oldName = translateNameNodeToSymbol(node.getOldName());
final DynamicObject newName = translateNameNodeToSymbol(node.getNewName());

final RubyNode ret = AliasMethodNodeFactory.create(context, sourceSection,
final RubyNode ret = ModuleNodesFactory.AliasMethodNodeFactory.create(context, sourceSection,
new RaiseIfFrozenNode(new GetDefaultDefineeNode(context, sourceSection)),
new LiteralNode(context, sourceSection, newName),
new LiteralNode(context, sourceSection, oldName));
@@ -2837,7 +2840,7 @@ public RubyNode visitUndefNode(org.jruby.ast.UndefNode node) {
final SourceSection sourceSection = translate(node.getPosition());
final DynamicObject nameSymbol = translateNameNodeToSymbol(node.getName());

final RubyNode ret = UndefMethodNodeFactory.create(context, sourceSection, new RubyNode[]{
final RubyNode ret = ModuleNodesFactory.UndefMethodNodeFactory.create(context, sourceSection, new RubyNode[]{
new RaiseIfFrozenNode(new GetDefaultDefineeNode(context, sourceSection)),
new LiteralNode(context, sourceSection, new Object[]{ nameSymbol })
});
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@
import org.jruby.ext.bigdecimal.RubyBigDecimal;
import org.jruby.runtime.Visibility;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.truffle.core.numeric.FixnumOrBignumNode;
import org.jruby.truffle.language.RubyGuards;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.core.cast.BooleanCastNode;
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
package org.jruby.truffle.util;

import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.ThreadManager.BlockingAction;
import org.jruby.truffle.core.thread.ThreadManager.BlockingAction;

import java.io.IOException;
import java.nio.channels.ClosedByInterruptException;

0 comments on commit 308a601

Please sign in to comment.