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

Commits on Dec 8, 2016

  1. Copy the full SHA
    7313cc3 View commit details
  2. Copy the full SHA
    17084b7 View commit details
  3. Copy the full SHA
    5a948d5 View commit details
7 changes: 2 additions & 5 deletions bin/jruby.bash
Original file line number Diff line number Diff line change
@@ -251,10 +251,6 @@ do
-X+T)
USING_TRUFFLE="true"
;;
-X+TM)
USING_TRUFFLE="true"
java_class=$JAVA_CLASS_JRUBY_TRUFFLE_MAIN
;;
# Match -Xa.b.c=d to translate to -Da.b.c=d as a java option
-X*)
val=${1:2}
@@ -325,7 +321,8 @@ do
done

if [[ "$USING_TRUFFLE" != "" ]]; then
JRUBY_CP="$JRUBY_CP$CP_DELIMITER$JRUBY_HOME/lib/jruby-truffle.jar"
JRUBY_CP="$JRUBY_HOME/lib/jruby-truffle.jar"
java_class=$JAVA_CLASS_JRUBY_TRUFFLE_MAIN
ruby_args=("-X+T" "${ruby_args[@]}")
fi

4 changes: 0 additions & 4 deletions bin/jruby.sh
Original file line number Diff line number Diff line change
@@ -200,10 +200,6 @@ do
echo "error: -X+T isn't supported in the shell launcher"
exit 1
;;
-X+TM)
echo "error: -X+TM isn't supported in the shell launcher"
exit 1
;;
-Xclassic)
;;
# Match -Xa.b.c=d to translate to -Da.b.c=d as a java option
Original file line number Diff line number Diff line change
@@ -401,7 +401,7 @@ private void processArgument() {
config.setCompileMode(RubyInstanceConfig.CompileMode.FORCE);
} else if (extendedOption.equals("classic")) {
throw new MainExitException(0, "jruby: the -Xclassic option should have been handled in the launcher");
} else if (extendedOption.equals("+T") || extendedOption.equals("+TM")) {
} else if (extendedOption.equals("+T")) {
Options.PARSER_WARN_GROUPED_EXPRESSIONS.force(Boolean.FALSE.toString());
config.setCompileMode(RubyInstanceConfig.CompileMode.TRUFFLE);
// Make the static option consistent with the compile mode.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/cli/OutputStrings.java
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ public static String getExtendedHelp() { return
" -X+C force compilation of all scripts before they are run (except eval)\n" +
" -X+CIR force compilation and use IR runtime\n" +
" -X+JIR JIT compilation and use IR runtime\n" +
" -X+T use Truffle (-X+TM use Truffle's entry point)\n" +
" -X+T use Truffle\n" +
" -Xclassic don't use Truffle, reversing the -X+T option\n" +
" -Xsubstring? list options that contain substring in their name\n" +
" -Xprefix... list options that are prefixed wtih prefix\n" ;
2 changes: 0 additions & 2 deletions mx.jruby/mx_jruby.py
Original file line number Diff line number Diff line change
@@ -171,8 +171,6 @@ def extractArguments(cli_args):
while args:
arg = args.pop(0)
if arg == '-X+T':
pass # Just drop it
elif arg == '-X+TM':
main_class = "org.jruby.truffle.Main"
elif arg == '-Xclassic':
classic = True
48 changes: 14 additions & 34 deletions truffle/pom.rb
Original file line number Diff line number Diff line change
@@ -12,49 +12,29 @@
# Must be the same as in mx.jruby/suite.py (except for the -SNAPSHOT part only in this file, and here we can use a release name)
'truffle.version' => '0.20',
'jruby.basedir' => '${basedir}/..',
'maven.test.skip' => 'true',
'tzdata.version' => '2013d',
'tzdata.scope' => 'provided',
'maven.test.skip' => 'true'
)

jar 'org.yaml:snakeyaml:1.14'

if ENV['JRUBY_TRUFFLE_BUILD_STANDALONE']
# exclude jnr-ffi to avoid problems with shading and relocation of the asm packages
jar 'com.github.jnr:jnr-netdb:1.1.6', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-enxio:0.13', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-x86asm:1.0.2', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-unixsocket:0.14', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-posix:3.0.32', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-constants:0.9.6', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-ffi:2.1.1'
jar 'com.github.jnr:jffi:${jffi.version}'
jar 'com.github.jnr:jffi:${jffi.version}:native'

jar 'org.jruby.joni:joni:2.1.11'
jar 'org.jruby.extras:bytelist:1.0.13'
jar 'org.jruby.jcodings:jcodings:1.0.18'

jar 'bsf:bsf:2.4.0', :scope => 'provided'
jar 'com.jcraft:jzlib:1.1.3'
jar 'com.martiansoftware:nailgun-server:0.9.1'
jar 'junit:junit', :scope => 'test'
jar 'org.apache.ant:ant:${ant.version}', :scope => 'provided'

# joda timezone must be before joda-time to be packed correctly
jar 'org.jruby:joda-timezones:${tzdata.version}', :scope => '${tzdata.scope}'
jar 'joda-time:joda-time:${joda.time.version}'
else
jar 'org.jruby:jruby-core', '${project.version}', :scope => 'provided'
end

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

truffle_version = '${truffle.version}'
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'
jar 'com.oracle.truffle:truffle-tck:' + truffle_version, :scope => 'test'

jar 'com.github.jnr:jnr-unixsocket:0.14'
jar 'com.github.jnr:jnr-posix:3.0.32'
jar 'com.github.jnr:jnr-constants:0.9.6'
jar 'com.github.jnr:jnr-ffi:2.1.1'
jar 'com.github.jnr:jffi:1.2.13'
jar 'com.github.jnr:jffi:1.2.13:native'

jar 'org.yaml:snakeyaml:1.14'
jar 'org.jruby.joni:joni:2.1.11'
jar 'org.jruby.extras:bytelist:1.0.13'
jar 'org.jruby.jcodings:jcodings:1.0.18'
jar 'joda-time:joda-time:2.8.2'

jar 'junit:junit', :scope => 'test'

69 changes: 56 additions & 13 deletions truffle/pom.xml
Original file line number Diff line number Diff line change
@@ -20,23 +20,10 @@ DO NOT MODIFIY - GENERATED CODE
<maven.test.skip>true</maven.test.skip>
<jruby.basedir>${basedir}/..</jruby.basedir>
<polyglot.dump.readonly>true</polyglot.dump.readonly>
<tzdata.version>2013d</tzdata.version>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
<tzdata.scope>provided</tzdata.scope>
<truffle.version>0.20</truffle.version>
</properties>
<dependencies>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.14</version>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-api</artifactId>
@@ -59,6 +46,62 @@ DO NOT MODIFIY - GENERATED CODE
<version>${truffle.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-unixsocket</artifactId>
<version>0.14</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-posix</artifactId>
<version>3.0.32</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-constants</artifactId>
<version>0.9.6</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jffi</artifactId>
<version>1.2.13</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jffi</artifactId>
<version>1.2.13</version>
<classifier>native</classifier>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.14</version>
</dependency>
<dependency>
<groupId>org.jruby.joni</groupId>
<artifactId>joni</artifactId>
<version>2.1.11</version>
</dependency>
<dependency>
<groupId>org.jruby.extras</groupId>
<artifactId>bytelist</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>org.jruby.jcodings</groupId>
<artifactId>jcodings</artifactId>
<version>1.0.18</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Original file line number Diff line number Diff line change
@@ -390,7 +390,7 @@ private void processArgument() {
} else if (extendedOption.equals("classic")) {
//throw new MainExitException(0, "jruby: the -Xclassic option should have been handled in the launcher");
throw new UnsupportedOperationException();
} else if (extendedOption.equals("+T") || extendedOption.equals("+TM")) {
} else if (extendedOption.equals("+T")) {
// Nothing
} else if (extendedOption.endsWith("...")) {
throw new UnsupportedOperationException();
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
@@ -220,6 +221,9 @@ public InputStream getScriptSource() {
return getInput();
} else {
final String script = getScriptFileName();

return new FileInputStream(script);

/*FileResource resource = JRubyFile.createRestrictedResource(getCurrentDirectory(), getScriptFileName());
if (resource != null && resource.exists()) {
if (resource.canRead() && !resource.isDirectory()) {
@@ -235,7 +239,7 @@ public InputStream getScriptSource() {
}
}
else {*/
throw new FileNotFoundException(script + " (No such file or directory)");
//throw new FileNotFoundException(script + " (No such file or directory)");
//}
}
} catch (IOException e) {