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

Commits on Jan 2, 2017

  1. Happy New Year! 🎉

    BanzaiMan committed Jan 2, 2017
    Copy the full SHA
    997074f View commit details

Commits on Jan 3, 2017

  1. Copy the full SHA
    0bfe15c View commit details
  2. Revert "Fix deadlock when tearing down runtime during debugging"

    This reverts commit f9d704c.
    
    New issue #4419 opened to address this revert.
    enebo committed Jan 3, 2017
    Copy the full SHA
    57ba4fd View commit details
  3. Copy the full SHA
    b36a1c1 View commit details
  4. Copy the full SHA
    5db8ace View commit details

Commits on Jan 4, 2017

  1. Copy the full SHA
    01c0714 View commit details
  2. Copy the full SHA
    4852008 View commit details
  3. allocate small(-er) Set for recursive comparison tracking

    ... tends to be used a lot and cases with multiple elements are rare
    tested this with a typical (real-world) Rails 4.2 app serving requests
    kares committed Jan 4, 2017
    Copy the full SHA
    757c889 View commit details
  4. Copy the full SHA
    48c68c3 View commit details
  5. Merge pull request #4421 from headius/stringio_threadsafe

    Make StringIO thread-safe by synchronizing against ptr.
    headius authored Jan 4, 2017
    Copy the full SHA
    f9caf6c View commit details
  6. [#4414] Fixes #4414. getVpValueWithPrec19 should raise FloatDomainErr…

    …or to be consistent with mri.
    Sumit M committed Jan 4, 2017
    Copy the full SHA
    22ef041 View commit details

Commits on Jan 5, 2017

  1. Merge pull request #4420 from sumitmah/fix-float-NAN-conversion-to-bi…

    …gdecimal
    
    [#4414] Fixes #4414. getVpValueWithPrec19 should raise FloatDomainErr…
    enebo authored Jan 5, 2017
    Copy the full SHA
    15d48bc View commit details
  2. Copy the full SHA
    ceb1595 View commit details
  3. Copy the full SHA
    7347ee0 View commit details
  4. Copy the full SHA
    76cb38a View commit details

Commits on Jan 6, 2017

  1. Copy the full SHA
    b003233 View commit details
  2. Copy the full SHA
    6d09390 View commit details
  3. Copy the full SHA
    0d76656 View commit details
  4. Revert "[Truffle] Simplify POSIX#getgroups."

    This reverts commit 1717c08.
    nirvdrum committed Jan 6, 2017
    Copy the full SHA
    0da8d64 View commit details
  5. [Truffle] Switched back to using jnr-posix's version of getgroups.

    The upstream bug producing bad results is fixed and using UnixSystem doesn't work with AOT.
    nirvdrum committed Jan 6, 2017
    Copy the full SHA
    1d88edf View commit details
  6. Copy the full SHA
    c91141a View commit details
  7. Copy the full SHA
    31b9253 View commit details
  8. 1
    Copy the full SHA
    bea5212 View commit details
  9. Copy the full SHA
    db207c1 View commit details
  10. Copy the full SHA
    5c1dcc2 View commit details
  11. Copy the full SHA
    1812176 View commit details
  12. Copy the full SHA
    6ca6030 View commit details
  13. Copy the full SHA
    7442e5a View commit details
  14. Copy the full SHA
    360f62c View commit details

Commits on Jan 7, 2017

  1. Don't allow null method names

    Solves #4426
    retoo committed Jan 7, 2017
    Copy the full SHA
    567c11c View commit details
  2. 2
    Copy the full SHA
    9ee7b59 View commit details
  3. Copy the full SHA
    f419aa7 View commit details
  4. Copy the full SHA
    53c4993 View commit details
  5. Merge pull request #4427 from retoo/fix-super-npe

    Don't allow null method names
    kares authored Jan 7, 2017
    Copy the full SHA
    e521bf3 View commit details

Commits on Jan 8, 2017

  1. Copy the full SHA
    1edd9bc View commit details
  2. Copy the full SHA
    b9fe9f0 View commit details

Commits on Jan 9, 2017

  1. Copy the full SHA
    b8e306f View commit details
  2. Copy the full SHA
    63744ff View commit details
  3. Copy the full SHA
    fdb3896 View commit details
  4. reproduce and resolve generated 'tableswitch' byte-code problem

    ... [2, 4] was considered consecutive generating corrupt jump code!
    
    fixes #4429
    kares committed Jan 9, 2017
    Copy the full SHA
    fa9060d View commit details
  5. Copy the full SHA
    973ab20 View commit details
  6. Copy the full SHA
    e9d732b View commit details
  7. 2
    Copy the full SHA
    4a0c616 View commit details
  8. Copy the full SHA
    6b92884 View commit details
  9. Copy the full SHA
    81bdd91 View commit details
  10. Copy the full SHA
    8d9818a View commit details
  11. When precompiling loaded files, set top-level module. Fixes #4416.

    The logic that precompiles a 'load'ed or 'require'd file did not
    ever call setModule or determineModule on the root scope for that
    script body. This caused module definitions to blow up, since they
    had no containing scope in which to define the new module.
    headius committed Jan 9, 2017
    Copy the full SHA
    8a8fa01 View commit details
  12. Copy the full SHA
    101887c View commit details
  13. Merge pull request #4431 from headius/set-toplevel-module

    Set toplevel module
    headius authored Jan 9, 2017
    Copy the full SHA
    2d090fb View commit details
  14. Fixes #4425. Code behavior changes after being JITted at runtime

    Revert "Address FIXMEs in LocalOptimizationPass"
    
    This reverts commit d41fac5.
    
    lvars were getting constant propagated via valueMap...
    enebo committed Jan 9, 2017
    Copy the full SHA
    e136ac1 View commit details
Showing with 1,678 additions and 1,363 deletions.
  1. +1 −1 COPYING
  2. +1 −1 VERSION
  3. +3 −49 ci.hocon
  4. +1 −1 core/pom.rb
  5. +2 −2 core/pom.xml
  6. +25 −19 core/src/main/java/org/jruby/Ruby.java
  7. +23 −22 core/src/main/java/org/jruby/RubyArray.java
  8. +27 −19 core/src/main/java/org/jruby/compiler/impl/SkinnyMethodAdapter.java
  9. +1 −1 core/src/main/java/org/jruby/compiler/util/HandleFactory.java
  10. +7 −2 core/src/main/java/org/jruby/ext/JRubyPOSIXHandler.java
  11. +9 −1 core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
  12. +343 −268 core/src/main/java/org/jruby/ext/stringio/StringIO.java
  13. +3 −3 core/src/main/java/org/jruby/ext/tempfile/Tempfile.java
  14. +9 −4 core/src/main/java/org/jruby/ir/instructions/BSwitchInstr.java
  15. +2 −2 core/src/main/java/org/jruby/ir/operands/Label.java
  16. +29 −17 core/src/main/java/org/jruby/ir/passes/LocalOptimizationPass.java
  17. +6 −5 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
  18. +1 −1 core/src/main/java/org/jruby/java/dispatch/CallableSelector.java
  19. +3 −7 core/src/main/java/org/jruby/javasupport/JavaSupportImpl.java
  20. +9 −5 core/src/main/java/org/jruby/javasupport/binding/AssignedName.java
  21. +3 −2 core/src/main/java/org/jruby/javasupport/binding/ClassInitializer.java
  22. +28 −26 core/src/main/java/org/jruby/javasupport/binding/Initializer.java
  23. +1 −1 core/src/main/java/org/jruby/javasupport/binding/InstanceMethodInvokerInstaller.java
  24. +9 −5 core/src/main/java/org/jruby/javasupport/binding/MethodInstaller.java
  25. +3 −2 core/src/main/java/org/jruby/runtime/Helpers.java
  26. +15 −1 core/src/main/java/org/jruby/runtime/Signature.java
  27. +1 −1 core/src/main/java/org/jruby/util/JRubyFile.java
  28. +16 −19 core/src/main/java/org/jruby/util/RecursiveComparator.java
  29. +0 −1 core/src/main/resources/META-INF/services/java.nio.file.spi.FileTypeDetector
  30. +13 −27 core/src/main/ruby/jruby/kernel/enumerable.rb
  31. +1 −0 core/src/test/java/org/jruby/test/MainTestSuite.java
  32. +39 −0 core/src/test/java/org/jruby/test/TestRubyBigDecimal.java
  33. +16 −0 core/src/test/java/org/jruby/test/TestSignature.java
  34. +2 −2 lib/pom.xml
  35. +4 −11 lib/ruby/stdlib/tempfile.rb
  36. +1 −0 lib/ruby/truffle/jruby-truffle-tool/lib/truffle/railties_exclusions.yaml
  37. +1 −0 maven/jruby-jars/.gitignore
  38. +4 −4 mx.jruby/suite.py
  39. +1 −1 pom.rb
  40. +5 −2 pom.xml
  41. +16 −1 spec/java_integration/paths/uri_classloader_spec.rb
  42. +6 −0 spec/ruby/core/enumerable/chunk_while_spec.rb
  43. +1 −1 spec/ruby/core/string/scrub_spec.rb
  44. +0 −20 spec/truffle/tags/core/proc/curry_tags.txt
  45. +0 −2 spec/truffle/tags/core/string/encode_tags.txt
  46. +2 −0 spec/truffle/tags/library/coverage/peek_result_tags.txt
  47. +1 −0 spec/truffle/tags/library/coverage/result_tags.txt
  48. +56 −1 test/jruby/test_case.rb
  49. +0 −6 test/mri/excludes_truffle/TestM17N.rb
  50. +1 −4 test/truffle/integration/coverage/test.rb
  51. +1 −1 tool/jt.rb
  52. +3 −0 tool/truffle/options.yml
  53. +7 −2 truffle/pom.rb
  54. +9 −3 truffle/pom.xml
  55. +1 −0 truffle/src/main/java/META-INF/services/java.nio.file.spi.FileTypeDetector
  56. +64 −26 truffle/src/main/java/org/jruby/truffle/Main.java
  57. +4 −12 truffle/src/main/java/org/jruby/truffle/RubyContext.java
  58. +14 −7 ...src/main/java/org/jruby/util → truffle/src/main/java/org/jruby/truffle}/RubyFileTypeDetector.java
  59. +32 −4 truffle/src/main/java/org/jruby/truffle/RubyLanguage.java
  60. +3 −3 truffle/src/main/java/org/jruby/truffle/builtins/AmbiguousOptionalArgumentChecker.java
  61. +6 −5 truffle/src/main/java/org/jruby/truffle/builtins/CoreMethodNodeManager.java
  62. +2 −1 truffle/src/main/java/org/jruby/truffle/builtins/LowerFixnumChecker.java
  63. +4 −1 truffle/src/main/java/org/jruby/truffle/builtins/PrimitiveNodeConstructor.java
  64. +2 −1 truffle/src/main/java/org/jruby/truffle/cext/CExtNodes.java
  65. +17 −8 truffle/src/main/java/org/jruby/truffle/core/CoreLibrary.java
  66. +1 −1 truffle/src/main/java/org/jruby/truffle/core/array/ArrayNodes.java
  67. +1 −1 truffle/src/main/java/org/jruby/truffle/core/encoding/EncodingConverterNodes.java
  68. +2 −2 truffle/src/main/java/org/jruby/truffle/core/exception/CoreExceptions.java
  69. +10 −4 truffle/src/main/java/org/jruby/truffle/core/kernel/KernelNodes.java
  70. +18 −3 truffle/src/main/java/org/jruby/truffle/core/kernel/TraceManager.java
  71. +13 −11 truffle/src/main/java/org/jruby/truffle/core/klass/ClassNodes.java
  72. +14 −4 truffle/src/main/java/org/jruby/truffle/core/module/ModuleFields.java
  73. +3 −3 truffle/src/main/java/org/jruby/truffle/core/module/ModuleNodes.java
  74. +5 −6 truffle/src/main/java/org/jruby/truffle/core/regexp/RegexpNodes.java
  75. +10 −6 truffle/src/main/java/org/jruby/truffle/core/rope/RopeNodes.java
  76. +1 −1 truffle/src/main/java/org/jruby/truffle/core/rope/RopeOperations.java
  77. +1 −1 truffle/src/main/java/org/jruby/truffle/core/rope/TruffleRopesNodes.java
  78. +0 −11 truffle/src/main/java/org/jruby/truffle/core/rubinius/IOPrimitiveNodes.java
  79. +11 −1 truffle/src/main/java/org/jruby/truffle/core/rubinius/RandomizerPrimitiveNodes.java
  80. +181 −66 truffle/src/main/java/org/jruby/truffle/core/string/StringNodes.java
  81. +1 −1 truffle/src/main/java/org/jruby/truffle/core/string/TruffleStringNodes.java
  82. +4 −3 truffle/src/main/java/org/jruby/truffle/core/thread/ThreadManager.java
  83. +5 −1 truffle/src/main/java/org/jruby/truffle/core/tracepoint/TracePointNodes.java
  84. +19 −8 truffle/src/main/java/org/jruby/truffle/debug/TruffleDebugNodes.java
  85. +4 −13 truffle/src/main/java/org/jruby/truffle/extra/TrufflePosixNodes.java
  86. +44 −2 truffle/src/main/java/org/jruby/truffle/language/LazyRubyNode.java
  87. +5 −1 truffle/src/main/java/org/jruby/truffle/language/RubyBaseNode.java
  88. +9 −0 truffle/src/main/java/org/jruby/truffle/language/RubyNode.java
  89. +9 −3 truffle/src/main/java/org/jruby/truffle/language/TruffleSafeNodes.java
  90. +1 −1 truffle/src/main/java/org/jruby/truffle/language/backtrace/BacktraceFormatter.java
  91. +2 −1 truffle/src/main/java/org/jruby/truffle/language/exceptions/TopLevelRaiseHandler.java
  92. +61 −8 truffle/src/main/java/org/jruby/truffle/language/loader/FeatureLoader.java
  93. +2 −1 truffle/src/main/java/org/jruby/truffle/language/objects/DefineClassNode.java
  94. +3 −1 truffle/src/main/java/org/jruby/truffle/language/objects/DefineModuleNode.java
  95. +2 −2 truffle/src/main/java/org/jruby/truffle/language/objects/ObjectIDOperations.java
  96. +1 −1 truffle/src/main/java/org/jruby/truffle/language/objects/ObjectIVarGetNode.java
  97. +2 −2 truffle/src/main/java/org/jruby/truffle/language/objects/ObjectIVarSetNode.java
  98. +18 −7 truffle/src/main/java/org/jruby/truffle/language/objects/ReadObjectFieldNode.java
  99. +1 −1 truffle/src/main/java/org/jruby/truffle/language/objects/SingletonClassNode.java
  100. +1 −1 truffle/src/main/java/org/jruby/truffle/language/objects/WriteObjectFieldNode.java
  101. +3 −2 truffle/src/main/java/org/jruby/truffle/language/objects/shared/SharedObjects.java
  102. +12 −67 truffle/src/main/java/org/jruby/truffle/options/ArgumentProcessor.java
  103. +8 −0 truffle/src/main/java/org/jruby/truffle/options/Options.java
  104. +8 −0 truffle/src/main/java/org/jruby/truffle/options/OptionsCatalog.java
  105. +31 −155 truffle/src/main/java/org/jruby/truffle/options/RubyInstanceConfig.java
  106. +5 −6 truffle/src/main/java/org/jruby/truffle/parser/BodyTranslator.java
  107. +2 −2 truffle/src/main/java/org/jruby/truffle/parser/LoadArgumentsTranslator.java
  108. +7 −7 truffle/src/main/java/org/jruby/truffle/parser/MethodTranslator.java
  109. +64 −9 truffle/src/main/java/org/jruby/truffle/parser/ParserByteList.java
  110. +4 −3 truffle/src/main/java/org/jruby/truffle/parser/ReloadArgumentsTranslator.java
  111. +3 −1 truffle/src/main/java/org/jruby/truffle/parser/Translator.java
  112. +3 −1 truffle/src/main/java/org/jruby/truffle/parser/TranslatorDriver.java
  113. +0 −149 truffle/src/main/java/org/jruby/truffle/parser/lexer/RubyLexer.java
  114. +1 −1 truffle/src/main/java/org/jruby/truffle/platform/java/JavaPlatform.java
  115. +16 −6 truffle/src/main/java/org/jruby/truffle/platform/java/JavaTrufflePosix.java
  116. +14 −51 truffle/src/main/java/org/jruby/truffle/stdlib/CoverageManager.java
  117. +1 −9 truffle/src/main/java/org/jruby/truffle/stdlib/CoverageNodes.java
  118. +2 −2 truffle/src/main/java/org/jruby/truffle/tools/InstrumentationServerManager.java
  119. +1 −0 truffle/src/main/ruby/core/mirror.rb
  120. +2 −2 truffle/src/main/ruby/core/proc.rb
  121. +63 −0 truffle/src/main/ruby/core/proc_mirror.rb
  122. +3 −10 truffle/src/main/ruby/core/process.rb
  123. +1 −5 truffle/src/main/ruby/core/process_mirror.rb
  124. +36 −51 truffle/src/main/ruby/core/string.rb
  125. +2 −0 truffle/src/test/java/org/jruby/truffle/tck/RubyDebugTest.java
  126. +1 −0 truffle/src/test/java/org/jruby/truffle/tck/RubyTckTest.java
  127. +0 −1 truffle/src/test/ruby/factorial.rb
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
JRuby is Copyright (c) 2007-2016 The JRuby project, and is released
JRuby is Copyright (c) 2007-2017 The JRuby project, and is released
under a tri EPL/GPL/LGPL license. You can use it, redistribute it
and/or modify it under the terms of the:

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.1.7.0-SNAPSHOT
9.1.7.0
52 changes: 3 additions & 49 deletions ci.hocon
Original file line number Diff line number Diff line change
@@ -139,7 +139,7 @@ graal-vm-release: {
downloads: {
GRAALVM_DIR: {
name: graalvm-release,
version: "0.18",
version: "0.19",
platformspecific: true
}
}
@@ -177,38 +177,6 @@ mri-benchmark: {
}
}

jruby-noindy-metrics: {
environment: {
GUEST_VM: jruby,
GUEST_VM_CONFIG: noindy,
JRUBY_OPTS: "-Xclassic -Xcompile.invokedynamic=false"
}
}

jruby-noindy-benchmark: {
environment: {
GUEST_VM: jruby,
GUEST_VM_CONFIG: noindy,
JRUBY_OPTS: "-Xclassic -X+C -Xcompile.invokedynamic=false"
}
}

jruby-indy-metrics: {
environment: {
GUEST_VM: jruby,
GUEST_VM_CONFIG: indy,
JRUBY_OPTS: "-Xclassic -Xcompile.invokedynamic=true"
}
}

jruby-indy-benchmark: {
environment: {
GUEST_VM: jruby,
GUEST_VM_CONFIG: indy,
JRUBY_OPTS: "-Xclassic -X+C -Xcompile.invokedynamic=true"
}
}

jruby-truffle: {
environment: {
GUEST_VM: jruby,
@@ -269,7 +237,7 @@ bench: {
cmd: [mx, --dynamicimport, ruby-benchmarks, benchmark]
setup: [
${mx_sclone} ["https://github.com/jruby/benchmark-interface.git", ../benchmark-interface],
${mx_sclone} [--revision, mx-config, "https://github.com/jruby/all-ruby-benchmarks.git", ../ruby-benchmarks]
${mx_sclone} ["https://github.com/jruby/all-ruby-benchmarks.git", ../ruby-benchmarks]
]
}

@@ -374,7 +342,7 @@ server-benchmarks: {

cext-benchmarks: ${sulong} {
environment: {
JRUBY_OPTS: "-Xtruffle.cexts.log.load=true -J-Dgraal.TruffleCompileOnly=nothing",
JRUBY_OPTS: "-Xtruffle.cexts.log.load=true",
USE_CEXTS: "true"
}

@@ -467,8 +435,6 @@ builds: [

{name: ruby-test-specs-vm-release} ${common} ${graal-vm-release} ${daily-caps} ${test-compilation-flags} {run: [${jt} [test, specs, ":command_line", ":language", --graal]]},

//{name: ruby-metrics-noindy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-noindy-metrics} ${metrics},
//{name: ruby-metrics-indy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-indy-metrics} ${metrics},
{name: ruby-metrics-truffle} ${common} ${no-graal} ${bench-caps} ${jruby-truffle} ${metrics},
{name: ruby-metrics-compiler-graal-core} ${common} ${graal-core} ${daily-bench-caps} ${jruby-truffle} ${compiler-metrics},
{name: ruby-metrics-compiler-graal-enterprise} ${common} ${graal-enterprise} ${daily-bench-caps} ${jruby-truffle} ${compiler-metrics},
@@ -477,8 +443,6 @@ builds: [
{name: ruby-metrics-compiler-graal-vm-release} ${common} ${graal-vm-release} ${bench-caps} ${jruby-truffle} ${compiler-metrics},

{name: ruby-benchmarks-classic-mri} ${common} ${weekly-bench-caps} ${mri-benchmark} ${classic-benchmarks},
//{name: ruby-benchmarks-classic-noindy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-noindy-benchmark} ${classic-benchmarks},
//{name: ruby-benchmarks-classic-indy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-indy-benchmark} ${classic-benchmarks},
{name: ruby-benchmarks-classic-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${classic-benchmarks},
{name: ruby-benchmarks-classic-graal-core} ${common} ${graal-core} ${daily-bench-caps} ${jruby-truffle} ${classic-benchmarks},
{name: ruby-benchmarks-classic-graal-core-solaris} ${common} ${graal-core} ${daily-bench-caps-solaris} ${jruby-truffle} ${classic-benchmarks-solaris},
@@ -489,8 +453,6 @@ builds: [
{name: ruby-benchmarks-classic-graal-vm-release} ${common} ${graal-vm-release} ${bench-caps} ${jruby-truffle} ${classic-benchmarks},

{name: ruby-benchmarks-chunky-mri} ${common} ${weekly-bench-caps} ${mri-benchmark} ${chunky-benchmarks},
//{name: ruby-benchmarks-chunky-noindy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-noindy-benchmark} ${chunky-benchmarks},
//{name: ruby-benchmarks-chunky-indy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-indy-benchmark} ${chunky-benchmarks},
{name: ruby-benchmarks-chunky-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${chunky-benchmarks},
{name: ruby-benchmarks-chunky-graal-core} ${common} ${graal-core} ${daily-bench-caps} ${jruby-truffle} ${chunky-benchmarks},
{name: ruby-benchmarks-chunky-graal-enterprise} ${common} ${graal-enterprise} ${daily-bench-caps} ${jruby-truffle} ${chunky-benchmarks},
@@ -499,8 +461,6 @@ builds: [
{name: ruby-benchmarks-chunky-graal-vm-release} ${common} ${graal-vm-release} ${bench-caps} ${jruby-truffle} ${chunky-benchmarks},

{name: ruby-benchmarks-psd-mri} ${common} ${weekly-bench-caps} ${mri-benchmark} ${psd-benchmarks},
//{name: ruby-benchmarks-psd-noindy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-noindy-benchmark} ${psd-benchmarks},
//{name: ruby-benchmarks-psd-indy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-indy-benchmark} ${psd-benchmarks},
{name: ruby-benchmarks-psd-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${psd-benchmarks},
{name: ruby-benchmarks-psd-graal-core} ${common} ${graal-core} ${daily-bench-caps} ${jruby-truffle} ${psd-benchmarks},
{name: ruby-benchmarks-psd-graal-enterprise} ${common} ${graal-enterprise} ${daily-bench-caps} ${jruby-truffle} ${psd-benchmarks},
@@ -509,8 +469,6 @@ builds: [
{name: ruby-benchmarks-psd-graal-vm-release} ${common} ${graal-vm-release} ${bench-caps} ${jruby-truffle} ${psd-benchmarks},

{name: ruby-benchmarks-asciidoctor-mri} ${common} ${weekly-bench-caps} ${mri-benchmark} ${asciidoctor-benchmarks},
//{name: ruby-benchmarks-asciidoctor-noindy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-noindy-benchmark} ${asciidoctor-benchmarks},
//{name: ruby-benchmarks-asciidoctor-indy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-indy-benchmark} ${asciidoctor-benchmarks},
{name: ruby-benchmarks-asciidoctor-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${asciidoctor-benchmarks},
{name: ruby-benchmarks-asciidoctor-graal-core} ${common} ${graal-core} ${daily-bench-caps} ${jruby-truffle} ${asciidoctor-benchmarks},
{name: ruby-benchmarks-asciidoctor-graal-enterprise} ${common} ${graal-enterprise} ${daily-bench-caps} ${jruby-truffle} ${asciidoctor-benchmarks},
@@ -519,17 +477,13 @@ builds: [
{name: ruby-benchmarks-asciidoctor-graal-vm-release} ${common} ${graal-vm-release} ${bench-caps} ${jruby-truffle} ${asciidoctor-benchmarks},

{name: ruby-benchmarks-other-mri} ${common} ${weekly-bench-caps} ${mri-benchmark} ${other-benchmarks},
//{name: ruby-benchmarks-other-noindy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-noindy-benchmark} ${other-benchmarks},
//{name: ruby-benchmarks-other-indy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-indy-benchmark} ${other-benchmarks},
{name: ruby-benchmarks-other-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${other-benchmarks},
{name: ruby-benchmarks-other-graal-core} ${common} ${graal-core} ${daily-bench-caps} ${jruby-truffle} ${other-benchmarks},
{name: ruby-benchmarks-other-graal-enterprise} ${common} ${graal-enterprise} ${daily-bench-caps} ${jruby-truffle} ${other-benchmarks},
{name: ruby-benchmarks-other-graal-enterprise-no-om} ${common} ${graal-enterprise-no-om} ${daily-bench-caps} ${jruby-truffle} ${other-benchmarks},
{name: ruby-benchmarks-other-graal-vm-snapshot} ${common} ${graal-vm-snapshot} ${bench-caps} ${jruby-truffle} ${other-benchmarks},
{name: ruby-benchmarks-other-graal-vm-release} ${common} ${graal-vm-release} ${bench-caps} ${jruby-truffle} ${other-benchmarks},

//{name: ruby-benchmarks-server-noindy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-noindy-benchmark} ${server-benchmarks},
//{name: ruby-benchmarks-server-indy} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-indy-benchmark} ${server-benchmarks},
{name: ruby-benchmarks-server-no-graal} ${common} ${no-graal} ${weekly-bench-caps} ${jruby-truffle} ${server-benchmarks},
{name: ruby-benchmarks-server-graal-core} ${common} ${graal-core} ${daily-bench-caps} ${jruby-truffle} ${server-benchmarks},
{name: ruby-benchmarks-server-graal-enterprise} ${common} ${graal-enterprise} ${daily-bench-caps} ${jruby-truffle} ${server-benchmarks},
2 changes: 1 addition & 1 deletion core/pom.rb
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@

jar 'com.headius:invokebinder:1.7'
jar 'com.headius:options:1.4'
jar 'com.headius:unsafe-fences:1.0-SNAPSHOT'
jar 'com.headius:unsafe-fences:1.0'

jar 'bsf:bsf:2.4.0', :scope => 'provided'
jar 'com.jcraft:jzlib:1.1.3'
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ DO NOT MODIFIY - GENERATED CODE
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.1.7.0-SNAPSHOT</version>
<version>9.1.7.0</version>
</parent>
<artifactId>jruby-core</artifactId>
<name>JRuby Core</name>
@@ -203,7 +203,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>com.headius</groupId>
<artifactId>unsafe-fences</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0</version>
</dependency>
<dependency>
<groupId>bsf</groupId>
44 changes: 25 additions & 19 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -2862,16 +2862,11 @@ public void loadFile(String scriptName, InputStream in, boolean wrap) {
ThreadContext.pushBacktrace(context, "(root)", file, 0);
context.preNodeEval(self);
ParseResult parseResult = parseFile(scriptName, in, null);
RootNode root = (RootNode) parseResult;

if (wrap) {
// toss an anonymous module into the search path
RubyModule wrapper = RubyModule.newModule(this);
((RubyBasicObject)self).extend(new IRubyObject[] {wrapper});
RootNode root = (RootNode) parseResult;
StaticScope top = root.getStaticScope();
StaticScope newTop = staticScopeFactory.newLocalScope(null);
top.setPreviousCRefScope(newTop);
top.setModule(wrapper);
wrapRootForLoad((RubyBasicObject) self, root);
}

runInterpreter(context, parseResult, self);
@@ -2903,24 +2898,39 @@ public void loadScope(IRScope scope, boolean wrap) {
}

public void compileAndLoadFile(String filename, InputStream in, boolean wrap) {
InputStream readStream = in;

// script was not found in cache above, so proceed to compile
RootNode scriptNode = (RootNode) parseFile(readStream, filename, null);

IRubyObject self = wrap ? getTopSelf().rbClone() : getTopSelf();
ThreadContext context = getCurrentContext();
InputStream readStream = in;

String oldFile = context.getFile();
int oldLine = context.getLine();
try {
context.setFileAndLine(scriptNode.getFile(), scriptNode.getLine());
context.preNodeEval(self);
ParseResult parseResult = parseFile(filename, in, null);
RootNode root = (RootNode) parseResult;

runNormally(scriptNode, wrap);
if (wrap) {
wrapRootForLoad((RubyBasicObject) self, root);
} else {
root.getStaticScope().setModule(getObject());
}

runNormally(root, wrap);
} finally {
context.setFileAndLine(oldFile, oldLine);
context.postNodeEval();
}
}

private void wrapRootForLoad(RubyBasicObject self, RootNode root) {
// toss an anonymous module into the search path
RubyModule wrapper = RubyModule.newModule(this);
self.extend(new IRubyObject[] {wrapper});
StaticScope top = root.getStaticScope();
StaticScope newTop = staticScopeFactory.newLocalScope(null);
top.setPreviousCRefScope(newTop);
top.setModule(wrapper);
}

public void loadScript(Script script) {
loadScript(script, false);
}
@@ -3167,10 +3177,6 @@ public void tearDown(boolean systemExit) {

final ThreadContext context = getCurrentContext();

// Disable event hooks during runtime teardown
// This avoids deadlocks if some other thread is holding a debugger lock while we're trying to exit
context.setEventHooksEnabled(false);

// FIXME: 73df3d230b9d92c7237d581c6366df1b92ad9b2b exposed no toplevel scope existing anymore (I think the
// bogus scope I removed was playing surrogate toplevel scope and wallpapering this bug). For now, add a
// bogus scope back for at_exit block run. This is buggy if at_exit is capturing vars.
45 changes: 23 additions & 22 deletions core/src/main/java/org/jruby/RubyArray.java
Original file line number Diff line number Diff line change
@@ -71,6 +71,7 @@

import java.io.IOException;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
@@ -3021,46 +3022,46 @@ protected boolean flatten(ThreadContext context, final int level, final RubyArra
// TODO: (CON) We can flatten packed versions efficiently if length does not change (e.g. [[1,2],[]])
unpack();
final Ruby runtime = context.runtime;
RubyArray stack = newArrayLight(runtime, ARRAY_DEFAULT_SIZE);
IdentityHashMap<Object, Object> memo = new IdentityHashMap<Object, Object>();
RubyArray ary = this;
memo.put(ary, NEVER);
boolean modified = false;

ArrayList<Object> stack = null;
IdentityHashMap<RubyArray, IRubyObject> memo = null; // used as an IdentityHashSet

RubyArray ary = this;
int i = 0;

try {
while (true) {
IRubyObject tmp;
while (i < ary.realLength) {
IRubyObject elt = ary.eltOk(i++);
if (level >= 0 && stack.size() / 2 >= level) {
if (level >= 0 && (stack == null ? 0 : stack.size()) / 2 >= level) {
result.append(elt);
continue;
}
tmp = TypeConverter.checkArrayType(elt);
if (tmp.isNil()) {
result.append(elt);
} else {
modified = true;
IRubyObject tmp = TypeConverter.checkArrayType(elt);
if (tmp.isNil()) result.append(elt);
else { // nested array element
if (memo == null) {
memo = new IdentityHashMap<>(4 + 1);
memo.put(this, NEVER);
}
if (memo.get(tmp) != null) throw runtime.newArgumentError("tried to flatten recursive array");
memo.put(tmp, NEVER);
stack.append(ary);
stack.append(RubyFixnum.newFixnum(runtime, i));
ary = (RubyArray)tmp;
if (stack == null) stack = new ArrayList<>(8); // fine hold 4-level deep nesting
stack.add(ary); stack.add(i); // add (ary, i) pair
ary = (RubyArray) tmp;
memo.put(ary, NEVER);
i = 0;
}
}
if (stack.realLength == 0) break;
memo.remove(ary);
tmp = stack.pop(context);
i = (int) ((RubyFixnum) tmp).getLongValue();
ary = (RubyArray) stack.pop(context);
if (stack == null || stack.size() == 0) break;
memo.remove(ary); // memo != null since stack != null
final int s = stack.size(); // pop (ary, i)
i = (Integer) stack.remove(s - 1);
ary = (RubyArray) stack.remove(s - 2);
}
} catch (ArrayIndexOutOfBoundsException ex) {
throw concurrentModification(context.runtime, ex);
}
return modified;
return stack != null;
}

@JRubyMethod(name = "flatten!")
46 changes: 27 additions & 19 deletions core/src/main/java/org/jruby/compiler/impl/SkinnyMethodAdapter.java
Original file line number Diff line number Diff line change
@@ -563,35 +563,43 @@ public void start() {
getMethodVisitor().visitCode();
getMethodVisitor().visitLabel(start);
}


static final Runnable NO_LOCALS = new Runnable() { public void run() { /* no-op */ } };

public void end() {
end(new Runnable() {
public void run() {
}
});
end(NO_LOCALS);
}

public void end(Runnable locals) {
if (DEBUG) {
PrintWriter pw = new PrintWriter(System.out);
String className = "(unknown class)";
if (cv instanceof ClassWriter) {
className = new ClassReader(((ClassWriter)cv).toByteArray()).getClassName();
}
if (name != null) {
pw.write("*** Dumping " + className + "." + name + " ***\n");
} else {
pw.write("*** Dumping ***\n");
}
printer.print(pw);
pw.flush();
}
if (DEBUG) printByteCode(getClassName());
getMethodVisitor().visitLabel(end);
locals.run();
getMethodVisitor().visitMaxs(1, 1);
getMethodVisitor().visitEnd();
}

private String getClassName() {
if (cv instanceof ClassWriter) {
return new ClassReader(((ClassWriter) cv).toByteArray()).getClassName();
}
return "(unknown class)";
}

private PrintWriter outDebugWriter() {
return new PrintWriter(System.out);
}

private void printByteCode(final String className) {
PrintWriter pw = outDebugWriter();
if (name != null) {
pw.write("*** Dumping " + className + '.' + name + " ***\n");
} else {
pw.write("*** Dumping ***\n");
}
if (printer != null) printer.print(pw);
pw.flush();
}

public void local(int index, String name, Class type) {
getMethodVisitor().visitLocalVariable(name, ci(type), null, start, end, index);
}
Original file line number Diff line number Diff line change
@@ -212,7 +212,7 @@ public static byte[] createHandleBytes(Method method, String name) {
private static String createHandleName(Method method) {
Class returnType = method.getReturnType();
Class[] paramTypes = method.getParameterTypes();
return method.getDeclaringClass().getCanonicalName().replaceAll("\\.", "__") + "#" + method.getName() + "#" + JITCompiler.getHashForString(pretty(returnType, paramTypes));
return method.getDeclaringClass().getCanonicalName().replaceAll("\\.", "__") + '#' + method.getName() + '#' + JITCompiler.getHashForString(pretty(returnType, paramTypes));
}

public static void loadUnboxedArgument(SkinnyMethodAdapter m, int index, Class type) {
Loading