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

Commits on Nov 16, 2015

  1. Copy the full SHA
    04418a3 View commit details
  2. Copy the full SHA
    5c5f637 View commit details
  3. Copy the full SHA
    d9650ee View commit details
  4. Copy the full SHA
    fa48f45 View commit details
  5. Copy the full SHA
    4a53a79 View commit details
  6. Copy the full SHA
    b4b1f54 View commit details
  7. Copy the full SHA
    03dab04 View commit details

Commits on Nov 17, 2015

  1. [Truffle] Pack comments.

    chrisseaton committed Nov 17, 2015
    Copy the full SHA
    394ba8f View commit details

Commits on Dec 2, 2015

  1. Copy the full SHA
    d9f8005 View commit details
  2. Copy the full SHA
    4ac7662 View commit details
  3. Copy the full SHA
    3f18c0d View commit details
  4. Copy the full SHA
    14a18b1 View commit details
  5. [Truffle] Run the VerifyTruffleProcessor to detect TruffleBoundary/Vi…

    …rtualFrame conflicts at compilation time from maven.
    eregon committed Dec 2, 2015
    1
    Copy the full SHA
    7091d23 View commit details
  6. [Truffle] Simplify ReadHeadObjectFieldNode and ReadInstanceVariableNode.

    * Does potentially boxing but in the interpreter values are getting boxed across calls anyway.
    eregon committed Dec 2, 2015
    Copy the full SHA
    511b580 View commit details
  7. Copy the full SHA
    7457dde View commit details
  8. [Truffle] Clean up Fixnum#{<<,>>}.

    * Proper types, no transfer, lower the rhs before the node.
    eregon committed Dec 2, 2015
    Copy the full SHA
    f91a591 View commit details
  9. Copy the full SHA
    c7c9e30 View commit details

Commits on Dec 3, 2015

  1. [Truffle] Lower parameters to int or let the implicit cast to long.

    * Fixes lowerFixnumParameters on shift nodes.
    eregon committed Dec 3, 2015
    Copy the full SHA
    f01511d View commit details
  2. [Truffle] Do not contain other specializations in Fixnum#&.

    * Otherwise it gets to long in all cases in pure interpreter.
    eregon committed Dec 3, 2015
    Copy the full SHA
    92288e6 View commit details
  3. Copy the full SHA
    5a5fe17 View commit details
  4. Copy the full SHA
    4168709 View commit details
  5. [Truffle] Make sure the @Mask is a int in the Fixnum#& spec.

    * Since in interpreter nodes are not split, either of the two operations might return long.
    eregon committed Dec 3, 2015
    Copy the full SHA
    f2f03cd View commit details
  6. Copy the full SHA
    5b1b6ae View commit details
  7. [Truffle] Use ConditionProfile in FixnumOrBignumNode.

    * May also omit the BigInteger case in compiled code now.
    eregon committed Dec 3, 2015
    Copy the full SHA
    1dacc10 View commit details
  8. Copy the full SHA
    4dc9ffd View commit details

Commits on Dec 4, 2015

  1. Copy the full SHA
    287078c View commit details
  2. Copy the full SHA
    454b0ae View commit details
  3. [Truffle] Import pr-zlib

    chrisseaton committed Dec 4, 2015
    Copy the full SHA
    0a96551 View commit details
  4. Copy the full SHA
    e44cefc View commit details
  5. Copy the full SHA
    c706e2f View commit details
  6. Merge pull request #3515 from jruby/truffle-pr-zlib

    Truffle pr zlib
    chrisseaton committed Dec 4, 2015
    Copy the full SHA
    5c5b5df View commit details

Commits on Dec 5, 2015

  1. Handle default block arg preparation logic

    * This was not as bad as I thought.
    * The only thing left to handle now is making sure these prepare args
      instructions handle lambdas as well.
    subbuss committed Dec 5, 2015
    Copy the full SHA
    5bb351f View commit details
  2. Add additional yieldDirect wrappers where they were missing

    * Also added FIXME for dealing with RubyProc.call since the
      current prepareArgs methods only deal with Block.yield.
    subbuss committed Dec 5, 2015
    Copy the full SHA
    9e38d83 View commit details
  3. [Truffle] Array storage must be Object[] not DynamicObject[].

    * Avoid copying when only reading from the Encoding list.
    eregon committed Dec 5, 2015
    Copy the full SHA
    0104c31 View commit details
  4. [Truffle] Check the class of Object[] storage strictly.

    * Avoids covariance problems and makes sure no type check is required on cast.
    eregon committed Dec 5, 2015
    Copy the full SHA
    3b3d19e View commit details

