diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test index 1002a5c992822be172a270eb59dd09e3eb3544a0..b6eaccf56c1109b3810b7015e7bd27b056114cfd 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test @@ -152082,10 +152082,34 @@ com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.complex(to$fieldBooleanArray), 'complex')); } com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.complex(to$fieldDoubleArray), 'complex')); } +com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.complex(to$fieldIntegerArray), 'complex')); } +com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.complex(to$fieldStringArray), 'complex')); } +com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure + ##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldBooleanArray), 'complex')); } com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldDoubleArray), 'complex')); } +com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldIntegerArray), 'complex')); } +com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldStringArray), 'complex')); } +com.oracle.truffle.r.runtime.data.closures.RToComplexVectorClosure + ##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.double(as.vector(to$fieldBooleanArray))); } com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure @@ -152102,10 +152126,26 @@ com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.double(to$fieldBooleanArray), 'double')); } com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.double(to$fieldIntegerArray), 'double')); } +com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.double(to$fieldStringArray), 'double')); } +com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure + ##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldBooleanArray), 'double')); } com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldIntegerArray), 'double')); } +com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldStringArray), 'double')); } +com.oracle.truffle.r.runtime.data.closures.RToDoubleVectorClosure + ##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.integer(as.vector(to$fieldBooleanArray))); } com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure @@ -152122,10 +152162,26 @@ com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.integer(to$fieldBooleanArray), 'integer')); } com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.integer(to$fieldDoubleArray), 'integer')); } +com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.integer(to$fieldStringArray), 'integer')); } +com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure + ##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldBooleanArray), 'integer')); } com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldDoubleArray), 'integer')); } +com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldStringArray), 'integer')); } +com.oracle.truffle.r.runtime.data.closures.RToIntVectorClosure + ##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.character(as.vector(to$fieldBooleanArray))); } com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure @@ -152142,10 +152198,26 @@ com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.character(to$fieldBooleanArray), 'character')); } com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.character(to$fieldDoubleArray), 'character')); } +com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.character(to$fieldIntegerArray), 'character')); } +com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure + ##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# #if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldBooleanArray), 'character')); } com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldDoubleArray), 'character')); } +com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure + +##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNoCopyOncast# +#if (!any(R.version$engine == "FastR")) { cat('com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure<<<NEWLINE>>>') } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass'));.fastr.inspect(as.vector(as.vector(to$fieldIntegerArray), 'character')); } +com.oracle.truffle.r.runtime.data.closures.RToStringVectorClosure + ##com.oracle.truffle.r.test.library.fastr.TestJavaInterop.testNonPrimitiveParameter# #if (!any(R.version$engine == "FastR")) { TRUE } else { to <- .fastr.interop.new(java.type('com.oracle.truffle.r.test.library.fastr.TestJavaInterop$TestClass')); to$equals(to) } [1] TRUE diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java index 81ecae1ebc239ebb8970802ace40a4137d1b03cb..e3a362512548462b5502718d9d057ce3e7a3a781 100644 --- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java +++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/library/fastr/TestJavaInterop.java @@ -1083,9 +1083,9 @@ public class TestJavaInterop extends TestBase { } assertEvalFastR(CREATE_TRUFFLE_OBJECT + ".fastr.inspect(as." + type + "(as.vector(to$" + field + ")));", "cat('com.oracle.truffle.r.runtime.data.closures." + closure + "\n')"); assertEvalFastR(CREATE_TRUFFLE_OBJECT + - ".fastr.inspect(as.vector(as.vector(to$fieldBooleanArray), '" + type + "'));", "cat('com.oracle.truffle.r.runtime.data.closures." + closure + "\n')"); + ".fastr.inspect(as.vector(as.vector(to$" + field + "), '" + type + "'));", "cat('com.oracle.truffle.r.runtime.data.closures." + closure + "\n')"); assertEvalFastR(CREATE_TRUFFLE_OBJECT + - ".fastr.inspect(as.vector(as." + type + "(to$fieldBooleanArray), '" + type + "'));", "cat('com.oracle.truffle.r.runtime.data.closures." + closure + "\n')"); + ".fastr.inspect(as.vector(as." + type + "(to$" + field + "), '" + type + "'));", "cat('com.oracle.truffle.r.runtime.data.closures." + closure + "\n')"); } }