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: 7ad625f80ef4
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 77ea9c46ffd4
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 6, 2016

  1. Copy the full SHA
    16e9fe8 View commit details
  2. [Truffle] Range is safe.

    chrisseaton committed Apr 6, 2016
    Copy the full SHA
    851f6b7 View commit details
  3. Copy the full SHA
    77ea9c4 View commit details
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ public abstract class ProcessNodes {
public static final int CLOCK_THREAD_CPUTIME = 3; // Linux only
public static final int CLOCK_MONOTONIC_RAW = 4; // Linux only

@CoreMethod(unsafeNeedsAudit = true, names = "clock_gettime", onSingleton = true, required = 1, optional = 1)
@CoreMethod(names = "clock_gettime", onSingleton = true, required = 1, optional = 1)
@NodeChildren({
@NodeChild(type = RubyNode.class, value = "clock_id"),
@NodeChild(type = RubyNode.class, value = "unit")
20 changes: 10 additions & 10 deletions truffle/src/main/java/org/jruby/truffle/core/range/RangeNodes.java
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@
@CoreClass(name = "Range")
public abstract class RangeNodes {

@CoreMethod(unsafeNeedsAudit = true, names = { "collect", "map" }, needsBlock = true, lowerFixnumSelf = true)
@CoreMethod(names = { "collect", "map" }, needsBlock = true, lowerFixnumSelf = true)
public abstract static class CollectNode extends YieldingCoreMethodNode {

public CollectNode(RubyContext context, SourceSection sourceSection) {
@@ -80,7 +80,7 @@ public DynamicObject collect(VirtualFrame frame, DynamicObject range, DynamicObj

}

@CoreMethod(unsafeNeedsAudit = true, names = "each", needsBlock = true, lowerFixnumSelf = true, returnsEnumeratorIfNoBlock = true)
@CoreMethod(names = "each", needsBlock = true, lowerFixnumSelf = true, returnsEnumeratorIfNoBlock = true)
public abstract static class EachNode extends YieldingCoreMethodNode {

@Child private CallDispatchHeadNode eachInternalCall;
@@ -173,7 +173,7 @@ public Object each(VirtualFrame frame, DynamicObject range, DynamicObject block)

}

@CoreMethod(unsafeNeedsAudit = true, names = "exclude_end?")
@CoreMethod(names = "exclude_end?")
public abstract static class ExcludeEndNode extends CoreMethodArrayArgumentsNode {

public ExcludeEndNode(RubyContext context, SourceSection sourceSection) {
@@ -197,7 +197,7 @@ public boolean excludeEndObject(DynamicObject range) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "begin")
@CoreMethod(names = "begin")
public abstract static class BeginNode extends CoreMethodArrayArgumentsNode {

public BeginNode(RubyContext context, SourceSection sourceSection) {
@@ -221,7 +221,7 @@ public Object eachObject(DynamicObject range) {

}

@CoreMethod(unsafeNeedsAudit = true, names = { "dup", "clone" })
@CoreMethod(names = { "dup", "clone" })
public abstract static class DupNode extends UnaryCoreMethodNode {

@Child private AllocateObjectNode allocateObjectNode;
@@ -261,7 +261,7 @@ public DynamicObject dup(DynamicObject range) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "end")
@CoreMethod(names = "end")
public abstract static class EndNode extends CoreMethodArrayArgumentsNode {

public EndNode(RubyContext context, SourceSection sourceSection) {
@@ -285,7 +285,7 @@ public Object lastObject(DynamicObject range) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "step", needsBlock = true, optional = 1, returnsEnumeratorIfNoBlock = true)
@CoreMethod(names = "step", needsBlock = true, optional = 1, returnsEnumeratorIfNoBlock = true)
public abstract static class StepNode extends YieldingCoreMethodNode {

@Child private CallDispatchHeadNode stepInternalCall;
@@ -423,7 +423,7 @@ public Object step(VirtualFrame frame, DynamicObject range, Object step, NotProv

}

@CoreMethod(unsafeNeedsAudit = true, names = "to_a", lowerFixnumSelf = true)
@CoreMethod(names = "to_a", lowerFixnumSelf = true)
public abstract static class ToANode extends CoreMethodArrayArgumentsNode {

@Child private CallDispatchHeadNode toAInternalCall;
@@ -529,7 +529,7 @@ public boolean setExcludeEnd(DynamicObject range, boolean excludeEnd) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "new", constructor = true, required = 2, optional = 1)
@CoreMethod(names = "new", constructor = true, required = 2, optional = 1)
@NodeChildren({
@NodeChild(type = RubyNode.class, value = "rubyClass"),
@NodeChild(type = RubyNode.class, value = "begin"),
@@ -603,7 +603,7 @@ protected boolean isIntOrLong(Object value) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "allocate", constructor = true)
@CoreMethod(names = "allocate", constructor = true)
public abstract static class AllocateNode extends UnaryCoreMethodNode {

@Child private AllocateObjectNode allocateNode;
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@
@CoreClass(name = "Truffle::Primitive")
public abstract class TrufflePrimitiveNodes {

@CoreMethod(unsafeNeedsAudit = true, names = "binding_of_caller", isModuleFunction = true)
@CoreMethod(names = "binding_of_caller", isModuleFunction = true)
public abstract static class BindingOfCallerNode extends CoreMethodArrayArgumentsNode {

public BindingOfCallerNode(RubyContext context, SourceSection sourceSection) {
@@ -117,7 +117,7 @@ public MaterializedFrame visitFrame(FrameInstance frameInstance) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "source_of_caller", isModuleFunction = true)
@CoreMethod(names = "source_of_caller", isModuleFunction = true)
public abstract static class SourceOfCallerNode extends CoreMethodArrayArgumentsNode {

public SourceOfCallerNode(RubyContext context, SourceSection sourceSection) {
@@ -225,7 +225,7 @@ public DynamicObject javaClassOf(Object value) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "dump_string", onSingleton = true, required = 1)
@CoreMethod(names = "dump_string", onSingleton = true, required = 1)
public abstract static class DumpStringNode extends CoreMethodArrayArgumentsNode {

public DumpStringNode(RubyContext context, SourceSection sourceSection) {
@@ -308,7 +308,7 @@ public DynamicObject simpleShell() {

}

@CoreMethod(unsafeNeedsAudit = true, names = "coverage_result", onSingleton = true)
@CoreMethod(names = "coverage_result", onSingleton = true)
public abstract static class CoverageResultNode extends CoreMethodArrayArgumentsNode {

public CoverageResultNode(RubyContext context, SourceSection sourceSection) {
@@ -352,7 +352,7 @@ private Object[] lineCountsStore(Long[] array) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "coverage_start", onSingleton = true)
@CoreMethod(names = "coverage_start", onSingleton = true)
public abstract static class CoverageStartNode extends CoreMethodArrayArgumentsNode {

public CoverageStartNode(RubyContext context, SourceSection sourceSection) {
@@ -371,7 +371,7 @@ public DynamicObject coverageStart() {

}

@CoreMethod(unsafeNeedsAudit = true, names = "attach", onSingleton = true, required = 2, needsBlock = true)
@CoreMethod(names = "attach", onSingleton = true, required = 2, needsBlock = true)
public abstract static class AttachNode extends CoreMethodArrayArgumentsNode {

public AttachNode(RubyContext context, SourceSection sourceSection) {
@@ -386,7 +386,7 @@ public DynamicObject attach(DynamicObject file, int line, DynamicObject block) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "detach", onSingleton = true, required = 1)
@CoreMethod(names = "detach", onSingleton = true, required = 1)
public abstract static class DetachNode extends CoreMethodArrayArgumentsNode {

public DetachNode(RubyContext context, SourceSection sourceSection) {
@@ -403,7 +403,7 @@ public DynamicObject detach(DynamicObject handle) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "debug_print", onSingleton = true, required = 1)
@CoreMethod(names = "debug_print", onSingleton = true, required = 1, unsafe = UnsafeGroup.IO)
public abstract static class DebugPrintNode extends CoreMethodArrayArgumentsNode {

public DebugPrintNode(RubyContext context, SourceSection sourceSection) {
@@ -448,7 +448,7 @@ private boolean isAsciiPrintable(char c) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "convert_to_mutable_rope", onSingleton = true, required = 1)
@CoreMethod(names = "convert_to_mutable_rope", onSingleton = true, required = 1)
public abstract static class ConvertToMutableRope extends CoreMethodArrayArgumentsNode {

public ConvertToMutableRope(RubyContext context, SourceSection sourceSection) {
@@ -464,7 +464,7 @@ public DynamicObject convertToMutableRope(DynamicObject string) {
}
}

@CoreMethod(unsafeNeedsAudit = true, names = "debug_print_rope", onSingleton = true, required = 1, optional = 1)
@CoreMethod(unsafeNeedsAudit = true, names = "debug_print_rope", onSingleton = true, required = 1, optional = 1, unsafe = UnsafeGroup.IO)
public abstract static class DebugPrintRopeNode extends CoreMethodArrayArgumentsNode {

@Child private RopeNodes.DebugPrintRopeNode debugPrintRopeNode;
@@ -498,7 +498,7 @@ public DynamicObject debugPrint(DynamicObject string, boolean printString) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "flatten_rope", onSingleton = true, required = 1)
@CoreMethod(names = "flatten_rope", onSingleton = true, required = 1)
public abstract static class FlattenRopeNode extends CoreMethodArrayArgumentsNode {

public FlattenRopeNode(RubyContext context, SourceSection sourceSection) {
@@ -515,7 +515,7 @@ public DynamicObject flattenRope(DynamicObject string,

}

@CoreMethod(unsafeNeedsAudit = true, names = "jruby_home_directory", onSingleton = true)
@CoreMethod(names = "jruby_home_directory", onSingleton = true)
public abstract static class JRubyHomeDirectoryNode extends CoreMethodNode {

public JRubyHomeDirectoryNode(RubyContext context, SourceSection sourceSection) {
@@ -530,7 +530,7 @@ public DynamicObject jrubyHomeDirectory() {

}

@CoreMethod(unsafeNeedsAudit = true, names = "jruby_home_directory_protocol", onSingleton = true)
@CoreMethod(names = "jruby_home_directory_protocol", onSingleton = true)
public abstract static class JRubyHomeDirectoryProtocolNode extends CoreMethodNode {

public JRubyHomeDirectoryProtocolNode(RubyContext context, SourceSection sourceSection) {
@@ -557,7 +557,7 @@ public DynamicObject jrubyHomeDirectoryProtocol() {

}

@CoreMethod(unsafeNeedsAudit = true, names = "host_os", onSingleton = true)
@CoreMethod(names = "host_os", onSingleton = true)
public abstract static class HostOSNode extends CoreMethodNode {

public HostOSNode(RubyContext context, SourceSection sourceSection) {
@@ -586,7 +586,7 @@ public Object atExit(boolean always, DynamicObject block) {
}
}

@CoreMethod(unsafeNeedsAudit = true, names = "install_rubinius_primitive", isModuleFunction = true, required = 1)
@CoreMethod(names = "install_rubinius_primitive", isModuleFunction = true, required = 1)
public abstract static class InstallRubiniusPrimitiveNode extends CoreMethodArrayArgumentsNode {

public InstallRubiniusPrimitiveNode(RubyContext context, SourceSection sourceSection) {
@@ -601,7 +601,7 @@ public Object installRubiniusPrimitive(DynamicObject rubyMethod) {
}
}

@CoreMethod(unsafeNeedsAudit = true, names = "fixnum_lower", isModuleFunction = true, required = 1)
@CoreMethod(names = "fixnum_lower", isModuleFunction = true, required = 1)
public abstract static class FixnumLowerPrimitiveNode extends UnaryCoreMethodNode {

public FixnumLowerPrimitiveNode(RubyContext context, SourceSection sourceSection) {
@@ -629,7 +629,7 @@ protected static boolean canLower(long value) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "synchronized", isModuleFunction = true, required = 1, needsBlock = true)
@CoreMethod(names = "synchronized", isModuleFunction = true, required = 1, needsBlock = true)
public abstract static class SynchronizedPrimitiveNode extends YieldingCoreMethodNode {

public SynchronizedPrimitiveNode(RubyContext context, SourceSection sourceSection) {
@@ -645,7 +645,7 @@ public Object synchronize(VirtualFrame frame, DynamicObject self, DynamicObject
}
}

@CoreMethod(unsafeNeedsAudit = true, names = "full_memory_barrier", isModuleFunction = true)
@CoreMethod(names = "full_memory_barrier", isModuleFunction = true)
public abstract static class FullMemoryBarrierPrimitiveNode extends CoreMethodNode {

public FullMemoryBarrierPrimitiveNode(RubyContext context, SourceSection sourceSection) {
@@ -663,7 +663,7 @@ public Object fullMemoryBarrier() {
}
}

@CoreMethod(unsafeNeedsAudit = true, names = "print_backtrace", onSingleton = true)
@CoreMethod(names = "print_backtrace", onSingleton = true, unsafe = UnsafeGroup.IO)
public abstract static class PrintBacktraceNode extends CoreMethodNode {

public PrintBacktraceNode(RubyContext context, SourceSection sourceSection) {
@@ -685,7 +685,7 @@ public DynamicObject printBacktrace() {

}

@CoreMethod(unsafeNeedsAudit = true, names = "ast", onSingleton = true, required = 1)
@CoreMethod(names = "ast", onSingleton = true, required = 1)
public abstract static class ASTNode extends CoreMethodArrayArgumentsNode {

public ASTNode(RubyContext context, SourceSection sourceSection) {
@@ -734,7 +734,7 @@ private DynamicObject ast(Node node) {

}

@CoreMethod(unsafeNeedsAudit = true, names = "object_type_of", onSingleton = true, required = 1)
@CoreMethod(names = "object_type_of", onSingleton = true, required = 1)
public abstract static class ObjectTypeOfNode extends CoreMethodArrayArgumentsNode {

public ObjectTypeOfNode(RubyContext context, SourceSection sourceSection) {
@@ -747,7 +747,7 @@ public DynamicObject objectTypeOf(DynamicObject value) {
}
}

@CoreMethod(unsafeNeedsAudit = true, names = "spawn_process", onSingleton = true, required = 3)
@CoreMethod(names = "spawn_process", onSingleton = true, required = 3, unsafe = UnsafeGroup.PROCESSES)
public abstract static class SpawnProcessNode extends CoreMethodArrayArgumentsNode {

public SpawnProcessNode(RubyContext context, SourceSection sourceSection) {
@@ -803,7 +803,7 @@ private long call(String command, String[] arguments, String[] environmentVariab
}
}

@CoreMethod(unsafeNeedsAudit = true, names = "context", onSingleton = true)
@CoreMethod(names = "context", onSingleton = true)
public abstract static class ContextNode extends CoreMethodArrayArgumentsNode {

public ContextNode(RubyContext context, SourceSection sourceSection) {
@@ -899,7 +899,7 @@ public Object runJRubyRootNode(VirtualFrame frame, @Cached("create()")IndirectCa
* for testing compilation of String becuase most other ways to construct a string can currently escape.
*/

@CoreMethod(unsafeNeedsAudit = true, names = "create_simple_string", onSingleton = true)
@CoreMethod(names = "create_simple_string", onSingleton = true)
public abstract static class CreateSimpleStringNode extends CoreMethodArrayArgumentsNode {

public CreateSimpleStringNode(RubyContext context, SourceSection sourceSection) {
@@ -912,7 +912,7 @@ public DynamicObject createSimpleString() {
}
}

@CoreMethod(unsafeNeedsAudit = true, names = "logical_processors", onSingleton = true)
@CoreMethod(names = "logical_processors", onSingleton = true)
public abstract static class LogicalProcessorsNode extends CoreMethodNode {

public LogicalProcessorsNode(RubyContext context, SourceSection sourceSection) {
@@ -926,7 +926,7 @@ public int logicalProcessors() {

}

@CoreMethod(unsafeNeedsAudit = true, names = "original_argv", onSingleton = true)
@CoreMethod(names = "original_argv", onSingleton = true)
public abstract static class OriginalArgvNode extends CoreMethodNode {

public OriginalArgvNode(RubyContext context, SourceSection sourceSection) {