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: 0caf4dbd86c3
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 22c04870f69e
Choose a head ref

Commits on Jan 15, 2016

  1. Copy the full SHA
    7046852 View commit details
  2. Copy the full SHA
    5d61a09 View commit details

Commits on Jan 16, 2016

  1. Copy the full SHA
    5f4b74c View commit details
  2. Copy the full SHA
    0c6960d View commit details
  3. Copy the full SHA
    28c6533 View commit details

Commits on Jan 17, 2016

  1. Copy the full SHA
    5cb811a View commit details

Commits on Jan 19, 2016

  1. Merge branch 'master' into truffle-head

    # Conflicts:
    #	.travis.yml
    chrisseaton committed Jan 19, 2016
    Copy the full SHA
    ad5f49e View commit details
  2. Copy the full SHA
    4ccfa3a View commit details

Commits on Jan 21, 2016

  1. Copy the full SHA
    a6d9e07 View commit details
  2. Copy the full SHA
    08da5de View commit details

Commits on Jan 22, 2016

  1. Copy the full SHA
    c757e7c View commit details
  2. Copy the full SHA
    7414a67 View commit details
  3. Copy the full SHA
    f7a77b6 View commit details

Commits on Jan 25, 2016

  1. Copy the full SHA
    cb0634a View commit details
  2. Copy the full SHA
    0a53b78 View commit details

Commits on Jan 26, 2016

  1. Copy the full SHA
    c465d06 View commit details
  2. Copy the full SHA
    718d8f2 View commit details

Commits on Jan 27, 2016

  1. Copy the full SHA
    1e4cfde View commit details
  2. Copy the full SHA
    e4d7808 View commit details
  3. Copy the full SHA
    3cd7d33 View commit details
  4. Copy the full SHA
    96daf26 View commit details

Commits on Jan 28, 2016

  1. Copy the full SHA
    f3460a2 View commit details

Commits on Jan 29, 2016

  1. Copy the full SHA
    2a1a851 View commit details

Commits on Feb 1, 2016

  1. Copy the full SHA
    4578c7b View commit details
  2. Copy the full SHA
    71d774d View commit details
  3. Copy the full SHA
    6d2be03 View commit details
  4. Copy the full SHA
    ab12a8f View commit details

Commits on Feb 2, 2016

  1. Copy the full SHA
    e9de8fb View commit details
  2. [Truffle] Truffle 0.11

    chrisseaton committed Feb 2, 2016
    Copy the full SHA
    8e54348 View commit details
  3. Copy the full SHA
    22c0487 View commit details
46 changes: 0 additions & 46 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -22,26 +22,8 @@ os:

env:
global:
- JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
- MALLOC_ARENA_MAX=2
matrix:
- PHASE='-Ptest'
- PHASE='-Prake -Dtask=test:jruby'
- PHASE='-Prake -Dtask=test:jruby:fullint'
- PHASE='-Prake -Dtask=test:jruby:jit'
- PHASE='-Prake -Dtask=test:mri'
- PHASE='-Prake -Dtask=test:mri:fullint'
- PHASE='-Prake -Dtask=test:mri:jit'
- PHASE='-Prake -Dtask=test:slow_suites'
- PHASE='-Prake -Dtask=test:tracing'
- PHASE='-Prake -Dtask=spec:ji'
- PHASE='-Prake -Dtask=spec:compiler'
- PHASE='-Prake -Dtask=spec:ffi'
- PHASE='-Prake -Dtask=spec:regression'
- PHASE='-Prake -Dtask=spec:ruby:fast'
- PHASE='-Prake -Dtask=spec:jruby'
- PHASE='-Prake -Dtask=spec:jrubyc'
- PHASE='-Prake -Dtask=spec:profiler'
- JT='test specs :language'
- JT='test specs :core'
- JT='test specs :library'
@@ -51,38 +33,10 @@ env:

matrix:
include:
# these profile do no need to run for all JDKs
- env: PHASE='-Pdist'
jdk: oraclejdk8
- env: PHASE='-Pjruby-jars'
jdk: openjdk7
- env: PHASE='-Pmain'
jdk: oraclejdk8
- env: PHASE='-Pcomplete'
jdk: oraclejdk8
- env: PHASE='-Posgi'
jdk: openjdk7
- env: PHASE='-Pj2ee'
jdk: oraclejdk7
# These next two started crashing on JDK7 in March 2015, possibly due to JVM issues on Travis's Docker-based env
- env: PHASE='-Pjruby-jars,test -Dinvoker.test=extended'
jdk: oraclejdk8
- env: PHASE='-Pmain,test -Dinvoker.test=extended'
jdk: oraclejdk8
- env: PHASE='-Pjruby_complete_jar_extended -Dinvoker.skip=true'
jdk: oraclejdk8
- env: COMMAND=test/check_versions.sh
jdk: oraclejdk8
- env: JT=check_ambiguous_arguments
jdk: oraclejdk8
allow_failures:
- env: PHASE='-Prake -Dtask=test:mri:fullint'
# NOTE: build seems to never start (waited for any to finish for more than a day) - probably a travis-ci bug
#- env: PHASE='-Pmain'
# sudo: required
# dist: trusty
# group: edge
# jdk: oraclejdk9

