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

Commits on Apr 12, 2016

  1. Copy the full SHA
    29fbd9e View commit details

Commits on Apr 14, 2016

  1. Copy the full SHA
    d56e17e View commit details
  2. Copy the full SHA
    754ffda View commit details
  3. Copy the full SHA
    c5dec24 View commit details
  4. [Truffle] Allow flattenBytes to short-circuit for any rope that alrea…

    …dy has its byte array populated.
    nirvdrum committed Apr 14, 2016
    Copy the full SHA
    c22dfd0 View commit details
  5. [Truffle] All rope bytes will start at offset 0.

    The code that was here was placeholder code for algorithms converted from ByteList. The idea was something like SubstringRope could share its raw bytes with its child, and then alter its 'begin' value to demarcate its real portion of the underlying byte array. While there may be real benefits to that level of byte sharing, it complicates all code that must work with the bytes. And we've already assumed the 'begin' value is 0 in several places.
    
    Should we wish to revisit the byte sharing, it's probably best done in the context of a specialized node for whatever operation.
    nirvdrum committed Apr 14, 2016
    Copy the full SHA
    7f8d612 View commit details
  6. Copy the full SHA
    93a98da View commit details
  7. Copy the full SHA
    0e80cdb View commit details
  8. Copy the full SHA
    8037c76 View commit details
  9. Copy the full SHA
    b12ab7c View commit details
  10. [Truffle] Short cut the encoding compatibility check when doing Strin…

    …g#+ and specialise for the common case of UTF8 (literal) + USASCII (runtime) in either order.
    chrisseaton committed Apr 14, 2016
    Copy the full SHA
    9320450 View commit details
  11. [Truffle] Typo.

    chrisseaton committed Apr 14, 2016
    Copy the full SHA
    7e590ec View commit details
  12. Copy the full SHA
    87dbb7f View commit details
  13. Copy the full SHA
    55bd814 View commit details

Commits on Apr 15, 2016

  1. Copy the full SHA
    45b9937 View commit details
  2. Copy the full SHA
    373c847 View commit details
  3. Copy the full SHA
    c7061e7 View commit details
  4. Copy the full SHA
    3b37709 View commit details
  5. Copy the full SHA
    79ea1cb View commit details
  6. 3
    Copy the full SHA
    6d95105 View commit details
  7. Copy the full SHA
    44af462 View commit details
  8. Copy the full SHA
    7fbd039 View commit details
  9. Copy the full SHA
    0481ebf View commit details
  10. Copy the full SHA
    40d397c View commit details
  11. Copy the full SHA
    2f25c43 View commit details
  12. [Truffle] Fix typo.

    eregon committed Apr 15, 2016
    Copy the full SHA
    5615efc View commit details
  13. Copy the full SHA
    8c9ed22 View commit details
  14. Merge pull request #3791 from chyh1990/add_ir_writing_dyn

    Add option to enable ir writing on-the-fly
    enebo committed Apr 15, 2016
    Copy the full SHA
    fcf3451 View commit details
  15. [Truffle] Various small improvements for ArrayStrategy.

    * ArrayStrategy.of(array, value) returns the strategy of the array storage.
    * Let LongIntArrayStrategy inherit from LongArrayStrategy.
    * Allow NullArrayStrategy to generalize.
    * Show storage type in unsupported.
    eregon committed Apr 15, 2016
    Copy the full SHA
    e8fffcb View commit details
  16. [Truffle] Fix typo in ArrayAppendOneNode guards.

    * Make sure it only handles cases that need generalization.
    eregon committed Apr 15, 2016
    Copy the full SHA
    5f0cea5 View commit details
  17. Copy the full SHA
    c6f0234 View commit details
  18. [Truffle] Fix typo.

    eregon committed Apr 15, 2016
    Copy the full SHA
    4a218e4 View commit details
  19. Copy the full SHA
    0384576 View commit details
  20. Copy the full SHA
    5dc7054 View commit details
  21. Copy the full SHA
    a7a7e29 View commit details
  22. [Truffle] support format '%p'

    pitr-ch committed Apr 15, 2016
    Copy the full SHA
    b1ab3c3 View commit details
  23. Copy the full SHA
    443bc79 View commit details
  24. Copy the full SHA
    1efb430 View commit details
  25. Merge pull request #3803 from jruby/truffle-cext-sketch

    Truffle cext sketch
    chrisseaton committed Apr 15, 2016
    Copy the full SHA
    fce464d View commit details
  26. Copy the full SHA
    6e1264c View commit details
  27. Merge branch 'master' into truffle-head

    # Conflicts:
    #	tool/jt.rb
    #	truffle/src/main/java/org/jruby/truffle/language/RubyNode.java
    chrisseaton committed Apr 15, 2016
    Copy the full SHA
    d6e8d1f View commit details
