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

Commits on Jan 4, 2016

  1. Copy the full SHA
    5f1ffc8 View commit details
  2. Copy the full SHA
    7fa8d9f View commit details
Original file line number Diff line number Diff line change
@@ -41,7 +41,6 @@
import org.jcodings.specific.ASCIIEncoding;
import org.jcodings.specific.USASCIIEncoding;
import org.jcodings.specific.UTF8Encoding;
import org.jruby.truffle.format.parser.PackCompiler;
import org.jruby.truffle.format.parser.UnpackCompiler;
import org.jruby.truffle.format.runtime.PackResult;
import org.jruby.truffle.format.runtime.exceptions.*;
Original file line number Diff line number Diff line change
@@ -263,7 +263,8 @@ public Object stringByteSubstring(VirtualFrame frame, DynamicObject string, int
length = bytes.length() - normalizedIndex;
}

final DynamicObject result = allocateObjectNode.allocate(Layouts.BASIC_OBJECT.getLogicalClass(string), new ByteList(bytes, normalizedIndex, length), StringSupport.CR_UNKNOWN, null);
final int codeRange = Layouts.STRING.getCodeRange(string) == StringSupport.CR_7BIT ? StringSupport.CR_7BIT : StringSupport.CR_UNKNOWN;
final DynamicObject result = allocateObjectNode.allocate(Layouts.BASIC_OBJECT.getLogicalClass(string), new ByteList(bytes, normalizedIndex, length), codeRange, null);

return taintResultNode.maybeTaint(string, result);
}
@@ -633,7 +634,7 @@ public Object stringFindCharacterSingleByte(DynamicObject string, int offset) {
return nil();
}

final DynamicObject ret = allocateObjectNode.allocate(Layouts.BASIC_OBJECT.getLogicalClass(string), new ByteList(byteList, offset, 1), StringSupport.CR_UNKNOWN, null);
final DynamicObject ret = allocateObjectNode.allocate(Layouts.BASIC_OBJECT.getLogicalClass(string), new ByteList(byteList, offset, 1), StringSupport.CR_7BIT, null);

return propagate(string, ret);
}
@@ -659,7 +660,7 @@ public Object stringFindCharacter(DynamicObject string, int offset) {
if (StringSupport.MBCLEN_CHARFOUND_P(clen)) {
ret = allocateObjectNode.allocate(Layouts.BASIC_OBJECT.getLogicalClass(string), new ByteList(byteList, offset, clen), StringSupport.CR_UNKNOWN, null);
} else {
ret = allocateObjectNode.allocate(Layouts.BASIC_OBJECT.getLogicalClass(string), new ByteList(byteList, offset, 1), StringSupport.CR_UNKNOWN, null);
ret = allocateObjectNode.allocate(Layouts.BASIC_OBJECT.getLogicalClass(string), new ByteList(byteList, offset, 1), StringSupport.CR_7BIT, null);
}

return propagate(string, ret);