summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex/Main.java
diff options
context:
space:
mode:
authorAndroid Build Role Account android-build-prod <android-build-team-robot@google.com>2021-03-11 11:01:02 +0000
committerAndroid Build Role Account android-build-prod <android-build-team-robot@google.com>2021-03-11 11:01:02 +0000
commit4f59e8bdbf43ff4d4f4eaa05d9fde43be7e4b76d (patch)
tree61a95e818c05af6ceb873f1fd2f236f4052f80fc /test/ProfileTestMultiDex/Main.java
parent8ee42794a152f6377b12eb1c03bc45b17dc18e76 (diff)
parent2e93ad25f76b420c060bcbcaefbcb7987f763ed7 (diff)
Snap for 7199817 from 2e93ad25f76b420c060bcbcaefbcb7987f763ed7 to s-keystone-qcom-release
Change-Id: I95868367b14d6184ceb86e38a7f4cca0b5305346
Diffstat (limited to 'test/ProfileTestMultiDex/Main.java')
-rw-r--r--test/ProfileTestMultiDex/Main.java34
1 files changed, 33 insertions, 1 deletions
diff --git a/test/ProfileTestMultiDex/Main.java b/test/ProfileTestMultiDex/Main.java
index 978cb2c6fd..a84cb98543 100644
--- a/test/ProfileTestMultiDex/Main.java
+++ b/test/ProfileTestMultiDex/Main.java
@@ -46,26 +46,58 @@ class TestInline {
public int noInlineCache(Super s) {
return s.getValue();
}
+
+ public int inlineMultiMonomorphic(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+
+ public int inlineMultiPolymorphic(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+
+ public int inlineTriplePolymorphic(Super s, Secret sec, Secret thr) {
+ return s.getValue() + sec.getIdentity() + thr.getIdentity();
+ }
+
+ public int inlineMultiMegamorphic(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+
+ public int inlineMultiMissingTypes(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+
+ public int noInlineCacheMulti(Super s, Secret sec) {
+ return s.getValue() + sec.getIdentity();
+ }
+}
+
+abstract class Secret {
+ abstract int getIdentity();
}
-abstract class Super {
+abstract class Super extends Secret {
abstract int getValue();
}
class SubA extends Super {
int getValue() { return 42; }
+ int getIdentity() { return 24; }
}
class SubB extends Super {
int getValue() { return 38; };
+ int getIdentity() { return 83; }
}
class SubD extends Super {
int getValue() { return 20; };
+ int getIdentity() { return 2; };
}
class SubE extends Super {
int getValue() { return 16; };
+ int getIdentity() { return 61; };
}
// Add a class with lots of methods so we can test profile guided compilation triggers.