summaryrefslogtreecommitdiff
path: root/test/instrumented
diff options
context:
space:
mode:
authorAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2011-01-17 15:18:06 +0000
committerAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2011-01-17 15:18:06 +0000
commit16e7ad360d1a902d6bd5c845642dbe14bcecdb9d (patch)
treea189e624a75dbb47a689a821208b41b0141e2ee0 /test/instrumented
parentbe2778d50f1a73a941c6ffe6355f0ed401d6d8eb (diff)
downloadscala-16e7ad360d1a902d6bd5c845642dbe14bcecdb9d.tar.gz
scala-16e7ad360d1a902d6bd5c845642dbe14bcecdb9d.tar.bz2
scala-16e7ad360d1a902d6bd5c845642dbe14bcecdb9d.zip
Adapted specialization tests to track number of...
Adapted specialization tests to track number of boxings. Review by dragos
Diffstat (limited to 'test/instrumented')
-rw-r--r--test/instrumented/library/scala/runtime/BoxesRunTime.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/instrumented/library/scala/runtime/BoxesRunTime.java b/test/instrumented/library/scala/runtime/BoxesRunTime.java
index ad5a0c7e0a..8f02cf1dfb 100644
--- a/test/instrumented/library/scala/runtime/BoxesRunTime.java
+++ b/test/instrumented/library/scala/runtime/BoxesRunTime.java
@@ -49,6 +49,13 @@ public final class BoxesRunTime
/* BOXING ... BOXING ... BOXING ... BOXING ... BOXING ... BOXING ... BOXING ... BOXING */
public static int booleanBoxCount = 0;
+ public static int characterBoxCount = 0;
+ public static int byteBoxCount = 0;
+ public static int shortBoxCount = 0;
+ public static int integerBoxCount = 0;
+ public static int longBoxCount = 0;
+ public static int floatBoxCount = 0;
+ public static int doubleBoxCount = 0;
public static java.lang.Boolean boxToBoolean(boolean b) {
booleanBoxCount++;
@@ -56,30 +63,37 @@ public final class BoxesRunTime
}
public static java.lang.Character boxToCharacter(char c) {
+ characterBoxCount++;
return java.lang.Character.valueOf(c);
}
public static java.lang.Byte boxToByte(byte b) {
+ byteBoxCount++;
return java.lang.Byte.valueOf(b);
}
public static java.lang.Short boxToShort(short s) {
+ shortBoxCount++;
return java.lang.Short.valueOf(s);
}
public static java.lang.Integer boxToInteger(int i) {
+ integerBoxCount++;
return java.lang.Integer.valueOf(i);
}
public static java.lang.Long boxToLong(long l) {
+ longBoxCount++;
return java.lang.Long.valueOf(l);
}
public static java.lang.Float boxToFloat(float f) {
+ floatBoxCount++;
return java.lang.Float.valueOf(f);
}
public static java.lang.Double boxToDouble(double d) {
+ doubleBoxCount++;
// System.out.println("box " + d);
// (new Throwable()).printStackTrace();
return java.lang.Double.valueOf(d);