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

Commits on Sep 2, 2016

  1. Copy the full SHA
    804b7fd View commit details
  2. Copy the full SHA
    8c0bf6b View commit details
  3. Copy the full SHA
    511da2b View commit details
Showing with 8 additions and 11 deletions.
  1. +3 −11 tool/jt.rb
  2. +1 −0 truffle/src/main/c/cext/ruby.c
  3. +4 −0 truffle/src/main/java/org/jruby/truffle/language/loader/FeatureLoader.java
14 changes: 3 additions & 11 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -91,12 +91,7 @@ def self.find_graal_javacmd_and_options
options = []
elsif graal_home
graal_home = File.expand_path(graal_home)
if ENV['JVMCI_JAVA_HOME']
mx_options = "--java-home #{ENV['JVMCI_JAVA_HOME']}"
else
mx_options = ''
end
command_line = `mx -v #{mx_options} -p #{graal_home} vm -version`.lines.to_a.last
command_line = `mx -v -p #{graal_home} vm -version`.lines.to_a.last
vm_args = command_line.split
vm_args.pop # Drop "-version"
javacmd = vm_args.shift
@@ -386,7 +381,6 @@ def maven_options(*options)

def mx(dir, *args)
command = ['mx', '-p', dir]
command.push *['--java-home', ENV['JVMCI_JAVA_HOME']] if ENV['JVMCI_JAVA_HOME']
command.push *args
sh *command
end
@@ -459,7 +453,7 @@ def help
jt irb irb
jt rebuild clean and build
jt run [options] args... run JRuby with -X+T and args
--graal use Graal (set either GRAALVM_BIN or GRAAL_HOME and maybe JVMCI_JAVA_HOME)
--graal use Graal (set either GRAALVM_BIN or GRAAL_HOME)
--js add Graal.js to the classpath (set GRAAL_JS_JAR)
--asm show assembly (implies --graal)
--server run an instrumentation server on port 8080
@@ -514,9 +508,7 @@ def help
RUBY_BIN The JRuby+Truffle executable to use (normally just bin/jruby)
GRAALVM_BIN GraalVM executable (java command) to use
GRAAL_HOME Directory where there is a built checkout of the Graal compiler
(make sure mx is on your path and maybe set JVMCI_JAVA_HOME)
JVMCI_JAVA_HOME The Java with JVMCI to use with GRAAL_HOME
GRAAL_HOME Directory where there is a built checkout of the Graal compiler (make sure mx is on your path)
GRAALVM_RELEASE_BIN Default GraalVM executable when using a released version of Truffle (such as on master)
GRAAL_HOME_TRUFFLE_HEAD Default Graal directory when using a snapshot version of Truffle (such as on truffle-head)
SULONG_HOME The Sulong source repository, if you want to run cextc
1 change: 1 addition & 0 deletions truffle/src/main/c/cext/ruby.c
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
#include <truffle.h>

#include <ruby.h>

// Helpers

VALUE rb_f_notimplement(int args_count, const VALUE *args, VALUE object) {
Original file line number Diff line number Diff line change
@@ -132,6 +132,10 @@ public void ensureCExtImplementationLoaded(VirtualFrame frame, IndirectCallNode
return;
}

if (!context.getEnv().isMimeTypeSupported(RubyLanguage.CEXT_MIME_TYPE)) {
throw new RaiseException(context.getCoreExceptions().internalError("Sulong is required to support C extensions, and it doesn't appear to be available", null));
}

final CallTarget callTarget = getCExtLibRuby();
callNode.call(frame, callTarget, new Object[] {});