-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into truffle-head
Conflicts: core/src/main/java/org/jruby/truffle/nodes/RubyNode.java
- 9.4.12.0
- 9.4.11.0
- 9.4.10.0
- 9.4.9.0
- 9.4.8.0
- 9.4.7.0
- 9.4.6.0
- 9.4.5.0
- 9.4.4.0
- 9.4.3.0
- 9.4.2.0
- 9.4.1.0
- 9.4.0.0
- 9.3.15.0
- 9.3.14.0
- 9.3.13.0
- 9.3.12.0
- 9.3.11.0
- 9.3.10.0
- 9.3.9.0
- 9.3.8.0
- 9.3.7.0
- 9.3.6.0
- 9.3.5.0
- 9.3.4.0
- 9.3.3.0
- 9.3.2.0
- 9.3.1.0
- 9.3.0.0
- 9.2.21.0
- 9.2.20.1
- 9.2.20.0
- 9.2.19.0
- 9.2.18.0
- 9.2.17.0
- 9.2.16.0
- 9.2.15.0
- 9.2.14.0
- 9.2.13.0
- 9.2.12.0
- 9.2.11.1
- 9.2.11.0
- 9.2.10.0
- 9.2.9.0
- 9.2.8.0
- 9.2.7.0
- 9.2.6.0
- 9.2.5.0
- 9.2.4.1
- 9.2.4.0
- 9.2.3.0
- 9.2.2.0
- 9.2.1.0
- 9.2.0.0
- 9.1.17.0
- 9.1.16.0
- 9.1.15.0
- 9.1.14.0
- 9.1.13.0
- 9.1.12.0
- 9.1.11.0
- 9.1.10.0
- 9.1.9.0
- 9.1.8.0
- 9.1.7.0
- 9.1.6.0
- 9.1.5.0
- 9.1.4.0
- 9.1.3.0
- 9.1.2.0
- 9.1.1.0
- 9.1.0.0
- 9.0.5.0
- 9.0.4.0
- 9.0.3.0
- 9.0.1.0
- 9.0.0.0
- 9.0.0.0.rc2
- 9.0.0.0.rc1
Showing
30 changed files
with
427 additions
and
751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
610 changes: 0 additions & 610 deletions
610
core/src/main/java/org/jruby/truffle/nodes/control/WrapperNode.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
244 changes: 244 additions & 0 deletions
244
core/src/main/java/org/jruby/truffle/nodes/instrument/RubyWrapperNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,244 @@ | ||
/* | ||
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. This | ||
* code is released under a tri EPL/GPL/LGPL license. You can use it, | ||
* redistribute it and/or modify it under the terms of the: | ||
* | ||
* Eclipse Public License version 1.0 | ||
* GNU General Public License version 2 | ||
* GNU Lesser General Public License version 2.1 | ||
*/ | ||
package org.jruby.truffle.nodes.instrument; | ||
|
||
import com.oracle.truffle.api.frame.VirtualFrame; | ||
import com.oracle.truffle.api.instrument.KillException; | ||
import com.oracle.truffle.api.instrument.Probe; | ||
import com.oracle.truffle.api.instrument.ProbeNode; | ||
import com.oracle.truffle.api.instrument.ProbeNode.WrapperNode; | ||
import com.oracle.truffle.api.instrument.TruffleEventReceiver; | ||
import com.oracle.truffle.api.nodes.NodeCost; | ||
import com.oracle.truffle.api.nodes.NodeInfo; | ||
import com.oracle.truffle.api.nodes.UnexpectedResultException; | ||
import org.jruby.truffle.nodes.RubyNode; | ||
import org.jruby.truffle.runtime.core.RubyArray; | ||
import org.jruby.truffle.runtime.core.RubyBignum; | ||
import org.jruby.truffle.runtime.core.RubyString; | ||
|
||
@NodeInfo(cost = NodeCost.NONE) | ||
public final class RubyWrapperNode extends RubyNode implements WrapperNode { | ||
|
||
@Child private RubyNode child; | ||
@Child private ProbeNode probeNode; | ||
|
||
public RubyWrapperNode(RubyNode child) { | ||
super(child.getContext(), child.getSourceSection()); | ||
assert !(child instanceof RubyWrapperNode); | ||
this.child = child; | ||
} | ||
|
||
public String instrumentationInfo() { | ||
return "Wrapper node for Ruby"; | ||
} | ||
|
||
@Override | ||
public RubyNode getNonWrapperNode() { | ||
return child; | ||
} | ||
|
||
public void insertProbe(ProbeNode newProbeNode) { | ||
this.probeNode = insert(newProbeNode); | ||
} | ||
|
||
public Probe getProbe() { | ||
try { | ||
return probeNode.getProbe(); | ||
} catch (IllegalStateException e) { | ||
throw new UnsupportedOperationException("A lite-Probed wrapper has no explicit Probe"); | ||
} | ||
} | ||
|
||
public RubyNode getChild() { | ||
return child; | ||
} | ||
|
||
@Override | ||
public Object execute(VirtualFrame frame) { | ||
probeNode.enter(child, frame); | ||
|
||
Object result; | ||
|
||
try { | ||
result = child.execute(frame); | ||
probeNode.returnValue(child, frame, result); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public RubyArray executeArray(VirtualFrame frame) throws UnexpectedResultException { | ||
probeNode.enter(child, frame); | ||
|
||
RubyArray result; | ||
|
||
try { | ||
result = child.executeArray(frame); | ||
probeNode.returnValue(child, frame, result); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public RubyBignum executeBignum(VirtualFrame frame) throws UnexpectedResultException { | ||
probeNode.enter(child, frame); | ||
|
||
RubyBignum result; | ||
|
||
try { | ||
result = child.executeBignum(frame); | ||
probeNode.returnValue(child, frame, result); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public boolean executeBoolean(VirtualFrame frame) throws UnexpectedResultException { | ||
probeNode.enter(child, frame); | ||
|
||
boolean result; | ||
|
||
try { | ||
result = child.executeBoolean(frame); | ||
probeNode.returnValue(child, frame, result); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public Object isDefined(VirtualFrame frame) { | ||
return child.isDefined(frame); | ||
} | ||
|
||
@Override | ||
public int executeIntegerFixnum(VirtualFrame frame) throws UnexpectedResultException { | ||
probeNode.enter(child, frame); | ||
|
||
int result; | ||
|
||
try { | ||
result = child.executeIntegerFixnum(frame); | ||
probeNode.returnValue(child, frame, result); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public long executeLongFixnum(VirtualFrame frame) throws UnexpectedResultException { | ||
probeNode.enter(child, frame); | ||
|
||
long result; | ||
|
||
try { | ||
result = child.executeLongFixnum(frame); | ||
probeNode.returnValue(child, frame, result); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public double executeFloat(VirtualFrame frame) throws UnexpectedResultException { | ||
probeNode.enter(child, frame); | ||
|
||
double result; | ||
|
||
try { | ||
result = child.executeFloat(frame); | ||
probeNode.returnValue(child, frame, result); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public RubyString executeString(VirtualFrame frame) throws UnexpectedResultException { | ||
probeNode.enter(child, frame); | ||
|
||
RubyString result; | ||
|
||
try { | ||
result = child.executeString(frame); | ||
probeNode.returnValue(child, frame, result); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
|
||
return result; | ||
} | ||
|
||
@Override | ||
public void executeVoid(VirtualFrame frame) { | ||
probeNode.enter(child, frame); | ||
|
||
try { | ||
child.executeVoid(frame); | ||
probeNode.returnVoid(child, frame); | ||
} catch (KillException e) { | ||
throw e; | ||
} catch (Exception e) { | ||
probeNode.returnExceptional(child, frame, e); | ||
throw e; | ||
} | ||
} | ||
|
||
@Override | ||
public Probe probe() { | ||
throw new UnsupportedOperationException("Cannot call probe() on a wrapper."); | ||
} | ||
|
||
@Override | ||
public void probeLite(TruffleEventReceiver eventReceiver) { | ||
throw new UnsupportedOperationException("Cannot call probeLite() on a wrapper."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FindBugsFilter> | ||
<Match> | ||
<Class name="~.*NodeFactory.*" /> | ||
</Match> | ||
</FindBugsFilter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
# Runs findbugs for the Truffle classes only. By default writes to stdout. Use | ||
# with --report to get a HTML report. | ||
|
||
if [[ $* == *--report* ]] | ||
then | ||
ui_options="-html -output truffle-findbugs-report.html" | ||
else | ||
ui_options="" | ||
fi | ||
|
||
mvn package || exit $? | ||
|
||
version=3.0.0 | ||
shasum=30bdcee2c909a0eef61a4f60f4489cd2f5a4d21c | ||
tarball=findbugs-noUpdateChecks-$version.tar.gz | ||
|
||
if [ ! -e findbugs-$version ] | ||
then | ||
wget http://prdownloads.sourceforge.net/findbugs/$tarball || exit $? | ||
echo "$shasum $tarball" | shasum -c || exit $? | ||
tar -xf $tarball || exit $? | ||
fi | ||
|
||
findbugs-3.0.0/bin/findbugs \ | ||
-textui $ui_options \ | ||
-exclude tool/truffle-findbugs-exclude.xml \ | ||
-exitcode \ | ||
-low \ | ||
core/target/classes/org/jruby/truffle/ || exit $? |