Showing with 1,059 additions and 661 deletions.
  1. +1 −1 bin/jruby-cext-c
  2. +1 −0 core/src/main/java/org/jruby/RubyInstanceConfig.java
  3. +1 −1 core/src/main/java/org/jruby/ir/IRScope.java
  4. +1 −0 core/src/main/java/org/jruby/util/cli/Options.java
  5. +21 −11 lib/ruby/truffle/cext/ruby.h
  6. +7 −21 spec/truffle/specs/truffle/array/append_spec.rb
  7. +114 −0 spec/truffle/specs/truffle/array/element_set_spec.rb
  8. +1 −0 spec/truffle/tags/core/io/reopen_tags.txt
  9. +1 −0 spec/truffle/tags/truffle/array/element_set_tags.txt
  10. +14 −0 test/truffle/integration/irb.sh
  11. +3 −0 test/truffle/integration/irb/input.txt
  12. +6 −0 test/truffle/integration/irb/output.txt
  13. +1 −1 test/truffle/integration/long-tests.txt
  14. +1 −1 test/truffle/integration/{rails.sh → rails-app.sh}
  15. 0 test/truffle/integration/{rails → rails-app}/.gitignore
  16. 0 test/truffle/integration/{rails → rails-app}/.jruby+truffle.yaml
  17. 0 test/truffle/integration/{rails → rails-app}/Gemfile
  18. 0 test/truffle/integration/{rails → rails-app}/Gemfile.lock
  19. 0 test/truffle/integration/{rails → rails-app}/Rakefile
  20. 0 test/truffle/integration/{rails → rails-app}/app/assets/images/.keep
  21. 0 test/truffle/integration/{rails → rails-app}/app/assets/stylesheets/application.css
  22. 0 test/truffle/integration/{rails → rails-app}/app/controllers/application_controller.rb
  23. 0 test/truffle/integration/{rails → rails-app}/app/controllers/concerns/.keep
  24. 0 test/truffle/integration/{rails → rails-app}/app/controllers/people_controller.rb
  25. 0 test/truffle/integration/{rails → rails-app}/app/helpers/application_helper.rb
  26. 0 test/truffle/integration/{rails → rails-app}/app/models/concerns/.keep
  27. 0 test/truffle/integration/{rails → rails-app}/app/models/person.rb
  28. 0 test/truffle/integration/{rails → rails-app}/app/views/layouts/application.html.erb
  29. 0 test/truffle/integration/{rails → rails-app}/app/views/people/index.erb
  30. 0 test/truffle/integration/{rails → rails-app}/bin/bundle
  31. 0 test/truffle/integration/{rails → rails-app}/bin/rails
  32. 0 test/truffle/integration/{rails → rails-app}/bin/rake
  33. 0 test/truffle/integration/{rails → rails-app}/bin/setup
  34. 0 test/truffle/integration/{rails → rails-app}/config.ru
  35. 0 test/truffle/integration/{rails → rails-app}/config/application.rb
  36. 0 test/truffle/integration/{rails → rails-app}/config/boot.rb
  37. 0 test/truffle/integration/{rails → rails-app}/config/database.yml
  38. 0 test/truffle/integration/{rails → rails-app}/config/environment.rb
  39. 0 test/truffle/integration/{rails → rails-app}/config/environments/development.rb
  40. 0 test/truffle/integration/{rails → rails-app}/config/environments/production.rb
  41. 0 test/truffle/integration/{rails → rails-app}/config/environments/test.rb
  42. 0 test/truffle/integration/{rails → rails-app}/config/initializers/backtrace_silencers.rb
  43. 0 test/truffle/integration/{rails → rails-app}/config/initializers/cookies_serializer.rb
  44. 0 test/truffle/integration/{rails → rails-app}/config/initializers/filter_parameter_logging.rb
  45. 0 test/truffle/integration/{rails → rails-app}/config/initializers/inflections.rb
  46. 0 test/truffle/integration/{rails → rails-app}/config/initializers/mime_types.rb
  47. 0 test/truffle/integration/{rails → rails-app}/config/initializers/session_store.rb
  48. 0 test/truffle/integration/{rails → rails-app}/config/initializers/wrap_parameters.rb
  49. 0 test/truffle/integration/{rails → rails-app}/config/locales/en.yml
  50. 0 test/truffle/integration/{rails → rails-app}/config/routes.rb
  51. 0 test/truffle/integration/{rails → rails-app}/config/secrets.yml
  52. 0 test/truffle/integration/{rails → rails-app}/lib/assets/.keep
  53. 0 test/truffle/integration/{rails → rails-app}/lib/tasks/.keep
  54. 0 test/truffle/integration/{rails → rails-app}/log/.keep
  55. 0 test/truffle/integration/{rails → rails-app}/public/404.html
  56. 0 test/truffle/integration/{rails → rails-app}/public/422.html
  57. 0 test/truffle/integration/{rails → rails-app}/public/500.html
  58. 0 test/truffle/integration/{rails → rails-app}/public/favicon.ico
  59. 0 test/truffle/integration/{rails → rails-app}/public/robots.txt
  60. 0 test/truffle/integration/{rails → rails-app}/public/stylesheets/application.css
  61. 0 test/truffle/integration/{rails → rails-app}/public/stylesheets/kube.css
  62. 0 test/truffle/integration/{rails → rails-app}/test/controllers/.keep
  63. 0 test/truffle/integration/{rails → rails-app}/test/fixtures/.keep
  64. 0 test/truffle/integration/{rails → rails-app}/test/helpers/.keep
  65. 0 test/truffle/integration/{rails → rails-app}/test/integration/.keep
  66. 0 test/truffle/integration/{rails → rails-app}/test/mailers/.keep
  67. 0 test/truffle/integration/{rails → rails-app}/test/models/.keep
  68. 0 test/truffle/integration/{rails → rails-app}/test/test_helper.rb
  69. 0 test/truffle/integration/{rails → rails-app}/vendor/assets/javascripts/.keep
  70. 0 test/truffle/integration/{rails → rails-app}/vendor/assets/stylesheets/.keep
  71. +12 −3 tool/jt.rb
  72. +2 −0 truffle/src/main/c/cext/.jruby-cext-build.yml
  73. +203 −0 truffle/src/main/c/cext/ruby.c
  74. +3 −0 truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java
  75. +3 −0 truffle/src/main/java/org/jruby/truffle/core/ProcessNodes.java
  76. +3 −3 truffle/src/main/java/org/jruby/truffle/core/array/ArrayAppendOneNode.java
  77. +115 −185 truffle/src/main/java/org/jruby/truffle/core/array/ArrayNodes.java
  78. +3 −4 truffle/src/main/java/org/jruby/truffle/core/array/ArrayReadDenormalizedNode.java
  79. +1 −2 truffle/src/main/java/org/jruby/truffle/core/array/ArrayReadNormalizedNode.java
  80. +10 −17 truffle/src/main/java/org/jruby/truffle/core/array/ArrayStrategy.java
  81. +2 −1 truffle/src/main/java/org/jruby/truffle/core/cast/StringToSymbolNode.java
  82. +6 −1 truffle/src/main/java/org/jruby/truffle/core/exception/CoreExceptions.java
  83. +18 −21 truffle/src/main/java/org/jruby/truffle/core/format/printf/PrintfTreeBuilder.java
  84. +3 −1 truffle/src/main/java/org/jruby/truffle/core/kernel/KernelNodes.java
  85. +2 −1 truffle/src/main/java/org/jruby/truffle/core/numeric/FixnumNodes.java
  86. +21 −0 truffle/src/main/java/org/jruby/truffle/core/numeric/FloatNodes.java
  87. +2 −2 truffle/src/main/java/org/jruby/truffle/core/regexp/MatchDataNodes.java
  88. +5 −4 truffle/src/main/java/org/jruby/truffle/core/regexp/RegexpNodes.java
  89. +1 −1 truffle/src/main/java/org/jruby/truffle/core/rope/ConcatRope.java
  90. +0 −4 truffle/src/main/java/org/jruby/truffle/core/rope/Rope.java
  91. +0 −22 truffle/src/main/java/org/jruby/truffle/core/rope/RopeConstants.java
  92. +6 −7 truffle/src/main/java/org/jruby/truffle/core/rope/RopeOperations.java
  93. +6 −2 truffle/src/main/java/org/jruby/truffle/core/rope/RopeTable.java
  94. +61 −112 truffle/src/main/java/org/jruby/truffle/core/rubinius/IOPrimitiveNodes.java
  95. +4 −4 truffle/src/main/java/org/jruby/truffle/core/rubinius/RegexpPrimitiveNodes.java
  96. +20 −21 truffle/src/main/java/org/jruby/truffle/core/rubinius/StringPrimitiveNodes.java
  97. +38 −12 truffle/src/main/java/org/jruby/truffle/core/string/StringNodes.java
  98. +1 −11 truffle/src/main/java/org/jruby/truffle/core/symbol/SymbolTable.java
  99. +2 −1 truffle/src/main/java/org/jruby/truffle/core/thread/ThreadBacktraceLocationNodes.java
  100. +36 −0 truffle/src/main/java/org/jruby/truffle/interop/CExtNodes.java
  101. +206 −0 truffle/src/main/java/org/jruby/truffle/language/RubyBaseNode.java
  102. +4 −166 truffle/src/main/java/org/jruby/truffle/language/RubyNode.java
  103. +3 −0 truffle/src/main/java/org/jruby/truffle/language/RubyRootNode.java
  104. +83 −15 truffle/src/main/java/org/jruby/truffle/language/methods/InternalMethod.java
  105. +1 −2 truffle/src/main/java/org/jruby/truffle/stdlib/DigestNodes.java
