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

Commits on Apr 6, 2016

  1. Copy the full SHA
    f7a212a View commit details
  2. Copy the full SHA
    954e354 View commit details
  3. Copy the full SHA
    30f2ff3 View commit details
Showing with 20 additions and 9 deletions.
  1. +3 −3 lib/ruby/truffle/truffle/truffle/execjs.rb
  2. +12 −1 tool/jt.rb
  3. +5 −5 truffle/src/main/java/org/jruby/truffle/interop/TruffleInteropNodes.java
6 changes: 3 additions & 3 deletions lib/ruby/truffle/truffle/truffle/execjs.rb
Original file line number Diff line number Diff line change
@@ -43,15 +43,15 @@ def call(identifier, *args)
private

def unbox(value)
if Truffle::Interop.boxed_primitive?(value)
Truffle::Interop.unbox_value(value)
if Truffle::Interop.boxed?(value)
value
else
JSON.parse(Truffle::Interop.unbox(STRINGIFY.call(STRINGIFY, value)))
end
end

def box(value)
if Truffle::Interop.boxed_primitive?(value) || value.is_a?(String)
if Truffle::Interop.boxed?(value) || value.is_a?(String)
value
else
PARSE.call(PARSE, JSON.generate(value))
13 changes: 12 additions & 1 deletion tool/jt.rb
Original file line number Diff line number Diff line change
@@ -466,7 +466,18 @@ def test_integration(*args)
!long # fast is the default

env_vars = {}
env_vars["JRUBY_OPTS"] = '-Xtruffle.graal.warn_unless=false'

jruby_opts = []

jruby_opts << '-Xtruffle.graal.warn_unless=false'

if ENV['GRAAL_JS_JAR']
jruby_opts << '-J-classpath'
jruby_opts << Utilities.find_graal_js
end

env_vars["JRUBY_OPTS"] = jruby_opts.join(' ')

env_vars["PATH"] = "#{Utilities.find_jruby_bin_dir}:#{ENV["PATH"]}"
integration_path = "#{JRUBY_DIR}/test/truffle/integration"
long_tests = File.read(File.join(integration_path, 'long-tests.txt')).lines.map(&:chomp)
Original file line number Diff line number Diff line change
@@ -195,7 +195,7 @@ protected int getCacheLimit() {

}

@CoreMethod(names = {"size?", "has_size_property?"}, isModuleFunction = true, needsSelf = false, required = 1)
@CoreMethod(names = "size?", isModuleFunction = true, needsSelf = false, required = 1)
public abstract static class HasSizeNode extends CoreMethodArrayArgumentsNode {

public HasSizeNode(RubyContext context, SourceSection sourceSection) {
@@ -248,7 +248,7 @@ protected Node createGetSizeNode() {

}

@CoreMethod(names = {"boxed?", "boxed_primitive?"}, isModuleFunction = true, needsSelf = false, required = 1)
@CoreMethod(names = "boxed?", isModuleFunction = true, needsSelf = false, required = 1)
public abstract static class BoxedNode extends CoreMethodArrayArgumentsNode {

public BoxedNode(RubyContext context, SourceSection sourceSection) {
@@ -315,7 +315,7 @@ public boolean isBoxed(Object receiver) {

}

@CoreMethod(names = {"unbox", "unbox_value"}, isModuleFunction = true, needsSelf = false, required = 1)
@CoreMethod(names = "unbox", isModuleFunction = true, needsSelf = false, required = 1)
public abstract static class UnboxNode extends CoreMethodArrayArgumentsNode {

public UnboxNode(RubyContext context, SourceSection sourceSection) {
@@ -406,7 +406,7 @@ protected Node createIsNullNode() {

}

@CoreMethod(names = {"read", "read_property"}, isModuleFunction = true, needsSelf = false, required = 2)
@CoreMethod(names = "read", isModuleFunction = true, needsSelf = false, required = 2)
@ImportStatic(StringCachingGuards.class)
public abstract static class ReadNode extends CoreMethodArrayArgumentsNode {

@@ -502,7 +502,7 @@ protected int getCacheLimit() {

}

@CoreMethod(names = {"write", "write_property"}, isModuleFunction = true, needsSelf = false, required = 3)
@CoreMethod(names = "write", isModuleFunction = true, needsSelf = false, required = 3)
@ImportStatic(StringCachingGuards.class)
public abstract static class WriteNode extends CoreMethodArrayArgumentsNode {