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: 5ff2b3e880d3^
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 592b5236a3d5
Choose a head ref
  • 4 commits
  • 23 files changed
  • 1 contributor

Commits on Aug 12, 2017

  1. Copy the full SHA
    5ff2b3e View commit details
  2. Copy the full SHA
    baa1ab2 View commit details
  3. Copy the full SHA
    243de08 View commit details
  4. Reduce complexity and overhead of Regexp and DRegexp.

    * Rework RegexpOptions to have a single int field for the
      embedded options.
    * Rework RubyRegexp to use embedded options.
    * Rework Regexp construction paths in runtime to pass
      embedded options.
    * Provide zero-alloc preprocessing for up to 5 pieces (DRegexp).
    * Compile single-static-element DRegexp as Regexp without
      constructing new Regexp instance.
    * Restructure preprocessing to allow incremental steps. This
      allows the interpreter to process each string in turn without
      constructing an array to hold them, and the JIT to do something
      similar up to a fixed arity (due to the size of rolling out the
      elements on the stack and calling the incremental step,
      specific-arity utility methods are used).
    * Improve caching logic.
    headius committed Aug 12, 2017
    Copy the full SHA
    592b523 View commit details
Showing with 711 additions and 428 deletions.
  1. +1 −1 core/src/main/java/org/jruby/RubyMatchData.java
  2. +152 −165 core/src/main/java/org/jruby/RubyRegexp.java
  3. +1 −1 core/src/main/java/org/jruby/compiler/BlockJITTask.java
  4. +5 −3 core/src/main/java/org/jruby/compiler/MethodJITTask.java
  5. +1 −1 core/src/main/java/org/jruby/ir/Compiler.java
  6. +4 −2 core/src/main/java/org/jruby/ir/IRBuilder.java
  7. +13 −4 core/src/main/java/org/jruby/ir/instructions/BuildCompoundStringInstr.java
  8. +30 −20 core/src/main/java/org/jruby/ir/instructions/BuildDynRegExpInstr.java
  9. +2 −1 core/src/main/java/org/jruby/ir/operands/Filename.java
  10. +3 −7 core/src/main/java/org/jruby/ir/operands/FrozenString.java
  11. +5 −5 core/src/main/java/org/jruby/ir/operands/ImmutableLiteral.java
  12. +6 −2 core/src/main/java/org/jruby/ir/operands/Regexp.java
  13. +1 −2 core/src/main/java/org/jruby/ir/operands/StringLiteral.java
  14. +90 −30 core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java
  15. +77 −13 core/src/main/java/org/jruby/ir/targets/DRegexpObjectSite.java
  16. +1 −1 core/src/main/java/org/jruby/ir/targets/IRBytecodeAdapter.java
  17. +15 −10 core/src/main/java/org/jruby/ir/targets/IRBytecodeAdapter6.java
  18. +5 −4 core/src/main/java/org/jruby/ir/targets/IRBytecodeAdapter7.java
  19. +22 −17 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
  20. +2 −1 core/src/main/java/org/jruby/parser/ReOptions.java
  21. +6 −1 core/src/main/java/org/jruby/runtime/ThreadContext.java
  22. +249 −131 core/src/main/java/org/jruby/util/RegexpOptions.java
  23. +20 −6 core/src/main/java/org/jruby/util/RegexpSupport.java
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyMatchData.java
Original file line number Diff line number Diff line change
@@ -295,7 +295,7 @@ final Regex getPattern() {
if (pattern instanceof Regex) return (Regex) pattern;
if (pattern == null) throw getRuntime().newTypeError("uninitialized Match (missing pattern)");
// when a regexp is avoided for matching we lazily instantiate one from the unquoted string :
Regex regexPattern = RubyRegexp.getQuotedRegexpFromCache(getRuntime(), (RubyString) pattern, RegexpOptions.NULL_OPTIONS);
Regex regexPattern = RubyRegexp.getQuotedRegexpFromCache(getRuntime(), (RubyString) pattern, RegexpOptions.newEmbeddedOptions());
this.pattern = regexPattern;
return regexPattern;
}
Loading