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: 930dc8d5f0a8
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f098bf6238ac
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 25, 2016

  1. Copy the full SHA
    c8cfc25 View commit details
  2. Bump to latest jruby-openssl.

    headius committed Jan 25, 2016
    Copy the full SHA
    f098bf6 View commit details
Showing with 23 additions and 9 deletions.
  1. +21 −7 core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
  2. +1 −1 lib/pom.rb
  3. +1 −1 lib/pom.xml
28 changes: 21 additions & 7 deletions core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Original file line number Diff line number Diff line change
@@ -463,13 +463,19 @@ public void BEQInstr(BEQInstr beqInstr) {
@Override
public void BFalseInstr(BFalseInstr bFalseInstr) {
Operand arg1 = bFalseInstr.getArg1();
visit(arg1);
// this is a gross hack because we don't have distinction in boolean instrs between boxed and unboxed
if (!(arg1 instanceof TemporaryBooleanVariable) && !(arg1 instanceof UnboxedBoolean)) {
if (arg1 instanceof TemporaryBooleanVariable || arg1 instanceof UnboxedBoolean) {
// no need to unbox
visit(arg1);
jvmMethod().bfalse(getJVMLabel(bFalseInstr.getJumpTarget()));
} else if (arg1 instanceof UnboxedFixnum || arg1 instanceof UnboxedFloat) {
// always true, don't branch
} else {
// unbox
visit(arg1);
jvmAdapter().invokeinterface(p(IRubyObject.class), "isTrue", sig(boolean.class));
jvmMethod().bfalse(getJVMLabel(bFalseInstr.getJumpTarget()));
}
jvmMethod().bfalse(getJVMLabel(bFalseInstr.getJumpTarget()));
}

@Override
@@ -721,12 +727,20 @@ public void BreakInstr(BreakInstr breakInstr) {
@Override
public void BTrueInstr(BTrueInstr btrueinstr) {
Operand arg1 = btrueinstr.getArg1();
visit(arg1);
// this is a gross hack because we don't have distinction in boolean instrs between boxed and unboxed
if (!(arg1 instanceof TemporaryBooleanVariable) && !(arg1 instanceof UnboxedBoolean)) {
jvmMethod().isTrue();
if (arg1 instanceof TemporaryBooleanVariable || arg1 instanceof UnboxedBoolean) {
// no need to unbox, just branch
visit(arg1);
jvmMethod().btrue(getJVMLabel(btrueinstr.getJumpTarget()));
} else if (arg1 instanceof UnboxedFixnum || arg1 instanceof UnboxedFloat) {
// always true, always branch
jvmMethod().goTo(getJVMLabel(btrueinstr.getJumpTarget()));
} else {
// unbox and branch
visit(arg1);
jvmAdapter().invokeinterface(p(IRubyObject.class), "isTrue", sig(boolean.class));
jvmMethod().btrue(getJVMLabel(btrueinstr.getJumpTarget()));
}
jvmMethod().btrue(getJVMLabel(btrueinstr.getJumpTarget()));
}

@Override
2 changes: 1 addition & 1 deletion lib/pom.rb
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ def initialize( name, version, default_spec = true )

default_gems =
[
ImportedGem.new( 'jruby-openssl', '0.9.11' ),
ImportedGem.new( 'jruby-openssl', '0.9.15' ),
ImportedGem.new( 'jruby-readline', '1.0', false ),
ImportedGem.new( 'rake', '${rake.version}' ),
ImportedGem.new( 'rdoc', '${rdoc.version}' ),
2 changes: 1 addition & 1 deletion lib/pom.xml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>rubygems</groupId>
<artifactId>jruby-openssl</artifactId>
<version>0.9.11</version>
<version>0.9.15</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>