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

Commits on Jan 2, 2016

  1. Copy the full SHA
    80f9399 View commit details
  2. [Truffle] Findbugs.

    chrisseaton committed Jan 2, 2016
    Copy the full SHA
    76789b9 View commit details
Original file line number Diff line number Diff line change
@@ -33,11 +33,8 @@
})
public abstract class ReadBase64StringNode extends PackNode {

private final int requestedLength;

public ReadBase64StringNode(RubyContext context, int requestedLength) {
public ReadBase64StringNode(RubyContext context) {
super(context);
this.requestedLength = requestedLength;
}

@Specialization
Original file line number Diff line number Diff line change
@@ -294,22 +294,8 @@ public void exitMimeString(PackParser.MimeStringContext ctx) {
public void exitBase64String(PackParser.Base64StringContext ctx) {
//unify(PackEncoding.US_ASCII);

final int length;
final boolean ignoreStar;

if (ctx.count() == null) {
length = 1;
ignoreStar = false;
} else if (ctx.count().INT() == null) {
length = 0;
ignoreStar = true;
} else {
length = Integer.parseInt(ctx.count().INT().getText());
ignoreStar = false;
}

appendNode(WriteValueNodeGen.create(context,
ReadBase64StringNodeGen.create(context, length, new SourceNode())));
ReadBase64StringNodeGen.create(context, new SourceNode())));
}

@Override
18 changes: 14 additions & 4 deletions truffle/src/main/java/org/jruby/truffle/nodes/RubyTypes.java
Original file line number Diff line number Diff line change
@@ -16,22 +16,32 @@
public abstract class RubyTypes {

@ImplicitCast
public static int promote(byte value) {
public static int promoteToInt(byte value) {
return value;
}

@ImplicitCast
public static int promote(short value) {
public static int promoteToInt(short value) {
return value;
}

@ImplicitCast
public static long promote(int value) {
public static long promoteToLong(byte value) {
return value;
}

@ImplicitCast
public static double promote(float value) {
public static long promoteToLong(short value) {
return value;
}

@ImplicitCast
public static long promoteToLong(int value) {
return value;
}

@ImplicitCast
public static double promoteToDouble(float value) {
return value;
}