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

Commits on Mar 12, 2015

  1. [Truffle] Make replacements of ivar reads by direct nodes.

    * Less sensible to monkey patching, less method namespace pollution.
    eregon committed Mar 12, 2015
    Copy the full SHA
    e043385 View commit details
  2. Copy the full SHA
    b687a26 View commit details
  3. [Truffle] Make replacements of ivar writes by direct nodes.

    * Less sensible to monkey patching, less method namespace pollution.
    eregon committed Mar 12, 2015
    Copy the full SHA
    16e9ce4 View commit details
  4. [Truffle] Rename Range begin/end nodes.

    * first/last are more powerful and therefore only temporarily aliases (e.g.: first(n)).
    eregon committed Mar 12, 2015
    Copy the full SHA
    e7c89c2 View commit details
  5. Copy the full SHA
    f7622b2 View commit details
3 changes: 3 additions & 0 deletions spec/truffle/tags/core/encoding/default_external_tags.txt
Original file line number Diff line number Diff line change
@@ -2,3 +2,6 @@ fails:Encoding.default_external with command line options is not changed by the
fails:Encoding.default_external= calls #to_s on arguments that are neither Strings nor Encodings
windows:Encoding.default_external with command line options returns the encoding specified by '-E external'
windows:Encoding.default_external with command line options returns the encoding specified by '-E external:'
slow:Encoding.default_external with command line options is not changed by the -U option
slow:Encoding.default_external with command line options returns the encoding specified by '-E external'
slow:Encoding.default_external with command line options returns the encoding specified by '-E external:'
4 changes: 4 additions & 0 deletions spec/truffle/tags/core/kernel/at_exit_tags.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
fails:Kernel.at_exit allows calling exit inside at_exit handler
slow:Kernel.at_exit runs after all other code
slow:Kernel.at_exit runs in reverse order of registration
slow:Kernel.at_exit allows calling exit inside at_exit handler
slow:Kernel.at_exit gives access to the last raised exception
40 changes: 40 additions & 0 deletions spec/truffle/tags/core/kernel/exec_tags.txt
Original file line number Diff line number Diff line change
@@ -34,3 +34,43 @@ fails:Kernel.exec with a command array coerces the argument using to_ary
fails:Kernel.exec with a command array raises an ArgumentError if the Array does not have exactly two elements
fails:Kernel.exec with an options Hash with Integer option keys maps the key to a file descriptor in the child that inherits the file descriptor from the parent specified by the value
fails:Kernel#exec with an options Hash with Integer option keys maps the key to a file descriptor in the child that inherits the file descriptor from the parent specified by the value
slow:Kernel#exec raises Errno::ENOENT for an empty string
slow:Kernel#exec raises Errno::ENOENT for a command which does not exist
slow:Kernel#exec raises an ArgumentError if the command includes a null byte
slow:Kernel#exec raises Errno::EACCES when the file does not have execute permissions
slow:Kernel#exec raises Errno::EACCES when passed a directory
slow:Kernel#exec runs the specified command, replacing current process
slow:Kernel#exec sets the current directory when given the :chdir option
slow:Kernel#exec flushes STDOUT upon exit when it's not set to sync
slow:Kernel#exec flushes STDERR upon exit when it's not set to sync
slow:Kernel#exec with a single argument subjects the specified command to shell expansion
slow:Kernel#exec with a single argument creates an argument array with shell parsing semantics for whitespace
slow:Kernel#exec with multiple arguments does not subject the arguments to shell expansion
slow:Kernel#exec (environment variables) sets environment variables in the child environment
slow:Kernel#exec (environment variables) unsets environment variables whose value is nil
slow:Kernel#exec (environment variables) coerces environment argument using to_hash
slow:Kernel#exec (environment variables) unsets other environment variables when given a true :unsetenv_others option
slow:Kernel#exec with a command array uses the first element as the command name and the second as the argv[0] value
slow:Kernel#exec with a command array coerces the argument using to_ary
slow:Kernel#exec with a command array raises an ArgumentError if the Array does not have exactly two elements
slow:Kernel#exec with an options Hash with Integer option keys maps the key to a file descriptor in the child that inherits the file descriptor from the parent specified by the value
slow:Kernel.exec raises Errno::ENOENT for an empty string
slow:Kernel.exec raises Errno::ENOENT for a command which does not exist
slow:Kernel.exec raises an ArgumentError if the command includes a null byte
slow:Kernel.exec raises Errno::EACCES when the file does not have execute permissions
slow:Kernel.exec raises Errno::EACCES when passed a directory
slow:Kernel.exec runs the specified command, replacing current process
slow:Kernel.exec sets the current directory when given the :chdir option
slow:Kernel.exec flushes STDOUT upon exit when it's not set to sync
slow:Kernel.exec flushes STDERR upon exit when it's not set to sync
slow:Kernel.exec with a single argument subjects the specified command to shell expansion
slow:Kernel.exec with a single argument creates an argument array with shell parsing semantics for whitespace
slow:Kernel.exec with multiple arguments does not subject the arguments to shell expansion
slow:Kernel.exec (environment variables) sets environment variables in the child environment
slow:Kernel.exec (environment variables) unsets environment variables whose value is nil
slow:Kernel.exec (environment variables) coerces environment argument using to_hash
slow:Kernel.exec (environment variables) unsets other environment variables when given a true :unsetenv_others option
slow:Kernel.exec with a command array uses the first element as the command name and the second as the argv[0] value
slow:Kernel.exec with a command array coerces the argument using to_ary
slow:Kernel.exec with a command array raises an ArgumentError if the Array does not have exactly two elements
slow:Kernel.exec with an options Hash with Integer option keys maps the key to a file descriptor in the child that inherits the file descriptor from the parent specified by the value
20 changes: 20 additions & 0 deletions spec/truffle/tags/core/process/exec_tags.txt
Original file line number Diff line number Diff line change
@@ -16,3 +16,23 @@ fails:Process.exec with a command array uses the first element as the command na
fails:Process.exec with a command array coerces the argument using to_ary
fails:Process.exec with a command array raises an ArgumentError if the Array does not have exactly two elements
fails:Process.exec with an options Hash with Integer option keys maps the key to a file descriptor in the child that inherits the file descriptor from the parent specified by the value
slow:Process.exec raises Errno::ENOENT for an empty string
slow:Process.exec raises Errno::ENOENT for a command which does not exist
slow:Process.exec raises an ArgumentError if the command includes a null byte
slow:Process.exec raises Errno::EACCES when the file does not have execute permissions
slow:Process.exec raises Errno::EACCES when passed a directory
slow:Process.exec runs the specified command, replacing current process
slow:Process.exec sets the current directory when given the :chdir option
slow:Process.exec flushes STDOUT upon exit when it's not set to sync
slow:Process.exec flushes STDERR upon exit when it's not set to sync
slow:Process.exec with a single argument subjects the specified command to shell expansion
slow:Process.exec with a single argument creates an argument array with shell parsing semantics for whitespace
slow:Process.exec with multiple arguments does not subject the arguments to shell expansion
slow:Process.exec (environment variables) sets environment variables in the child environment
slow:Process.exec (environment variables) unsets environment variables whose value is nil
slow:Process.exec (environment variables) coerces environment argument using to_hash
slow:Process.exec (environment variables) unsets other environment variables when given a true :unsetenv_others option
slow:Process.exec with a command array uses the first element as the command name and the second as the argv[0] value
slow:Process.exec with a command array coerces the argument using to_ary
slow:Process.exec with a command array raises an ArgumentError if the Array does not have exactly two elements
slow:Process.exec with an options Hash with Integer option keys maps the key to a file descriptor in the child that inherits the file descriptor from the parent specified by the value
2 changes: 2 additions & 0 deletions spec/truffle/tags/core/symbol/all_symbols_tags.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
fails:Symbol.all_symbols increases size of the return array when new symbol comes
slow:Symbol.all_symbols returns an array containing all the Symbols in the symbol table
slow:Symbol.all_symbols increases size of the return array when new symbol comes
21 changes: 12 additions & 9 deletions truffle/src/main/java/org/jruby/truffle/nodes/core/HashNodes.java
Original file line number Diff line number Diff line change
@@ -11,12 +11,15 @@

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.dsl.ImportGuards;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.NodeChildren;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.api.utilities.BranchProfile;
import com.oracle.truffle.api.utilities.ConditionProfile;