Commits on Dec 6, 2015

  1. Remove duplicate arity check when lambdas are call-ed

    * prepareArgumentsForCall does the arity check already.
    subbuss committed Dec 6, 2015
    Copy the full SHA
    926c76a View commit details
  2. Copy the full SHA
    47d6e92 View commit details
  3. Update prepareBlockArgs code to deal with lambdas & proc calls

    Added a new field to ThreadContext to pass additional information
    since Block.type and call/yield API calls may not be correlated.
    Something worth cleaning up in the future, but for now, the extra
    state in ThreadContext should be sufficient.
    subbuss committed Dec 6, 2015
    Copy the full SHA
    6e48810 View commit details
  4. Copy the full SHA
    72b0912 View commit details
  5. [Truffle] PE: move the code in a method to make compilation faster.

    * Use a while loop to avoid compiling Kernel#loop.
    * Also remove Thread.pass which would be compiled every time.
    * Save the return value in a global variable.
    eregon committed Dec 6, 2015
    Copy the full SHA
    70603e3 View commit details
  6. Copy the full SHA
    cedd436 View commit details
  7. Copy the full SHA
    ddf5e93 View commit details
  8. Copy the full SHA
    a8d1bd4 View commit details
  9. Copy the full SHA
    a696822 View commit details
  10. Copy the full SHA
    0ab806a View commit details
  11. Copy the full SHA
    2986e5f View commit details
  12. Copy the full SHA
    f4e4134 View commit details
  13. Copy the full SHA
    ddbcc85 View commit details
  14. Copy the full SHA
    29e9cf4 View commit details
  15. Update ACP pass to add explicit invocation protocol for blocks

    * This is not yet enabled.
    * This needs thorough testing in interpreter mode (and I am running
      into some lifecycle issues that I'll have to figure out).
    * Also, JIT needs to be updated to generate code for these new
      instructions before this is turned on there.
    subbuss committed Dec 6, 2015
    Copy the full SHA
    9674fa6 View commit details
Showing with 12,692 additions and 2,909 deletions.
  1. +4 −0 COPYING
  2. +3 −3 core/pom.xml
  3. +49 −14 core/src/main/java/org/jruby/Main.java
  4. +20 −6 core/src/main/java/org/jruby/Ruby.java
  5. +1 −1 core/src/main/java/org/jruby/RubyArray.java
  6. +3 −0 core/src/main/java/org/jruby/RubyClass.java
  7. +2 −0 core/src/main/java/org/jruby/RubyEnumerable.java
  8. +57 −55 core/src/main/java/org/jruby/RubyEnumerator.java
  9. +19 −15 core/src/main/java/org/jruby/RubyFloat.java
  10. +10 −9 core/src/main/java/org/jruby/RubyKernel.java
  11. +78 −0 core/src/main/java/org/jruby/RubyStopIteration.java
  12. +16 −7 core/src/main/java/org/jruby/RubyTime.java
  13. +9 −0 core/src/main/java/org/jruby/ast/StrNode.java
  14. +1 −1 core/src/main/java/org/jruby/compiler/JITCompiler.java
  15. +23 −22 core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
  16. +4 −5 core/src/main/java/org/jruby/ext/timeout/Timeout.java
  17. +2 −1 core/src/main/java/org/jruby/internal/runtime/methods/MixedModeIRMethod.java
  18. +9 −12 core/src/main/java/org/jruby/ir/IRBuilder.java
  19. +5 −2 core/src/main/java/org/jruby/ir/IRClosure.java
  20. +15 −8 core/src/main/java/org/jruby/ir/IRScope.java
  21. +2 −0 core/src/main/java/org/jruby/ir/IRVisitor.java
  22. +3 −1 core/src/main/java/org/jruby/ir/Operation.java
  23. +37 −4 core/src/main/java/org/jruby/ir/instructions/BEQInstr.java
  24. +1 −1 core/src/main/java/org/jruby/ir/instructions/CallBase.java
  25. +9 −3 core/src/main/java/org/jruby/ir/instructions/EQQInstr.java
  26. +11 −8 core/src/main/java/org/jruby/ir/instructions/PrepareBlockArgsInstr.java
  27. +4 −23 core/src/main/java/org/jruby/ir/instructions/PrepareFixedBlockArgsInstr.java
  28. +29 −0 core/src/main/java/org/jruby/ir/instructions/PrepareNoBlockArgsInstr.java
  29. +4 −9 core/src/main/java/org/jruby/ir/instructions/PrepareSingleBlockArgInstr.java
  30. +26 −0 core/src/main/java/org/jruby/ir/instructions/RethrowSavedExcInLambdaInstr.java
  31. +1 −0 core/src/main/java/org/jruby/ir/interpreter/InterpreterContext.java
  32. +22 −32 core/src/main/java/org/jruby/ir/interpreter/InterpreterEngine.java
  33. +61 −46 core/src/main/java/org/jruby/ir/interpreter/Profiler.java
  34. +0 −2 core/src/main/java/org/jruby/ir/interpreter/StartupInterpreterEngine.java
  35. +125 −73 core/src/main/java/org/jruby/ir/passes/AddCallProtocolInstructions.java
  36. +21 −1 core/src/main/java/org/jruby/ir/representations/BasicBlock.java
  37. +247 −16 core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java
  38. +73 −1 core/src/main/java/org/jruby/ir/targets/IRBytecodeAdapter.java
  39. +2 −42 core/src/main/java/org/jruby/ir/targets/IRBytecodeAdapter6.java
  40. +124 −12 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
  41. +6 −4 core/src/main/java/org/jruby/ir/transformations/inlining/CFGInliner.java
  42. +7 −0 core/src/main/java/org/jruby/parser/ParserSupport.java
  43. +6 −6 core/src/main/java/org/jruby/parser/RubyParser.java
  44. +5 −6 core/src/main/java/org/jruby/parser/RubyParser.y
  45. +53 −25 core/src/main/java/org/jruby/runtime/BlockBody.java
  46. +58 −36 core/src/main/java/org/jruby/runtime/CompiledIRBlockBody.java
  47. +54 −33 core/src/main/java/org/jruby/runtime/IRBlockBody.java
  48. +18 −10 core/src/main/java/org/jruby/runtime/InterpretedIRBlockBody.java
  49. +38 −16 core/src/main/java/org/jruby/runtime/MixedModeIRBlockBody.java
  50. +1 −1 core/src/main/java/org/jruby/runtime/Signature.java
  51. +23 −0 core/src/main/java/org/jruby/runtime/ThreadContext.java
  52. +0 −3 core/src/main/java/org/jruby/util/Memo.java
  53. +3 −3 default.build.properties
  54. +55 −13 lib/ruby/stdlib/cmath.rb
  55. +10 −11 lib/ruby/stdlib/fileutils.rb
  56. +3 −8 lib/ruby/stdlib/net/ftp.rb
  57. +1 −2 lib/ruby/stdlib/net/http.rb
  58. +6 −4 lib/ruby/stdlib/net/http/response.rb
  59. +7 −1 lib/ruby/stdlib/net/imap.rb
  60. +7 −1 lib/ruby/stdlib/time.rb
  61. +1 −0 lib/ruby/truffle/README.md
  62. +17 −0 lib/ruby/truffle/jruby+truffle/README.md
  63. +10 −0 lib/ruby/truffle/jruby+truffle/gem_configurations/activesupport.yaml
  64. +12 −0 lib/ruby/truffle/jruby+truffle/gem_configurations/openweather.yaml
  65. +77 −20 lib/ruby/truffle/jruby+truffle/runner.rb
  66. +1 −0 lib/ruby/truffle/mri/rake.rb
  67. +1 −0 lib/ruby/truffle/mri/rake/alt_system.rb
  68. +1 −0 lib/ruby/truffle/mri/rake/application.rb
  69. +1 −0 lib/ruby/truffle/mri/rake/backtrace.rb
  70. +1 −0 lib/ruby/truffle/mri/rake/clean.rb
  71. +1 −0 lib/ruby/truffle/mri/rake/cloneable.rb
  72. +1 −0 lib/ruby/truffle/mri/rake/contrib/compositepublisher.rb
  73. +1 −0 lib/ruby/truffle/mri/rake/contrib/ftptools.rb
  74. +1 −0 lib/ruby/truffle/mri/rake/contrib/publisher.rb
  75. +1 −0 lib/ruby/truffle/mri/rake/contrib/rubyforgepublisher.rb
  76. +1 −0 lib/ruby/truffle/mri/rake/contrib/sshpublisher.rb
  77. +1 −0 lib/ruby/truffle/mri/rake/contrib/sys.rb
  78. +1 −0 lib/ruby/truffle/mri/rake/default_loader.rb
  79. +1 −0 lib/ruby/truffle/mri/rake/dsl_definition.rb
  80. +1 −0 lib/ruby/truffle/mri/rake/early_time.rb
  81. +1 −0 lib/ruby/truffle/mri/rake/ext/core.rb
  82. +2 −0 lib/ruby/truffle/mri/rake/ext/module.rb
  83. +1 −0 lib/ruby/truffle/mri/rake/ext/string.rb
  84. +1 −0 lib/ruby/truffle/mri/rake/ext/time.rb
  85. +1 −0 lib/ruby/truffle/mri/rake/file_creation_task.rb
  86. +1 −0 lib/ruby/truffle/mri/rake/file_list.rb
  87. +1 −0 lib/ruby/truffle/mri/rake/file_task.rb
  88. +1 −0 lib/ruby/truffle/mri/rake/file_utils.rb
  89. +1 −0 lib/ruby/truffle/mri/rake/file_utils_ext.rb
  90. +1 −0 lib/ruby/truffle/mri/rake/gempackagetask.rb
  91. +1 −0 lib/ruby/truffle/mri/rake/invocation_chain.rb
  92. +1 −0 lib/ruby/truffle/mri/rake/invocation_exception_mixin.rb
  93. +1 −0 lib/ruby/truffle/mri/rake/linked_list.rb
  94. +1 −0 lib/ruby/truffle/mri/rake/loaders/makefile.rb
  95. +1 −0 lib/ruby/truffle/mri/rake/multi_task.rb
  96. +1 −0 lib/ruby/truffle/mri/rake/name_space.rb
  97. +1 −0 lib/ruby/truffle/mri/rake/packagetask.rb
  98. +1 −0 lib/ruby/truffle/mri/rake/pathmap.rb
  99. +1 −0 lib/ruby/truffle/mri/rake/phony.rb
  100. +1 −0 lib/ruby/truffle/mri/rake/private_reader.rb
  101. +1 −0 lib/ruby/truffle/mri/rake/promise.rb
  102. +1 −0 lib/ruby/truffle/mri/rake/pseudo_status.rb
  103. +1 −0 lib/ruby/truffle/mri/rake/rake_module.rb
  104. +1 −0 lib/ruby/truffle/mri/rake/rake_test_loader.rb
  105. +1 −0 lib/ruby/truffle/mri/rake/rdoctask.rb
  106. +1 −0 lib/ruby/truffle/mri/rake/ruby182_test_unit_fix.rb
  107. +1 −0 lib/ruby/truffle/mri/rake/rule_recursion_overflow_error.rb
  108. +1 −0 lib/ruby/truffle/mri/rake/runtest.rb
  109. +1 −0 lib/ruby/truffle/mri/rake/scope.rb
  110. +1 −0 lib/ruby/truffle/mri/rake/task.rb
  111. +1 −0 lib/ruby/truffle/mri/rake/task_argument_error.rb
  112. +1 −0 lib/ruby/truffle/mri/rake/task_arguments.rb
  113. +1 −0 lib/ruby/truffle/mri/rake/task_manager.rb
  114. +1 −0 lib/ruby/truffle/mri/rake/tasklib.rb
  115. +1 −0 lib/ruby/truffle/mri/rake/testtask.rb
  116. +1 −0 lib/ruby/truffle/mri/rake/thread_history_display.rb
  117. +1 −0 lib/ruby/truffle/mri/rake/thread_pool.rb
  118. +1 −0 lib/ruby/truffle/mri/rake/trace_output.rb
  119. +1 −0 lib/ruby/truffle/mri/rake/version.rb
  120. +1 −0 lib/ruby/truffle/mri/rake/win32.rb
  121. +23 −0 lib/ruby/truffle/pr-zlib/CHANGES
  122. +20 −0 lib/ruby/truffle/pr-zlib/MANIFEST
  123. +52 −0 lib/ruby/truffle/pr-zlib/README
  124. +116 −0 lib/ruby/truffle/pr-zlib/Rakefile
  125. +173 −0 lib/ruby/truffle/pr-zlib/bin/minizip.rb
  126. +21 −0 lib/ruby/truffle/pr-zlib/certs/djberg96_pub.pem
  127. +385 −0 lib/ruby/truffle/pr-zlib/examples/example_rbzlib.rb
  128. +1 −0 lib/ruby/truffle/pr-zlib/lib/pr-zlib.rb
  129. +5,079 −0 lib/ruby/truffle/pr-zlib/lib/pr/rbzlib.rb
  130. +1,567 −0 lib/ruby/truffle/pr-zlib/lib/pr/zlib.rb
  131. +24 −0 lib/ruby/truffle/pr-zlib/pr-zlib.gemspec
  132. +43 −0 lib/ruby/truffle/pr-zlib/profile/bench_pr_zlib.rb
  133. +43 −0 lib/ruby/truffle/pr-zlib/profile/bench_zlib.rb
  134. +28 −0 lib/ruby/truffle/pr-zlib/profile/profile_pr_zlib_read.rb
  135. +26 −0 lib/ruby/truffle/pr-zlib/profile/profile_pr_zlib_write.rb
  136. +133 −0 lib/ruby/truffle/pr-zlib/test/test_rbzlib.rb
  137. +76 −0 lib/ruby/truffle/pr-zlib/test/test_rbzlib_bytef.rb
  138. +56 −0 lib/ruby/truffle/pr-zlib/test/test_rbzlib_posf.rb
  139. +168 −0 lib/ruby/truffle/pr-zlib/test/test_zlib.rb
  140. +55 −0 lib/ruby/truffle/pr-zlib/test/test_zlib_deflate.rb
  141. +93 −0 lib/ruby/truffle/pr-zlib/test/test_zlib_gzip_file.rb
  142. +183 −0 lib/ruby/truffle/pr-zlib/test/test_zlib_gzip_reader.rb
  143. +186 −0 lib/ruby/truffle/pr-zlib/test/test_zlib_gzip_writer.rb
  144. +55 −0 lib/ruby/truffle/pr-zlib/test/test_zlib_inflate.rb
  145. +146 −0 lib/ruby/truffle/pr-zlib/test/test_zlib_zstream.rb
  146. +1 −250 lib/ruby/truffle/truffle/zlib.rb
  147. +1 −1 spec/ruby/fixtures/code/concurrent.rb
  148. +10 −0 spec/ruby/language/lambda_spec.rb
  149. +0 −1 spec/tags/ruby/core/array/collect_tags.txt
  150. +0 −1 spec/tags/ruby/core/class/initialize_tags.txt
  151. +0 −1 spec/tags/ruby/core/enumerable/max_by_tags.txt
  152. +0 −1 spec/tags/ruby/core/enumerable/min_by_tags.txt
  153. +18 −15 spec/truffle/specs/truffle/attachments/attach_spec.rb
  154. +0 −54 spec/truffle/specs/truffle/attachments/detach_spec.rb
  155. +10 −3 spec/truffle/specs/truffle/binding_of_caller_spec.rb
  156. +1 −1 spec/truffle/specs/truffle/cext/load_extconf_spec.rb
  157. +40 −0 spec/truffle/specs/truffle/fixnum/and_spec.rb
  158. +2 −2 spec/truffle/specs/truffle/primitive/coverage_result_spec.rb
  159. +9 −2 spec/truffle/specs/truffle/source_of_caller_spec.rb
  160. +0 −1 spec/truffle/tags/core/string/modulo_tags.txt
  161. +0 −1 spec/truffle/tags/language/return_tags.txt
  162. +3 −0 spec/truffle/tags/library/zlib/crc32_tags.txt
  163. +0 −1 spec/truffle/tags/library/zlib/crc_table_tags.txt
  164. +0 −2 spec/truffle/tags/library/zlib/deflate/deflate_tags.txt
  165. +0 −1 spec/truffle/tags/library/zlib/deflate/set_dictionary_tags.txt
  166. +0 −1 spec/truffle/tags/library/zlib/gzipfile/close_tags.txt
  167. +0 −1 spec/truffle/tags/library/zlib/gzipfile/closed_tags.txt
  168. +0 −2 spec/truffle/tags/library/zlib/gzipfile/comment_tags.txt
  169. +0 −2 spec/truffle/tags/library/zlib/gzipfile/orig_name_tags.txt
  170. +0 −1 spec/truffle/tags/library/zlib/gzipreader/each_byte_tags.txt
  171. +0 −5 spec/truffle/tags/library/zlib/gzipreader/eof_tags.txt
  172. +0 −3 spec/truffle/tags/library/zlib/gzipreader/getc_tags.txt
  173. +0 −1 spec/truffle/tags/library/zlib/gzipreader/pos_tags.txt
  174. +0 −7 spec/truffle/tags/library/zlib/gzipreader/read_tags.txt
  175. +0 −3 spec/truffle/tags/library/zlib/gzipreader/rewind_tags.txt
  176. +0 −3 spec/truffle/tags/library/zlib/gzipwriter/mtime_tags.txt
  177. +0 −2 spec/truffle/tags/library/zlib/gzipwriter/write_tags.txt
  178. +0 −7 spec/truffle/tags/library/zlib/inflate/append_tags.txt
  179. +0 −5 spec/truffle/tags/library/zlib/inflate/inflate_tags.txt
  180. +0 −1 spec/truffle/tags/library/zlib/inflate/set_dictionary_tags.txt
  181. +0 −1 spec/truffle/tags/library/zlib/zstream/adler_tags.txt
  182. +0 −1 spec/truffle/tags/library/zlib/zstream/avail_in_tags.txt
  183. +0 −1 spec/truffle/tags/library/zlib/zstream/avail_out_tags.txt
  184. +0 −1 spec/truffle/tags/library/zlib/zstream/data_type_tags.txt
  185. +0 −1 spec/truffle/tags/library/zlib/zstream/flush_next_out_tags.txt
  186. +0 −3 spec/truffle/tags/truffle/array/max_tags.txt
  187. +0 −3 spec/truffle/tags/truffle/array/min_tags.txt
  188. +0 −3 spec/truffle/tags/truffle/attachments/attach_tags.txt
  189. +0 −2 spec/truffle/tags/truffle/binding_of_caller_tags.txt
  190. +0 −1 spec/truffle/tags/truffle/cext/load_extconf_tags.txt
  191. +0 −1 spec/truffle/tags/truffle/primitive/coverage_result_tags.txt
  192. +0 −1 spec/truffle/tags/truffle/primitive/coverage_start_tags.txt
  193. +0 −2 spec/truffle/tags/truffle/source_of_caller_tags.txt
  194. +1 −1 spec/truffle/truffle.mspec
  195. +8 −0 test/jruby/test_big_decimal.rb
  196. +77 −0 test/jruby/test_enumerator.rb
  197. +1 −0 test/mri/excludes/TestEnumerable.rb
  198. +0 −1 test/mri/excludes/TestEnumerator.rb
  199. +4 −1 test/mri/excludes/TestIO.rb
  200. +1 −0 test/mri/excludes/TestKeywordArguments.rb
  201. +3 −0 test/mri/excludes/TestMethod.rb
  202. +11 −9 test/mri/excludes/TestProcess.rb
  203. +1 −0 test/mri/excludes/TestRange.rb
  204. +2 −1 test/mri/excludes/TestSymbol.rb
  205. +6 −7 test/mri/excludes/TestSyntax.rb
  206. +3 −0 test/mri/excludes/TestTimeExtension.rb
  207. +1 −0 test/mri/excludes/TestTimeout.rb
  208. +1 −0 test/mri/excludes_truffle/TestFloat.rb
  209. +2 −0 test/mri/excludes_truffle/TestMethod.rb
  210. +7 −0 test/mri/excludes_truffle/TestRakeApplication.rb
  211. +3 −0 test/mri/excludes_truffle/TestRakeBacktrace.rb
  212. +1 −0 test/mri/excludes_truffle/TestRakeDirectoryTask.rb
  213. +4 −0 test/mri/excludes_truffle/TestRakeFileList.rb
  214. +1 −0 test/mri/excludes_truffle/TestRakeNameSpace.rb
  215. +2 −0 test/mri/excludes_truffle/TestRakeRules.rb
  216. +2 −0 test/mri/excludes_truffle/TestRakeTask.rb
  217. +2 −0 test/mri/excludes_truffle/TestRakeTaskArgumentParsing.rb
  218. +1 −0 test/mri/excludes_truffle/TestRakeTaskArguments.rb
  219. +2 −0 test/mri/excludes_truffle/TestRakeTaskManager.rb
  220. +1 −0 test/mri/excludes_truffle/TestRakeTestTask.rb
  221. +1 −0 test/mri/excludes_truffle/TestRange.rb
  222. +2 −0 test/mri/excludes_truffle/TestSymbol.rb
  223. +6 −0 test/mri/excludes_truffle/TestSyntax.rb
  224. +9 −0 test/mri/excludes_truffle/TestTimeExtension.rb
  225. +43 −6 test/mri/ruby/envutil.rb
  226. +43 −8 test/mri/ruby/test_array.rb
  227. +20 −3 test/mri/ruby/test_enum.rb
  228. +8 −0 test/mri/ruby/test_float.rb
  229. +97 −74 test/mri/ruby/test_io.rb
  230. +50 −3 test/mri/ruby/test_keyword.rb
  231. +36 −1 test/mri/ruby/test_method.rb
  232. +151 −112 test/mri/ruby/test_process.rb
  233. +8 −2 test/mri/ruby/test_range.rb
  234. +56 −0 test/mri/ruby/test_symbol.rb
  235. +115 −6 test/mri/ruby/test_syntax.rb
  236. +99 −76 test/mri/test_time.rb
  237. +20 −3 test/mri/test_timeout.rb
  238. +41 −41 test/mri_truffle.index
  239. +10 −4 test/truffle/integration-tests.sh
  240. +12 −5 test/truffle/pe/pe.rb
  241. +9 −0 tool/jruby_eclipse
  242. +16 −16 tool/jt.rb
  243. +10 −0 tool/truffle-findbugs-exclude.xml
  244. +8 −1 truffle/pom.rb
  245. +18 −0 truffle/pom.xml
  246. +74 −0 truffle/src/main/antlr4/org/jruby/truffle/format/parser/Pack.g4
  247. +4 −0 truffle/src/main/java/org/jruby/truffle/format/nodes/format/FormatIntegerNode.java
  248. +1 −1 truffle/src/main/java/org/jruby/truffle/format/nodes/write/PNode.java
  249. +2 −0 truffle/src/main/java/org/jruby/truffle/format/nodes/write/WriteBinaryStringNode.java
  250. +35 −38 truffle/src/main/java/org/jruby/truffle/format/nodes/write/WriteBitStringNode.java
  251. +17 −25 truffle/src/main/java/org/jruby/truffle/format/nodes/write/WriteHexStringNode.java
  252. +5 −1 truffle/src/main/java/org/jruby/truffle/format/parser/FormatParser.java
  253. +1 −1 truffle/src/main/java/org/jruby/truffle/format/parser/FormatTokenizer.java
  254. +154 −0 truffle/src/main/java/org/jruby/truffle/format/parser/PackCompiler.java
  255. +34 −0 truffle/src/main/java/org/jruby/truffle/format/parser/PackErrorListener.java
  256. +0 −576 truffle/src/main/java/org/jruby/truffle/format/parser/PackParser.java
  257. +0 −128 truffle/src/main/java/org/jruby/truffle/format/parser/PackTokenizer.java
  258. +489 −0 truffle/src/main/java/org/jruby/truffle/format/parser/PackTreeBuilder.java
  259. +0 −15 truffle/src/main/java/org/jruby/truffle/format/runtime/Endianness.java
  260. +4 −4 truffle/src/main/java/org/jruby/truffle/nodes/core/EncodingNodes.java
  261. +16 −27 truffle/src/main/java/org/jruby/truffle/nodes/core/FixnumOrBignumNode.java
  262. +39 −13 truffle/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
  263. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/ModuleNodes.java
  264. +1 −10 truffle/src/main/java/org/jruby/truffle/nodes/core/ObjectSpaceNodes.java
  265. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/ThreadNodes.java
  266. +26 −17 truffle/src/main/java/org/jruby/truffle/nodes/core/TrufflePrimitiveNodes.java
  267. +3 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/array/ArrayGuards.java
  268. +42 −17 truffle/src/main/java/org/jruby/truffle/nodes/core/array/ArrayNodes.java
  269. +38 −29 truffle/src/main/java/org/jruby/truffle/nodes/core/fixnum/FixnumNodes.java
  270. +3 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/hash/HashGuards.java
  271. +12 −4 truffle/src/main/java/org/jruby/truffle/nodes/core/hash/HashNodes.java
  272. +0 −203 truffle/src/main/java/org/jruby/truffle/nodes/ext/ZlibNodes.java
  273. +2 −8 truffle/src/main/java/org/jruby/truffle/nodes/globals/ReadLastBacktraceNode.java
  274. +2 −6 truffle/src/main/java/org/jruby/truffle/nodes/globals/UpdateLastBacktraceNode.java
  275. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/interop/InteropNode.java
  276. +1 −6 truffle/src/main/java/org/jruby/truffle/nodes/objects/IsFrozenNode.java
  277. +1 −6 truffle/src/main/java/org/jruby/truffle/nodes/objects/IsTaintedNode.java
  278. +8 −56 truffle/src/main/java/org/jruby/truffle/nodes/objects/ReadInstanceVariableNode.java
  279. +0 −62 truffle/src/main/java/org/jruby/truffle/nodes/objects/WriteInstanceVariableNode.java
  280. +2 −87 truffle/src/main/java/org/jruby/truffle/nodes/objectstorage/ReadHeadObjectFieldNode.java
  281. +2 −12 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/IOPrimitiveNodes.java
  282. +1 −7 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/ObjectPrimitiveNodes.java
  283. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/RegexpPrimitiveNodes.java
  284. +8 −5 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/TimePrimitiveNodes.java
  285. +3 −0 truffle/src/main/java/org/jruby/truffle/nodes/supercall/LookupSuperMethodNode.java
  286. +6 −5 truffle/src/main/java/org/jruby/truffle/runtime/core/CoreLibrary.java
  287. +0 −1 truffle/src/main/java/org/jruby/truffle/runtime/core/StringOperations.java
  288. +1 −1 truffle/src/main/java/org/jruby/truffle/runtime/layouts/ThreadLayout.java
  289. +1 −1 truffle/src/main/java/org/jruby/truffle/runtime/loader/FeatureLoader.java
  290. +2 −16 truffle/src/main/java/org/jruby/truffle/runtime/subsystems/AttachmentsManager.java
  291. +5 −2 truffle/src/main/java/org/jruby/truffle/runtime/subsystems/SafepointManager.java
  292. +2 −2 truffle/src/main/java/org/jruby/truffle/runtime/subsystems/ThreadManager.java
  293. +58 −67 truffle/src/main/java/org/jruby/truffle/translator/BodyTranslator.java
  294. +4 −4 truffle/src/main/java/org/jruby/truffle/translator/LoadArgumentsTranslator.java
  295. +4 −3 truffle/src/main/java/org/jruby/truffle/translator/MethodTranslator.java
  296. +7 −0 truffle/src/main/ruby/core/shims.rb
  297. +2 −2 truffle/src/main/ruby/core/thread.rb
  298. +17 −13 truffle/src/main/ruby/core/truffle/attachments.rb
4 changes: 4 additions & 0 deletions COPYING
Original file line number Diff line number Diff line change
@@ -78,6 +78,10 @@ below. Also see LICENSE.RUBY for most files found in lib/ruby/stdlib.
Some parts of the RubySL implementations of the stdlib in lib/ruby/truffle/rubysl
are copyright (c) 2013 Brian Shirai and are licensed under the 3-clause BSD license.

pr-zlib is copyright Park Heesob and Daniel Berger. "This library is covered
under the same license as zlib itself. For the text of the zlib license,
please see http://zlib.net/zlib_license.html."

The complete text of the Eclipse Public License is as follows:

Eclipse Public License - v 1.0
6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ DO NOT MODIFIY - GENERATED CODE
<artifactId>jruby-core</artifactId>
<name>JRuby Core</name>
<properties>
<version.ruby>2.2.2</version.ruby>
<version.ruby>2.2.3</version.ruby>
<prawn.dir>${test.dir}/prawn</prawn.dir>
<spec.tags.dir>${spec.dir}/tags</spec.tags.dir>
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
@@ -28,7 +28,7 @@ DO NOT MODIFIY - GENERATED CODE
<jruby.test.memory.permgen>2G</jruby.test.memory.permgen>
<installer.gems>${jruby.win32ole.gem}</installer.gems>
<prawn.git.repo>git://github.com/sandal/prawn.git</prawn.git.repo>
<version.ruby.minor>2</version.ruby.minor>
<version.ruby.minor>3</version.ruby.minor>
<tzdata.version>2013d</tzdata.version>
<install4j.executable>/Applications/install4j 4/bin/install4jc</install4j.executable>
<jay.bin>jay</jay.bin>
@@ -48,7 +48,7 @@ DO NOT MODIFIY - GENERATED CODE
<parser.dir>core/src/main/java/org/jruby/parser</parser.dir>
<jruby.basedir>${basedir}/..</jruby.basedir>
<rubyspec.dir>${spec.dir}/ruby</rubyspec.dir>
<version.ruby.revision>50293</version.ruby.revision>
<version.ruby.revision>51636</version.ruby.revision>
<jruby.test.memory>3G</jruby.test.memory>
<mspec.dir>${spec.dir}/mspec</mspec.dir>
<build.date>${maven.build.timestamp}</build.date>
63 changes: 49 additions & 14 deletions core/src/main/java/org/jruby/Main.java
Original file line number Diff line number Diff line change
@@ -38,6 +38,7 @@
package org.jruby;

import org.jruby.exceptions.MainExitException;
import org.jruby.exceptions.JumpException;
import org.jruby.exceptions.RaiseException;
import org.jruby.exceptions.ThreadKill;
import org.jruby.main.DripMain;
@@ -205,9 +206,14 @@ public static void main(String[] args) {
if (status.isExit()) {
System.exit(status.getStatus());
}
} catch (RaiseException rj) {
System.exit(handleRaiseException(rj));
} catch (Throwable t) {
}
catch (RaiseException ex) {
System.exit( handleRaiseException(ex) );
}
catch (JumpException ex) {
System.exit( handleUnexpectedJump(ex) );
}
catch (Throwable t) {
// If a Truffle exception gets this far it's a hard failure - don't try and dress it up as a Ruby exception

if (main.config.getCompileMode() == RubyInstanceConfig.CompileMode.TRUFFLE) {
@@ -516,25 +522,54 @@ private void doCheckSecurityManager() {
* run should be System.err. In order to avoid the Ruby err being closed and unable
* to write, we use System.err unconditionally.
*
* @param rj
* @param ex
* @return
*/
protected static int handleRaiseException(RaiseException rj) {
RubyException raisedException = rj.getException();
Ruby runtime = raisedException.getRuntime();
if (runtime.getSystemExit().isInstance(raisedException)) {
protected static int handleRaiseException(final RaiseException ex) {
RubyException raisedException = ex.getException();
final Ruby runtime = raisedException.getRuntime();
if ( runtime.getSystemExit().isInstance(raisedException) ) {
IRubyObject status = raisedException.callMethod(runtime.getCurrentContext(), "status");
if (status != null && !status.isNil()) {
if (status != null && ! status.isNil()) {
return RubyNumeric.fix2int(status);
} else {
return 0;
}
} else {
System.err.print(runtime.getInstanceConfig().getTraceType().printBacktrace(raisedException, runtime.getPosix().isatty(FileDescriptor.err)));
return 1;
return 0;
}
System.err.print(runtime.getInstanceConfig().getTraceType().printBacktrace(raisedException, runtime.getPosix().isatty(FileDescriptor.err)));
return 1;
}

private static int handleUnexpectedJump(final JumpException ex) {
if ( ex instanceof JumpException.SpecialJump ) { // ex == JumpException.SPECIAL_JUMP
System.err.println("Unexpected break: " + ex);
}
else if ( ex instanceof JumpException.FlowControlException ) {
// NOTE: assuming a single global runtime main(args) should have :
if ( Ruby.isGlobalRuntimeReady() ) {
final Ruby runtime = Ruby.getGlobalRuntime();
RaiseException raise = ((JumpException.FlowControlException) ex).buildException(runtime);
if ( raise != null ) handleRaiseException(raise);
}
else {
System.err.println("Unexpected jump: " + ex);
}
}
else {
System.err.println("Unexpected: " + ex);
}

final StackTraceElement[] trace = ex.getStackTrace();
if ( trace != null && trace.length > 0 ) {
System.err.println( ThreadContext.createRawBacktraceStringFromThrowable(ex, false) );
}
else {
System.err.println("HINT: to get backtrace for jump exceptions run with -Xjump.backtrace=true");
}

// TODO: should match MRI (>= 2.2.3) exit status - @see ruby/test_enum.rb#test_first
return 2;
}

public static void printTruffleTimeMetric(String id) {
if (Options.TRUFFLE_METRICS_TIME.load()) {
final long millis = System.currentTimeMillis();
26 changes: 20 additions & 6 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -1612,7 +1612,9 @@ private void initExceptions() {
typeError = defineClassIfAllowed("TypeError", standardError);
argumentError = defineClassIfAllowed("ArgumentError", standardError);
indexError = defineClassIfAllowed("IndexError", standardError);
stopIteration = defineClassIfAllowed("StopIteration", indexError);
if (profile.allowClass("StopIteration")) {
stopIteration = RubyStopIteration.createStopIterationClass(this, indexError);
}
syntaxError = defineClassIfAllowed("SyntaxError", scriptError);
loadError = defineClassIfAllowed("LoadError", scriptError);
notImplementedError = defineClassIfAllowed("NotImplementedError", scriptError);
@@ -4073,7 +4075,7 @@ private RaiseException newLightweightErrnoException(RubyClass exceptionClass, St
if (RubyInstanceConfig.ERRNO_BACKTRACE) {
return new RaiseException(this, exceptionClass, message, true);
} else {
return new RaiseException(this, exceptionClass, ERRNO_BACKTRACE_MESSAGE, RubyArray.newEmptyArray(this), true);
return new RaiseException(this, exceptionClass, ERRNO_BACKTRACE_MESSAGE, disabledBacktrace(), true);
}
}

@@ -4088,12 +4090,24 @@ private RaiseException newLightweightErrnoException(RubyClass exceptionClass, St
*
* @param message the message for the exception
*/
public RaiseException newLightweightStopIterationError(String message) {
public RaiseException newStopIteration(IRubyObject result, String message) {
final ThreadContext context = getCurrentContext();
if (RubyInstanceConfig.STOPITERATION_BACKTRACE) {
return new RaiseException(this, stopIteration, message, true);
} else {
return new RaiseException(this, stopIteration, STOPIERATION_BACKTRACE_MESSAGE, RubyArray.newEmptyArray(this), true);
RubyException ex = RubyStopIteration.newInstance(context, result, message);
return new RaiseException(ex);
}
if ( message == null ) message = STOPIERATION_BACKTRACE_MESSAGE;
RubyException ex = RubyStopIteration.newInstance(context, result, message);
return new RaiseException(ex, disabledBacktrace());
}

@Deprecated
public RaiseException newLightweightStopIterationError(String message) {
return newStopIteration(null, message);
}

private IRubyObject disabledBacktrace() {
return RubyArray.newEmptyArray(this);
}

// Equivalent of Data_Wrap_Struct
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyArray.java
Original file line number Diff line number Diff line change
@@ -2321,7 +2321,7 @@ public RubyArray collectBang(ThreadContext context, Block block) {
*/
@JRubyMethod(name = "collect!")
public IRubyObject collect_bang(ThreadContext context, Block block) {
return block.isGiven() ? collectBang(context, block) : enumeratorize(context.runtime, this, "collect!");
return block.isGiven() ? collectBang(context, block) : enumeratorizeWithSize(context, this, "collect!", enumLengthFn());
}

/** rb_ary_collect_bang
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/RubyClass.java
Original file line number Diff line number Diff line change
@@ -1138,6 +1138,9 @@ public static void checkInheritable(IRubyObject superClass) {
if (((RubyClass)superClass).isSingleton()) {
throw superClass.getRuntime().newTypeError("can't make subclass of virtual class");
}
if (superClass == superClass.getRuntime().getClassClass()) {
throw superClass.getRuntime().newTypeError("can't make subclass of Class");
}
}

public final ObjectMarshal getMarshal() {
2 changes: 2 additions & 0 deletions core/src/main/java/org/jruby/RubyEnumerable.java
Original file line number Diff line number Diff line change
@@ -1201,6 +1201,7 @@ public static IRubyObject max_by(ThreadContext context, IRubyObject self, final

@JRubyMethod
public static IRubyObject max_by(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block) {
if (arg == context.nil) return singleExtentBy(context, self, "max", SORT_MAX, block);
// TODO: Replace with an implementation (quickselect, etc) which requires O(k) memory rather than O(n) memory
RubyArray sorted = (RubyArray)sort_by(context, self, block);
return ((RubyArray) sorted.last(arg)).reverse();
@@ -1213,6 +1214,7 @@ public static IRubyObject min_by(ThreadContext context, IRubyObject self, final

@JRubyMethod
public static IRubyObject min_by(ThreadContext context, IRubyObject self, IRubyObject arg, final Block block) {
if (arg == context.nil) return singleExtentBy(context, self, "min", SORT_MIN, block);
// TODO: Replace with an implementation (quickselect, etc) which requires O(k) memory rather than O(n) memory
RubyArray sorted = (RubyArray)sort_by(context, self, block);
return sorted.first(arg);
Loading