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: 83719db62ae8^
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4f74c8740f51
Choose a head ref
  • 4 commits
  • 6 files changed
  • 1 contributor

Commits on Mar 14, 2016

  1. Copy the full SHA
    83719db View commit details
  2. Copy the full SHA
    8ddbeeb View commit details
  3. Copy the full SHA
    88bce05 View commit details
  4. Copy the full SHA
    4f74c87 View commit details
3 changes: 3 additions & 0 deletions bin/jruby.bash
Original file line number Diff line number Diff line change
@@ -195,6 +195,9 @@ JAVA_CLASS_JRUBY_MAIN=org.jruby.Main
java_class=$JAVA_CLASS_JRUBY_MAIN
JAVA_CLASS_NGSERVER=org.jruby.main.NailServerMain

# Disable tag compatibility mode for testing
java_args=("${java_args[@]}" "-Dtruffle.instrumentation.compatibility=false")

# Split out any -J argument for passing to the JVM.
# Scanning for args is aborted by '--'.
set -- $JRUBY_OPTS "$@"
6 changes: 3 additions & 3 deletions truffle/pom.rb
Original file line number Diff line number Diff line change
@@ -14,10 +14,10 @@

jar 'org.jruby:jruby-core', '${project.version}', :scope => 'provided'

repository( :url => 'http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/',
:id => 'truffle' )
#repository( :url => 'http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/',
# :id => 'truffle' )

truffle_version = '5304979e236e5b9cc743c9c22757eab75cfb7447-SNAPSHOT'
truffle_version = '0.12-SNAPSHOT'
jar 'com.oracle.truffle:truffle-api:' + truffle_version
jar 'com.oracle.truffle:truffle-debug:' + truffle_version
jar 'com.oracle.truffle:truffle-dsl-processor:' + truffle_version, :scope => 'provided'
14 changes: 4 additions & 10 deletions truffle/pom.xml
Original file line number Diff line number Diff line change
@@ -41,23 +41,23 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-api</artifactId>
<version>5304979e236e5b9cc743c9c22757eab75cfb7447-SNAPSHOT</version>
<version>0.12-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-debug</artifactId>
<version>5304979e236e5b9cc743c9c22757eab75cfb7447-SNAPSHOT</version>
<version>0.12-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-dsl-processor</artifactId>
<version>5304979e236e5b9cc743c9c22757eab75cfb7447-SNAPSHOT</version>
<version>0.12-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-tck</artifactId>
<version>5304979e236e5b9cc743c9c22757eab75cfb7447-SNAPSHOT</version>
<version>0.12-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -66,12 +66,6 @@ DO NOT MODIFIY - GENERATED CODE
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>truffle</id>
<url>http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<build>
<defaultGoal>package</defaultGoal>
<resources>
43 changes: 39 additions & 4 deletions truffle/src/main/java/org/jruby/truffle/language/RubyNode.java
Original file line number Diff line number Diff line change
@@ -24,21 +24,28 @@
import org.jruby.truffle.RubyContext;
import org.jruby.truffle.core.CoreLibrary;
import org.jruby.truffle.core.Layouts;
import org.jruby.truffle.core.kernel.TraceManager;
import org.jruby.truffle.core.rope.CodeRange;
import org.jruby.truffle.core.rope.Rope;
import org.jruby.truffle.core.string.CoreStrings;
import org.jruby.truffle.core.string.StringOperations;
import org.jruby.truffle.extra.AttachmentsManager;
import org.jruby.truffle.platform.posix.Sockets;
import org.jruby.truffle.platform.posix.TrufflePosix;
import org.jruby.truffle.stdlib.CoverageManager;
import org.jruby.util.ByteList;

@TypeSystemReference(RubyTypes.class)
@ImportStatic(RubyGuards.class)
@Instrumentable(factory = RubyNodeWrapper.class)
public abstract class RubyNode extends Node {

private static final int FLAG_NEWLINE = 0;
private static final int FLAG_CALL = 1;

private final RubyContext context;
@CompilationFinal private SourceSection sourceSection;
@CompilationFinal private int flags;

public RubyNode(RubyContext context, SourceSection sourceSection) {
this.context = context;
@@ -208,13 +215,41 @@ public RubyContext getContext() {
}

// Source section

public void unsafeSetSourceSection(SourceSection sourceSection) {
this.sourceSection = sourceSection;
}

@Override
public SourceSection getSourceSection() {
return sourceSection;
}

// Tags

public void unsafeSetIsNewLine() {
flags |= 1 << FLAG_NEWLINE;
}

public void unsafeSetIsCall() {
flags |= 1 << FLAG_CALL;
}

private boolean isNewLine() {
return ((flags >> FLAG_NEWLINE) & 1) == 1;
}

private boolean isCall() {
return ((flags >> FLAG_CALL) & 1) == 1;
}

@Override
protected boolean isTaggedWith(String tag) {
if (tag == TraceManager.CALL_TAG) {
return isCall();
}

if (tag == AttachmentsManager.LINE_TAG || tag == TraceManager.LINE_TAG || tag == CoverageManager.LINE_TAG) {
return isNewLine();
}

return false;
}

}
Original file line number Diff line number Diff line change
@@ -37,8 +37,7 @@ public RubyRootNode(RubyContext context, SourceSection sourceSection, FrameDescr
this.needsDeclarationFrame = needsDeclarationFrame;
this.body = body;

final SourceSection currentBodySourceSection = body.getEncapsulatingSourceSection();
body.unsafeSetSourceSection(currentBodySourceSection.withTags(TraceManager.CALL_TAG));
body.unsafeSetIsCall();

if (context.getCallGraph() != null) {
context.getCallGraph().registerRootNode(this);
Original file line number Diff line number Diff line change
@@ -3150,7 +3150,7 @@ private RubyNode addNewlineIfNeeded(org.jruby.ast.Node jrubyNode, RubyNode node)
if (context.getCoverageManager() != null) {
context.getCoverageManager().setLineHasCode(current.getLineLocation());
}
node.unsafeSetSourceSection(current.withTags(AttachmentsManager.LINE_TAG, TraceManager.LINE_TAG, CoverageManager.LINE_TAG));
node.unsafeSetIsNewLine();
}

return node;