2 changes: 1 addition & 1 deletion bin/jruby-cext-c
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ LL = []

SRC.each do |src|
ll = File.join(File.dirname(src), File.basename(src, '.*') + '.ll')
mx 'su-clang', '-Ilib/ruby/truffle/cext', '-S', '-emit-llvm', src, '-o', ll
mx 'su-clang', "-I#{SULONG_DIR}/include", '-Ilib/ruby/truffle/cext', '-S', '-emit-llvm', src, '-o', ll
LL.push ll
end

1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/RubyInstanceConfig.java
Original file line number Diff line number Diff line change
@@ -1866,6 +1866,7 @@ public boolean isTruffle() {
public static String IR_COMPILER_PASSES = Options.IR_COMPILER_PASSES.load();
public static String IR_JIT_PASSES = Options.IR_JIT_PASSES.load();
public static String IR_INLINE_COMPILER_PASSES = Options.IR_INLINE_COMPILER_PASSES.load();
public static boolean RECORD_LEXICAL_HIERARCHY = Options.RECORD_LEXICAL_HIERARCHY.load();

public static final boolean COROUTINE_FIBERS = Options.FIBER_COROUTINES.load();

2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ir/IRScope.java
Original file line number Diff line number Diff line change
@@ -190,7 +190,7 @@ public IRScope(IRManager manager, IRScope lexicalParent, String name,
}

private void setupLexicalContainment() {
if (manager.isDryRun() || RubyInstanceConfig.IR_WRITING) {
if (manager.isDryRun() || RubyInstanceConfig.IR_WRITING || RubyInstanceConfig.RECORD_LEXICAL_HIERARCHY) {
lexicalChildren = new ArrayList<>(1);
if (lexicalParent != null) lexicalParent.addChildScope(this);
}
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/util/cli/Options.java
Original file line number Diff line number Diff line change
@@ -165,6 +165,7 @@ public class Options {
public static final Option<Boolean> PREFER_IPV4 = bool(MISCELLANEOUS, "net.preferIPv4", true, "Prefer IPv4 network stack");
public static final Option<Boolean> FCNTL_LOCKING = bool(MISCELLANEOUS, "file.flock.fcntl", true, "Use fcntl rather than flock for File#flock");
public static final Option<Boolean> VOLATILE_VARIABLES = bool(MISCELLANEOUS, "volatile.variables", true, "Always ensure volatile semantics for instance variables.");
public static final Option<Boolean> RECORD_LEXICAL_HIERARCHY = bool(MISCELLANEOUS, "record.lexical.hierarchy", false, "Maintain children static scopes to support scope dumping.");

public static final Option<Boolean> DEBUG_LOADSERVICE = bool(DEBUG, "debug.loadService", false, "Log require/load file searches.");
public static final Option<Boolean> DEBUG_LOADSERVICE_TIMING = bool(DEBUG, "debug.loadService.timing", false, "Log require/load parse+evaluate times.");
32 changes: 21 additions & 11 deletions lib/ruby/truffle/cext/ruby.h
Original file line number Diff line number Diff line change
@@ -26,15 +26,25 @@ extern "C" {
typedef void *ID;
typedef void *VALUE;

extern VALUE Qfalse;
extern VALUE Qtrue;
extern VALUE Qnil;
VALUE get_Qfalse();
VALUE get_Qtrue();
VALUE get_Qnil();

extern VALUE rb_cObject;
extern VALUE rb_cArray;
extern VALUE rb_cHash;
#define Qfalse get_Qfalse()
#define Qtrue get_Qtrue()
#define Qnil get_Qnil()

extern VALUE rb_eRuntimeError;
VALUE get_rb_cObject();
VALUE get_rb_cArray();
VALUE get_rb_cHash();

#define rb_cObject get_rb_cObject()
#define rb_cArray get_rb_cArray()
#define rb_cHash get_rb_cHash()

VALUE get_rb_eRuntimeError();

#define rb_eRuntimeError get_rb_eRuntimeError();

int NUM2INT(VALUE value);
unsigned int NUM2UINT(VALUE value);
@@ -53,14 +63,14 @@ VALUE LONG2FIX(long value);

int FIXNUM_P(VALUE value);

char* RSTRING_PTR(VALUE string);
char *RSTRING_PTR(VALUE string);
int RSTRING_LEN(VALUE string);
ID rb_intern(const char *string);
VALUE rb_intern_str(VALUE string);
void rb_str_cat(VALUE string, char *to_concat, long length);

int RARRAY_LEN(VALUE array);
VALUE* RARRAY_PTR(VALUE array);
VALUE *RARRAY_PTR(VALUE array);
VALUE rb_ary_new_capa(long capacity);
VALUE rb_ary_new2();
VALUE rb_ary_new();
@@ -71,9 +81,9 @@ VALUE rb_ary_entry(VALUE array, long index);
VALUE rb_hash_aref(VALUE hash, VALUE key);
void rb_hash_aset(VALUE hash, VALUE key, VALUE value);

void rb_scan_args(int, VALUE*, char *, ...);
void rb_scan_args(int argc, VALUE *argv, char *format, ...);

VALUE rb_funcall(VALUE object, ID, int, ...);
VALUE rb_funcall(VALUE object, ID name, int argc, ...);

VALUE rb_iv_get(VALUE object, const char *name);
VALUE rb_iv_set(VALUE object, const char *name, VALUE value);
28 changes: 7 additions & 21 deletions spec/truffle/specs/truffle/array/append_spec.rb
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
# Copyright (c) 2008 Engine Yard, Inc. All rights reserved.

# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:

# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# 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
# OTHER DEALINGS IN THE SOFTWARE.

require_relative '../../../../ruby/spec_helper'
114 changes: 114 additions & 0 deletions spec/truffle/specs/truffle/array/element_set_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# 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 "Array#[]=" do
def storage(ary)
Truffle::Primitive.array_storage(ary)
end

before :each do
@long = 1 << 52
end

it "migrates to the most specific storage if initially empty" do
ary = []
ary[0] = Object.new
storage(ary).should == "Object[]"

ary = []
ary[0] = 3.14
storage(ary).should == "double[]"

ary = []
ary[0] = @long
storage(ary).should == "long[]"

ary = []
ary[0] = 1
storage(ary).should == "int[]"
end

it "keeps the same storage if compatible and in bounds" do
ary = [Object.new, Object.new]
ary[1] = Object.new
storage(ary).should == "Object[]"

ary = [3.11, 3.12]
ary[1] = 3.14
storage(ary).should == "double[]"

ary = [@long-2, @long-1]
ary[1] = @long
storage(ary).should == "long[]"

ary = [@long-2, @long-1]
ary[1] = 3
storage(ary).should == "long[]"

ary = [0, 1]
ary[1] = 2
storage(ary).should == "int[]"
end

it "generalizes if not compatible and in bounds" do
ary = [3.11, 3.12]
ary[1] = Object.new
storage(ary).should == "Object[]"

ary = [@long-2, @long-1]
ary[1] = 3.14
storage(ary).should == "Object[]"

ary = [0, 1]
ary[1] = @long
storage(ary).should == "long[]"

ary = [0, 1]
ary[1] = Object.new
storage(ary).should == "Object[]"
end

it "keeps the same storage if compatible and appending" do
ary = [Object.new, Object.new]
ary[2] = Object.new
storage(ary).should == "Object[]"

ary = [3.11, 3.12]
ary[2] = 3.14
storage(ary).should == "double[]"

ary = [@long-2, @long-1]
ary[2] = @long
storage(ary).should == "long[]"

ary = [0, 1]
ary[2] = 2
storage(ary).should == "int[]"
end

it "migrates to Object[] if writing out of bounds" do
ary = [Object.new, Object.new]
ary[3] = Object.new
storage(ary).should == "Object[]"

ary = [3.11, 3.12]
ary[3] = 3.14
storage(ary).should == "Object[]"

ary = [@long-2, @long-1]
ary[3] = @long
storage(ary).should == "Object[]"

ary = [0, 1]
ary[3] = 2
storage(ary).should == "Object[]"
end
end

1 change: 1 addition & 0 deletions spec/truffle/tags/core/io/reopen_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
fails:IO#reopen with a String effects exec/system/fork performed after it
fails:IO#reopen with a String opens a path after writing to the original file descriptor
fails:IO#reopen with a String positions an instance that has been read from at the beginning of the new stream
slow:IO#reopen with a String effects exec/system/fork performed after it
1 change: 1 addition & 0 deletions spec/truffle/tags/truffle/array/element_set_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Array#[]= keeps the same storage if compatible and in bounds
14 changes: 14 additions & 0 deletions test/truffle/integration/irb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e

ruby -X+T -S irb < test/truffle/integration/irb/input.txt > temp.txt

if ! cmp --silent temp.txt test/truffle/integration/irb/output.txt
then
echo IRB output was not as expected
rm -f temp.txt
exit 1
else
rm -f temp.txt
fi
3 changes: 3 additions & 0 deletions test/truffle/integration/irb/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
14
14 + 2
exit
6 changes: 6 additions & 0 deletions test/truffle/integration/irb/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Switch to inspect mode.
14
14
14 + 2
16
exit
2 changes: 1 addition & 1 deletion test/truffle/integration/long-tests.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rails.sh
rails-app.sh
gem-testing.sh
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

set -e

cd test/truffle/integration/rails
cd test/truffle/integration/rails-app

JRUBY_BIN=../../../../bin
JRUBY=$JRUBY_BIN/jruby
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 12 additions & 3 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -269,6 +269,7 @@ def help
puts ' --server run an instrumentation server on port 8080'
puts ' --igv make sure IGV is running and dump Graal graphs after partial escape (implies --graal)'
puts ' --full show all phases, not just up to the Truffle partial escape'
puts ' --bips run with benchmark-ips on the load path (implies --graal)'
puts ' --jdebug run a JDWP debug server on #{JDEBUG_PORT}'
puts ' --jexception[s] print java exceptions'
puts 'jt e 14 + 2 evaluate an expression'
@@ -355,9 +356,10 @@ def run(*args)
]

{
'--asm' => '--graal',
'--igv' => '--graal',
'--sulong' => '--graal'
'--asm' => '--graal',
'--igv' => '--graal',
'--sulong' => '--graal',
'--bips' => '--graal'
}.each_pair do |arg, dep|
args.unshift dep if args.include?(arg)
end
@@ -387,6 +389,13 @@ def run(*args)
jruby_args += %w[-J-XX:+UnlockDiagnosticVMOptions -J-XX:CompileCommand=print,*::callRoot]
end

if args.delete('--bips')
bips_version = '2.6.1'
bips = "#{JRUBY_DIR}/lib/ruby/gems/shared/gems/benchmark-ips-#{bips_version}/lib"
sh 'bin/jruby', 'bin/gem', 'install', 'benchmark-ips', '-v', bips_version unless Dir.exist?(bips)
jruby_args << "-I#{bips}"
end

if args.delete('--jdebug')
jruby_args << JDEBUG
end
2 changes: 2 additions & 0 deletions truffle/src/main/c/cext/.jruby-cext-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src: ./*.c
out: ruby.su
Loading