summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex/Main.java
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2017-03-03 22:53:17 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-03 22:53:17 +0000
commit8c0b363edbfb8231ac61b9e770ba35138a039107 (patch)
tree329c14766fa03136a9912b574ba7304ea3e44e6e /test/ProfileTestMultiDex/Main.java
parent9df9aa7ca920bc6d7e4041834e40525ea4f6a052 (diff)
parentd9f647ac9a5cb0c6f112332d584756251c2cfb9f (diff)
Merge "Extend profman to generate profiles with inline caches"
am: d9f647ac9a Change-Id: I636aa69059d80a1e999cfefce88d7c9bb67a746a
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; };
+}