branches:
only:
8 changes: 4 additions & 4 deletions bin/jruby.bash
Original file line number Diff line number Diff line change
@@ -234,16 +234,16 @@ do
-*)
opt="${opt:1}=false" ;;
esac
java_args=("${java_args[@]}" "-Djvmci.option.$opt")
java_args=("${java_args[@]}" "-Dgraal.$opt")
elif [ "${val:0:15}" = "-Djvmci.option." ]; then # Graal options
opt=${val:15}
java_args=("${java_args[@]}" "-Djvmci.option.$opt")
java_args=("${java_args[@]}" "-Dgraal.$opt")
elif [ "${val:0:15}" = "-Dgraal.option." ]; then # Graal options
opt=${val:15}
java_args=("${java_args[@]}" "-Djvmci.option.$opt")
java_args=("${java_args[@]}" "-Dgraal.$opt")
elif [ "${val:0:8}" = "-Dgraal." ]; then # Graal options
opt=${val:8}
java_args=("${java_args[@]}" "-Djvmci.option.$opt")
java_args=("${java_args[@]}" "-Dgraal.$opt")
else
if [ "${val:0:3}" = "-ea" ]; then
VERIFY_JRUBY="yes"
4 changes: 1 addition & 3 deletions lib/ruby/truffle/truffle/truffle/execjs.rb
Original file line number Diff line number Diff line change
@@ -65,9 +65,7 @@ def name
end

def available?
defined?(Truffle::Interop) && Truffle::Interop.eval(JS_MIME_TYPE, 'true')
rescue RubyTruffleError
false
Truffle::Interop.mime_type_supported?('application/javascript')
end

end
21 changes: 21 additions & 0 deletions spec/truffle/specs/truffle/interop/mime_type_supported_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2016 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

require_relative '../../../../ruby/spec_helper'

describe "Truffle::Interop.mime_type_supported?" do

it "returns true for application/x-ruby" do
Truffle::Interop.mime_type_supported?('application/x-ruby').should be_true
end

it "returns false for application/x-this-language-does-not-exist" do
Truffle::Interop.mime_type_supported?('application/x-this-language-does-not-exist').should be_false
end

end
4 changes: 0 additions & 4 deletions truffle/.factorypath

This file was deleted.

2 changes: 1 addition & 1 deletion truffle/pom.rb
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@

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

truffle_version = '0.10'
truffle_version = '0.11'
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'
8 changes: 4 additions & 4 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>0.10</version>
<version>0.11</version>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-debug</artifactId>
<version>0.10</version>
<version>0.11</version>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-dsl-processor</artifactId>
<version>0.10</version>
<version>0.11</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-tck</artifactId>
<version>0.10</version>
<version>0.11</version>
<scope>test</scope>
</dependency>
<dependency>
Original file line number Diff line number Diff line change
@@ -427,6 +427,21 @@ public Object importObject(DynamicObject name) {

}

@CoreMethod(names = "mime_type_supported?", isModuleFunction = true, needsSelf = false, required =1)
public abstract static class MimeTypeSupportedNode extends CoreMethodArrayArgumentsNode {

public MimeTypeSupportedNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

@TruffleBoundary
@Specialization(guards = "isRubyString(mimeType)")
public boolean isMimeTypeSupported(DynamicObject mimeType) {
return getContext().getEnv().isMimeTypeSupported(mimeType.toString());
}

}

@CoreMethod(names = "eval", isModuleFunction = true, needsSelf = false, required = 2)
@ImportStatic(StringCachingGuards.class)
public abstract static class EvalNode extends CoreMethodArrayArgumentsNode {
10 changes: 10 additions & 0 deletions truffle/src/test/java/org/jruby/truffle/tck/RubyTckTest.java
Original file line number Diff line number Diff line change
@@ -106,6 +106,11 @@ protected String complexAdd() {
return "complex_add";
}

@Override
protected String complexAddWithMethod() {
return "complex_add_with_method";
}

@Override
protected String complexSumReal() {
return "complex_sum_real";
@@ -116,6 +121,11 @@ protected String complexCopy() {
return "complex_copy";
}

@Override
protected String valuesObject() {
return "values_object";
}

@Override
public void testCoExistanceOfMultipleLanguageInstances() throws Exception {
/*
39 changes: 39 additions & 0 deletions truffle/src/test/ruby/tck.rb
Original file line number Diff line number Diff line change
@@ -85,6 +85,13 @@ def complex_add(a, b)

Truffle::Interop.export_method(:complex_add)

def complex_add_with_method(a, b)
Truffle::Interop.write_property a, :imaginary, Truffle::Interop.read_property(a, :imaginary) + Truffle::Interop.read_property(b, :imaginary)
Truffle::Interop.write_property a, :real, Truffle::Interop.read_property(a, :real) + Truffle::Interop.read_property(b, :real)
end

Truffle::Interop.export_method(:complex_add_with_method)

def complex_sum_real(complexes)
complexes = Truffle::Interop.enumerable(complexes)

@@ -110,3 +117,35 @@ def complex_copy(a, b)
end

Truffle::Interop.export_method(:complex_copy)

class ValuesClass

attr_accessor :byteValue
attr_accessor :shortValue
attr_accessor :intValue
attr_accessor :longValue
attr_accessor :floatValue
attr_accessor :doubleValue
attr_accessor :charValue
attr_accessor :stringValue
attr_accessor :booleanValue

def initialize
@byteValue = 0
@shortValue = 0
@intValue = 0
@longValue = 0
@floatValue = 0.0
@doubleValue = 0.0
@charValue = '0'
@stringValue = ''
@booleanValue = false
end

end

def values_object
ValuesClass.new
end

Truffle::Interop.export_method(:values_object)