import org.jruby.runtime.Visibility;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.dispatch.*;
@@ -1339,9 +1342,9 @@ public RubyHash rehashBuckets(RubyHash hash) {

}

@RubiniusOnly
@CoreMethod(names = "_default_value")
public abstract static class DefaultValueNode extends HashCoreMethodNode {
// Not a core method, used to simulate Rubinius @default.
@NodeChild(value = "self")
public abstract static class DefaultValueNode extends RubyNode {

public DefaultValueNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
@@ -1363,9 +1366,9 @@ public Object defaultValue(RubyHash hash) {
}
}

@RubiniusOnly
@CoreMethod(names = "_set_default_value", required = 1)
public abstract static class SetDefaultValueNode extends HashCoreMethodNode {
// Not a core method, used to simulate Rubinius @default.
@NodeChildren({ @NodeChild("self"), @NodeChild("defaultValue") })
public abstract static class SetDefaultValueNode extends RubyNode {

public SetDefaultValueNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
@@ -1383,9 +1386,9 @@ public Object setDefaultValue(RubyHash hash, Object defaultValue) {

}

@RubiniusOnly
@CoreMethod(names = "_set_default_proc", required = 1)
public abstract static class SetDefaultProcNode extends HashCoreMethodNode {
// Not a core method, used to simulate Rubinius @default_proc.
@NodeChildren({ @NodeChild("self"), @NodeChild("defaultProc") })
public abstract static class SetDefaultProcNode extends RubyNode {

public SetDefaultProcNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
Original file line number Diff line number Diff line change
@@ -1026,7 +1026,7 @@ private Object instanceVariableGet(RubyBasicObject object, String name) {

}

@CoreMethod(names = {"instance_variable_set", "__instance_variable_set__"}, required = 2)
@CoreMethod(names = { "instance_variable_set", "__instance_variable_set__" }, raiseIfFrozenSelf = true, required = 2)
public abstract static class InstanceVariableSetNode extends CoreMethodNode {

public InstanceVariableSetNode(RubyContext context, SourceSection sourceSection) {
Original file line number Diff line number Diff line change
@@ -206,14 +206,14 @@ public boolean excludeEnd(RubyRange range) {

}

@CoreMethod(names = {"first", "begin"})
public abstract static class FirstNode extends CoreMethodNode {
@CoreMethod(names = { "begin", "first" })
public abstract static class BeginNode extends CoreMethodNode {

public FirstNode(RubyContext context, SourceSection sourceSection) {
public BeginNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public FirstNode(FirstNode prev) {
public BeginNode(BeginNode prev) {
super(prev);
}

@@ -301,14 +301,14 @@ public RubyRange.ObjectRange initialize(RubyRange.ObjectRange range, Object begi

}

@CoreMethod(names = {"last", "end"})
public abstract static class LastNode extends CoreMethodNode {
@CoreMethod(names = { "end", "last" })
public abstract static class EndNode extends CoreMethodNode {

public LastNode(RubyContext context, SourceSection sourceSection) {
public EndNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public LastNode(LastNode prev) {
public EndNode(EndNode prev) {
super(prev);
}

24 changes: 16 additions & 8 deletions truffle/src/main/java/org/jruby/truffle/nodes/core/TimeNodes.java
Original file line number Diff line number Diff line change
@@ -9,18 +9,23 @@
*/
package org.jruby.truffle.nodes.core;

import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.NodeChildren;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.source.SourceSection;

import org.joda.time.DateTimeZone;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.core.RubyNilClass;
import org.jruby.truffle.runtime.core.RubyTime;

@CoreClass(name = "Time")
public abstract class TimeNodes {

@CoreMethod(names = "_gmt?")
public abstract static class InternalGMTNode extends CoreMethodNode {
// Not a core method, used to simulate Rubinius @is_gmt.
@NodeChild(value = "self")
public abstract static class InternalGMTNode extends RubyNode {

public InternalGMTNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
@@ -37,8 +42,9 @@ public boolean internalGMT(RubyTime time) {
}
}

@CoreMethod(names = "_set_gmt", required = 1)
public abstract static class InternalSetGMTNode extends CoreMethodNode {
// Not a core method, used to simulate Rubinius @is_gmt.
@NodeChildren({ @NodeChild("self"), @NodeChild("isGMT") })
public abstract static class InternalSetGMTNode extends RubyNode {

public InternalSetGMTNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
@@ -54,8 +60,9 @@ public boolean internalSetGMT(RubyTime time, Object setGMT) {
}
}

@CoreMethod(names = "_offset")
public abstract static class InternalOffsetNode extends CoreMethodNode {
// Not a core method, used to simulate Rubinius @offset.
@NodeChild(value = "self")
public abstract static class InternalOffsetNode extends RubyNode {

public InternalOffsetNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
@@ -77,8 +84,9 @@ public Object internalOffset(RubyTime time) {
}
}

@CoreMethod(names = "_set_offset", required = 1)
public abstract static class InternalSetOffsetNode extends CoreMethodNode {
// Not a core method, used to simulate Rubinius @offset.
@NodeChildren({ @NodeChild("self"), @NodeChild("offset") })
public abstract static class InternalSetOffsetNode extends RubyNode {

public InternalSetOffsetNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
Loading