diff --git a/graal-common.json b/graal-common.json index 17de143a927f..4224872c2536 100644 --- a/graal-common.json +++ b/graal-common.json @@ -1,6 +1,6 @@ { "README": "This file contains definitions that are useful for the jsonnet CI files of the graal and graal-enterprise repositories.", "ci": { - "overlay": "2a8921f5fd0a66b67c5988e802b883b8f6a6c26d" + "overlay": "907f84a98fe5736824d2964e8815d75d0511d39d" } } diff --git a/truffle/src/com.oracle.truffle.nfi.backend.libffi/src/com/oracle/truffle/nfi/backend/libffi/SerializeArgumentNode.java b/truffle/src/com.oracle.truffle.nfi.backend.libffi/src/com/oracle/truffle/nfi/backend/libffi/SerializeArgumentNode.java index f49c3b30e743..bc7f75496974 100644 --- a/truffle/src/com.oracle.truffle.nfi.backend.libffi/src/com/oracle/truffle/nfi/backend/libffi/SerializeArgumentNode.java +++ b/truffle/src/com.oracle.truffle.nfi.backend.libffi/src/com/oracle/truffle/nfi/backend/libffi/SerializeArgumentNode.java @@ -403,9 +403,9 @@ abstract static class SerializeSerializableNode extends SerializeArgumentNode { super(type); } - @Specialization(limit = "3", guards = "serialize.isSerializable(arg)") + @Specialization(guards = "serialize.isSerializable(arg)") void doSerializable(Object arg, NativeArgumentBuffer buffer, - @CachedLibrary("arg") SerializableLibrary serialize) { + @CachedLibrary(limit = "4") SerializableLibrary serialize) { BufferSlice b = new BufferSlice(buffer, buffer.position(), type.size); try { serialize.serialize(arg, b); @@ -422,21 +422,21 @@ abstract static class SerializePointerNode extends SerializeArgumentNode { super(type); } - @Specialization(limit = "3", guards = "interop.isPointer(arg)", rewriteOn = UnsupportedMessageException.class) + @Specialization(guards = "interop.isPointer(arg)", rewriteOn = UnsupportedMessageException.class) void putPointer(Object arg, NativeArgumentBuffer buffer, - @CachedLibrary("arg") InteropLibrary interop) throws UnsupportedMessageException { + @Shared @CachedLibrary(limit = "3") InteropLibrary interop) throws UnsupportedMessageException { buffer.putPointerKeepalive(arg, interop.asPointer(arg), type.size); } - @Specialization(limit = "3", guards = {"!interop.isPointer(arg)", "interop.isNull(arg)"}) + @Specialization(guards = {"!interop.isPointer(arg)", "interop.isNull(arg)"}) void putNull(@SuppressWarnings("unused") Object arg, NativeArgumentBuffer buffer, - @SuppressWarnings("unused") @CachedLibrary("arg") InteropLibrary interop) { + @SuppressWarnings("unused") @Shared @CachedLibrary(limit = "3") InteropLibrary interop) { buffer.putPointer(0, type.size); } - @Specialization(limit = "3", replaces = {"putPointer", "putNull"}) + @Specialization(replaces = {"putPointer", "putNull"}) static void putGeneric(Object arg, NativeArgumentBuffer buffer, - @CachedLibrary("arg") InteropLibrary interop, + @Shared @CachedLibrary(limit = "3") InteropLibrary interop, @Bind Node node, @Bind("type.size") int size, @Cached InlinedBranchProfile exception) throws UnsupportedTypeException { @@ -483,27 +483,27 @@ abstract static class SerializeStringNode extends SerializeArgumentNode { super(type); } - @Specialization(limit = "3", guards = "interop.isPointer(value)", rewriteOn = UnsupportedMessageException.class) + @Specialization(guards = "interop.isPointer(value)", rewriteOn = UnsupportedMessageException.class) void putPointer(Object value, NativeArgumentBuffer buffer, - @CachedLibrary("value") InteropLibrary interop) throws UnsupportedMessageException { + @Shared @CachedLibrary(limit = "3") InteropLibrary interop) throws UnsupportedMessageException { buffer.putPointerKeepalive(value, interop.asPointer(value), type.size); } - @Specialization(limit = "3", guards = {"!interop.isPointer(value)", "interop.isString(value)"}, rewriteOn = UnsupportedMessageException.class) + @Specialization(guards = {"!interop.isPointer(value)", "interop.isString(value)"}, rewriteOn = UnsupportedMessageException.class) void putString(Object value, NativeArgumentBuffer buffer, - @CachedLibrary("value") InteropLibrary interop) throws UnsupportedMessageException { + @Shared @CachedLibrary(limit = "3") InteropLibrary interop) throws UnsupportedMessageException { buffer.putObject(TypeTag.STRING, interop.asString(value), type.size); } - @Specialization(limit = "3", guards = {"!interop.isPointer(value)", "!interop.isString(value)", "interop.isNull(value)"}) + @Specialization(guards = {"!interop.isPointer(value)", "!interop.isString(value)", "interop.isNull(value)"}) void putNull(@SuppressWarnings("unused") Object value, NativeArgumentBuffer buffer, - @SuppressWarnings("unused") @CachedLibrary("value") InteropLibrary interop) { + @SuppressWarnings("unused") @Shared @CachedLibrary(limit = "3") InteropLibrary interop) { buffer.putPointer(0, type.size); } - @Specialization(limit = "3", replaces = {"putPointer", "putString", "putNull"}) + @Specialization(replaces = {"putPointer", "putString", "putNull"}) static void putGeneric(Object value, NativeArgumentBuffer buffer, - @CachedLibrary("value") InteropLibrary interop, + @Shared @CachedLibrary(limit = "3") InteropLibrary interop, @Bind Node node, @Bind("type.size") int size, @Cached InlinedBranchProfile exception) throws UnsupportedTypeException { @@ -555,9 +555,9 @@ abstract static class SerializeNullableNode extends SerializeArgumentNode { super(type); } - @Specialization(limit = "3") + @Specialization void putObject(Object value, NativeArgumentBuffer buffer, - @CachedLibrary("value") InteropLibrary interop) { + @CachedLibrary(limit = "3") InteropLibrary interop) { if (interop.isNull(value)) { buffer.putPointer(0L, type.size); } else {