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

Commits on Sep 28, 2015

  1. Copy the full SHA
    844590b View commit details
  2. Copy the full SHA
    0fe4e37 View commit details
Original file line number Diff line number Diff line change
@@ -124,13 +124,7 @@ protected Shape transitionWithNewField(Shape oldShape, Object value) {
return copy.getShape();
}
} else {
Class type = value.getClass();

if (value instanceof Long) {
type = long.class;
}

final Location location = oldShape.allocator().locationForType(type,
final Location location = oldShape.allocator().locationForValue(value,
EnumSet.of(LocationModifier.Final, LocationModifier.NonNull));
final Property newProperty = Property.create(name, location, 0);
return oldShape.addProperty(newProperty);
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
*/
package org.jruby.truffle.runtime.core;

import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.object.DynamicObject;
import org.jcodings.Encoding;
@@ -25,6 +26,8 @@ public static Encoding getEncoding(DynamicObject rubyEncoding) {
Encoding encoding = Layouts.ENCODING.getEncoding(rubyEncoding);

if (encoding == null) {
CompilerDirectives.transferToInterpreter();

final ByteList name = Layouts.ENCODING.getName(rubyEncoding);
encoding = loadEncoding(name);
Layouts.ENCODING.setEncoding(rubyEncoding, encoding);