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: 0e29b6b8c8f8
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 04aeda6ccd22
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 7, 2015

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    3dcf8c7 View commit details
  2. Merge pull request #2662 from bjfish/truffle_string_encode_boundary

    [Truffle] Adding TruffleBoundary to fix Illegal recurion errors
    chrisseaton committed Mar 7, 2015
    Copy the full SHA
    04aeda6 View commit details
Showing with 5 additions and 5 deletions.
  1. +5 −5 truffle/src/main/java/org/jruby/truffle/nodes/core/StringNodes.java
Original file line number Diff line number Diff line change
@@ -894,9 +894,9 @@ public EncodeNode(EncodeNode prev) {
super(prev);
}

@TruffleBoundary
@Specialization
public RubyString encode(RubyString string, RubyString encoding, @SuppressWarnings("unused") UndefinedPlaceholder options) {
notDesignedForCompilation();

final org.jruby.RubyString jrubyString = getContext().toJRuby(string);
final org.jruby.RubyString jrubyEncodingString = getContext().toJRuby(encoding);
@@ -905,17 +905,17 @@ public RubyString encode(RubyString string, RubyString encoding, @SuppressWarnin
return getContext().toTruffle(jrubyTranscoded);
}

@TruffleBoundary
@Specialization
public RubyString encode(RubyString string, RubyString encoding, @SuppressWarnings("unused") RubyHash options) {
notDesignedForCompilation();

// TODO (nirvdrum 20-Feb-15) We need to do something with the options hash. I'm stubbing this out just to get the jUnit mspec formatter running.
return encode(string, encoding, UndefinedPlaceholder.INSTANCE);
}

@TruffleBoundary
@Specialization
public RubyString encode(RubyString string, RubyEncoding encoding, @SuppressWarnings("unused") UndefinedPlaceholder options) {
notDesignedForCompilation();

final org.jruby.RubyString jrubyString = getContext().toJRuby(string);
final org.jruby.RubyString jrubyEncodingString = getContext().toJRuby(getContext().makeString(encoding.getName()));
@@ -924,9 +924,9 @@ public RubyString encode(RubyString string, RubyEncoding encoding, @SuppressWarn
return getContext().toTruffle(jrubyTranscoded);
}

@TruffleBoundary
@Specialization(guards = { "!isRubyString(arguments[1])", "!isRubyEncoding(arguments[1])", "!isUndefinedPlaceholder(arguments[1])" })
public RubyString encode(VirtualFrame frame, RubyString string, Object encoding, UndefinedPlaceholder options) {
notDesignedForCompilation();

if (toStrNode == null) {
CompilerDirectives.transferToInterpreter();
@@ -936,9 +936,9 @@ public RubyString encode(VirtualFrame frame, RubyString string, Object encoding,
return encode(string, toStrNode.executeRubyString(frame, encoding), options);
}

@TruffleBoundary
@Specialization
public RubyString encode(RubyString string, @SuppressWarnings("unused") UndefinedPlaceholder encoding, @SuppressWarnings("unused") UndefinedPlaceholder options) {
notDesignedForCompilation();

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