summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex/Main.java
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2017-03-03 22:56:16 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-03 22:56:16 +0000
commit760e2a04efd921c16c131b6b03a50e0cc5cacbc5 (patch)
tree329c14766fa03136a9912b574ba7304ea3e44e6e /test/ProfileTestMultiDex/Main.java
parenta8eb2f3b2ebfbf70c289d10d09550e9e8856f59c (diff)
parent8c0b363edbfb8231ac61b9e770ba35138a039107 (diff)
Merge "Extend profman to generate profiles with inline caches" am: d9f647ac9a
am: 8c0b363edb Change-Id: I8f45be78b26d3f4b61e6b7ee5663ebf7f16a3c1a
Diffstat (limited to 'test/ProfileTestMultiDex/Main.java')
-rw-r--r--test/ProfileTestMultiDex/Main.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/ProfileTestMultiDex/Main.java b/test/ProfileTestMultiDex/Main.java
index 41532ea8f7f..73fbb00d25b 100644
--- a/test/ProfileTestMultiDex/Main.java
+++ b/test/ProfileTestMultiDex/Main.java
@@ -25,3 +25,41 @@ class Main {
return "C";
}
}
+
+class TestInline {
+ public int inlineMonomorphic(Super s) {
+ return s.getValue();
+ }
+
+ public int inlinePolymorphic(Super s) {
+ return s.getValue();
+ }
+
+ public int inlineMegamorphic(Super s) {
+ return s.getValue();
+ }
+
+ public int noInlineCache(Super s) {
+ return s.getValue();
+ }
+}
+
+abstract class Super {
+ abstract int getValue();
+}
+
+class SubA extends Super {
+ int getValue() { return 42; }
+}
+
+class SubB extends Super {
+ int getValue() { return 38; };
+}
+
+class SubD extends Super {
+ int getValue() { return 20; };
+}
+
+class SubE extends Super {
+ int getValue() { return 16; };
+}