jruby/jruby — pull request #2200 by bpot (2014-11-15 02:08:20+00:00)
Title: [Truffle] Add TruffleBoundary to RubyString.toString().

It looks like `toString()` is triggering some code that truffle refuses to compile.

A script like `1_000_000.times { "hello".bytes.to_s }` triggers:

```
Found illegal recursive call to HotSpotMethod, must annotate such calls with @TruffleBoundary!
```

Not sure if this is the best fix, still trying to wrap my head around truffle/graal. The full backtrace is below.

```
Context obj com.oracle.graal.nodes.util.GraphUtil$2: Found illegal recursive call to HotSpotMethod, must annotate such calls with @TruffleBoundary!
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod(int, int)>
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod(String, int)>
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod(byte[], int, int)>
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod(byte[])>
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod
Context obj com.oracle.graal.hotspot.meta.HotSpotMetaAccessProvider@19e332a3
Context obj HotSpotMethod

```