summaryrefslogtreecommitdiff
path: root/test/instrumented/srt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'test/instrumented/srt.patch')
-rw-r--r--test/instrumented/srt.patch69
1 files changed, 55 insertions, 14 deletions
diff --git a/test/instrumented/srt.patch b/test/instrumented/srt.patch
index 366763e7f9..47dcfa2197 100644
--- a/test/instrumented/srt.patch
+++ b/test/instrumented/srt.patch
@@ -1,26 +1,67 @@
-9a10,11
+8a9,10
> /* INSTRUMENTED VERSION */
->
-44c46,49
-< def isTuple(x: Any) = x != null && tupleNames(x.getClass.getName)
----
+>
+73a76,77
> var arrayApplyCount = 0
-> var arrayUpdateCount = 0
->
-> def isTuple(x: Any) = tupleNames(x.getClass.getName)
-76c81,83
+>
+75,86c79,93
< def array_apply(xs: AnyRef, idx: Int): Any = xs match {
+< case x: Array[AnyRef] => x(idx).asInstanceOf[Any]
+< case x: Array[Int] => x(idx).asInstanceOf[Any]
+< case x: Array[Double] => x(idx).asInstanceOf[Any]
+< case x: Array[Long] => x(idx).asInstanceOf[Any]
+< case x: Array[Float] => x(idx).asInstanceOf[Any]
+< case x: Array[Char] => x(idx).asInstanceOf[Any]
+< case x: Array[Byte] => x(idx).asInstanceOf[Any]
+< case x: Array[Short] => x(idx).asInstanceOf[Any]
+< case x: Array[Boolean] => x(idx).asInstanceOf[Any]
+< case x: Array[Unit] => x(idx).asInstanceOf[Any]
+< case null => throw new NullPointerException
---
> def array_apply(xs: AnyRef, idx: Int): Any = {
> arrayApplyCount += 1
> xs match {
-88a96
-> }
-91c99,101
+> case x: Array[AnyRef] => x(idx).asInstanceOf[Any]
+> case x: Array[Int] => x(idx).asInstanceOf[Any]
+> case x: Array[Double] => x(idx).asInstanceOf[Any]
+> case x: Array[Long] => x(idx).asInstanceOf[Any]
+> case x: Array[Float] => x(idx).asInstanceOf[Any]
+> case x: Array[Char] => x(idx).asInstanceOf[Any]
+> case x: Array[Byte] => x(idx).asInstanceOf[Any]
+> case x: Array[Short] => x(idx).asInstanceOf[Any]
+> case x: Array[Boolean] => x(idx).asInstanceOf[Any]
+> case x: Array[Unit] => x(idx).asInstanceOf[Any]
+> case null => throw new NullPointerException
+> }
+88a96,97
+> var arrayUpdateCount = 0
+>
+90,101c99,113
< def array_update(xs: AnyRef, idx: Int, value: Any): Unit = xs match {
+< case x: Array[AnyRef] => x(idx) = value.asInstanceOf[AnyRef]
+< case x: Array[Int] => x(idx) = value.asInstanceOf[Int]
+< case x: Array[Double] => x(idx) = value.asInstanceOf[Double]
+< case x: Array[Long] => x(idx) = value.asInstanceOf[Long]
+< case x: Array[Float] => x(idx) = value.asInstanceOf[Float]
+< case x: Array[Char] => x(idx) = value.asInstanceOf[Char]
+< case x: Array[Byte] => x(idx) = value.asInstanceOf[Byte]
+< case x: Array[Short] => x(idx) = value.asInstanceOf[Short]
+< case x: Array[Boolean] => x(idx) = value.asInstanceOf[Boolean]
+< case x: Array[Unit] => x(idx) = value.asInstanceOf[Unit]
+< case null => throw new NullPointerException
---
> def array_update(xs: AnyRef, idx: Int, value: Any): Unit = {
> arrayUpdateCount += 1
> xs match {
-102a113
-> }
+> case x: Array[AnyRef] => x(idx) = value.asInstanceOf[AnyRef]
+> case x: Array[Int] => x(idx) = value.asInstanceOf[Int]
+> case x: Array[Double] => x(idx) = value.asInstanceOf[Double]
+> case x: Array[Long] => x(idx) = value.asInstanceOf[Long]
+> case x: Array[Float] => x(idx) = value.asInstanceOf[Float]
+> case x: Array[Char] => x(idx) = value.asInstanceOf[Char]
+> case x: Array[Byte] => x(idx) = value.asInstanceOf[Byte]
+> case x: Array[Short] => x(idx) = value.asInstanceOf[Short]
+> case x: Array[Boolean] => x(idx) = value.asInstanceOf[Boolean]
+> case x: Array[Unit] => x(idx) = value.asInstanceOf[Unit]
+> case null => throw new NullPointerException
+> }