diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2021-04-06 17:12:41 -0700 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2021-04-06 17:12:41 -0700 |
commit | 68e8af32e419d5e1b10f528565c4574982d0f3f1 (patch) | |
tree | 61a95e818c05af6ceb873f1fd2f236f4052f80fc /test/ProfileTestMultiDex | |
parent | 555437b770eb98e59664dd96e3953fe44fcafd02 (diff) | |
parent | 405bc3eb23c86228a24aca8e794862db40d88056 (diff) |
Merge 405bc3eb23c86228a24aca8e794862db40d88056 on remote branch
Change-Id: Id4eea54954862b097f0700b362f6b71dc74c8f1e
Diffstat (limited to 'test/ProfileTestMultiDex')
-rw-r--r-- | test/ProfileTestMultiDex/Main.java | 34 | ||||
-rw-r--r-- | test/ProfileTestMultiDex/Second.java | 1 | ||||
-rw-r--r-- | test/ProfileTestMultiDex/main.jpp | 3 | ||||
-rw-r--r-- | test/ProfileTestMultiDex/main.list | 1 |
4 files changed, 38 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. diff --git a/test/ProfileTestMultiDex/Second.java b/test/ProfileTestMultiDex/Second.java index a2bb8d4bfd..c9b3c0be04 100644 --- a/test/ProfileTestMultiDex/Second.java +++ b/test/ProfileTestMultiDex/Second.java @@ -28,6 +28,7 @@ class Second { class SubC extends Super { int getValue() { return 24; } + int getIdentity() { return 42; } } class TestIntrinsicOatdump { diff --git a/test/ProfileTestMultiDex/main.jpp b/test/ProfileTestMultiDex/main.jpp index 0644072510..bd548a88ed 100644 --- a/test/ProfileTestMultiDex/main.jpp +++ b/test/ProfileTestMultiDex/main.jpp @@ -4,6 +4,9 @@ Main: TestInqline: @@com.android.jack.annotations.ForceInMainDex class TestInline +Secret: + @@com.android.jack.annotations.ForceInMainDex + class Secret Super: @@com.android.jack.annotations.ForceInMainDex class Super diff --git a/test/ProfileTestMultiDex/main.list b/test/ProfileTestMultiDex/main.list index 6ca79d4bbe..8ef9280c9e 100644 --- a/test/ProfileTestMultiDex/main.list +++ b/test/ProfileTestMultiDex/main.list @@ -1,5 +1,6 @@ Main.class TestInline.class +Secret.class Super.class SubA.class SubB.class |