summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix in reference type propagationCalin Juravle2015-10-163-0/+49
| | | | | | | | | | We miss updating the type of objects if their nullability gets updated first. Bug: 25008765 (cherry picked from commit 83853392e26b2aa48328bb90c9f9c57b32c280dc) Change-Id: I81aa759d96008251d74f941494abe74aa4b52bdc
* ART: Add missing GetInterfaceMethodIfProxyAndreas Gampe2015-10-125-0/+97
| | | | | | | | | | | | | Add missing uses of GetInterfaceMethodIfProxy in reflection code. Add a test case for a JNI call to a proxy method. Bug: https://code.google.com/p/android-developer-preview/issues/detail?id=2973 Bug: 23886441 (cherry picked from commit e80673245c0433a71a4930e460be5dc0920885b2) Change-Id: I5b66b64b5561fcee15d0314707d67e8abc02ce5b
* ART: Relax verifier aput checkingAndreas Gampe2015-08-143-0/+29
| | | | | | | | | | | | | When checking on a null array, the cases of aput and aput-wide are shared between integral and floating point types. Be careful to not reject a valid program. Bug: 21867457 Bug: 23201502 (cherry picked from commit 4bf4c78a6e8b7da7cf306e1dd17ff5a55d0c6c98) Change-Id: I6c54a389c06e40a2dae00995aa16ff08a089e512
* ART: Change UninitializedThis tracking in the verifierAndreas Gampe2015-08-123-0/+36
| | | | | | | | | | | | | Only relying on register types is error-prone. For example, we may inadvertently reject correct code when the constructor terminates abnormally. Bug: 20843113 (cherry picked from commit f10b6e109bfb595b6752d1b59db680694ac1684d) (cherry picked from commit af31802e5b74f5b9b8d3aadbaaf48cfde14ff7d1) Change-Id: I8826cd167780df25a6166740f183d216483fa550
* ART: Change UnresolvedMergedType mergeAndreas Gampe2015-08-101-0/+4
| | | | | | | Change to use IsUnresolvedTypes. Bug: 22881413 Change-Id: Ic27b97b475b28a5bdf994ea5178767e0efb0e752
* ART: Change UnresolvedMergedType internal representationAndreas Gampe2015-08-104-0/+307
| | | | | | | | | | Squashed cherry-picks: * 067f1ed7816cf4eb5d6258ca31b387ddb2073ab7 * 750f7c2827318f6d07620f2ef0321218ea4d8670 * 2f90b3415aadc2587d26c767c6bfb235797119a8 * 2ea7b70b2347969f3735bd0ec1b462bd6d2ff1bd Bug: 22881413
* Fix a bug in the register allocator around pair allocation.Nicolas Geoffray2015-08-083-0/+47
| | | | | | | | | | | | | We may get hints that do not work with the current implementation of register pairs, which forces the allocation of (low + 1) for the high register. For example, if the hint is EBX, we will allocate ESP for the high register. bug:23043730 (cherry picked from commit f29758111e71a7d14f3e52d78773561a5d59961f) Change-Id: Ib395e36616017a87d3055218d72417f4e9ff6501
* ART: Fix the simplifier for add/subSerguei Katkov2015-08-063-0/+14
| | | | | | | | | | | | | Instruction simplifier for add/sub should not proceed with floats because that might cause the incorrect behavior with signed zero. Bug: 23001681 Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com> (cherry picked from commit 115b53f609e74672fa93eea1845bb17340d5112a) Change-Id: I9928724c4158b3961e32e376b9203fe01ba2e442
* HDeoptimize should hold values live in env.Mingyao Yang2015-07-282-0/+24
| | | | | | | | | | Values that are not live in compiled code anymore may still be needed in interpreter, due to code motion, etc. (cherry-picked from commit 718493c6c3c8e380663cb8a94e57ce160a6c473f) Bug: 22665511 Change-Id: I8b85833c5c462f8fe36f86d6026a51b07563995a
* Bugfix: Java char is 16 bits, can not be treated as boolean.Fredrik Roubert2015-07-274-6/+6
| | | | | | | | | | | | | | Using SetFieldBooleanVolatile() and SetFieldBoolean() happens to work for char values that only use the lower 8 bits, but is a mistake that was introduced by the "Add AccessibleObject and Field to mirror" commit: https://android.googlesource.com/platform/art/+/daaf326 (cherry picked from commit 3152c82b0d33e5fb0a4aa964ea58451c72734444) Bug:22772717 Change-Id: Iec02ba3084c992ea239ecef688d7d29c7e21ae16
* ART: Fix Quick/Optimizing suspend check assumption mismatch.Vladimir Marko2015-07-231-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Quick's SuspendCheckElimination (SCE) expects that every method contains a suspend check and it eliminates suspend checks in loops containing an invoke. Optimizing eliminates the suspend check from leaf methods, so the combination of a Quick-compiled loop calling an Optimizing-compiled leaf method can lead to missing suspend checks and potentially leading to ANRs. Enable Quick's kLeafOptimization flag to remove suspend checks from leaf methods and disable Quick's SCE. This aligns the suspend check placement for the two backends and avoids the broken combination. Currently, all methods containing a try-catch are compiled with Quick, so it's relatively easy to create a regression test. However, this test will not be valid when Optimizing starts supporting try-catch. Bug: 22657404 (cherry picked from commit d29e8487ff1774b6eb5f0e18d854415c1ee8f6b0) Change-Id: I733c38bf68bfc2c618f2f2e6b59f8b0e015d7be1
* Merge "ART: Boolean simplifier fix" into mnc-devNicolas Geoffray2015-07-174-3/+39
|\
| * ART: Boolean simplifier fixSerguei Katkov2015-07-164-3/+39
| | | | | | | | | | | | | | | | | | Boolean simplifier should not remove condition instruction if it has side effects. (cherry picked from commit 108ceb48edea654c544b483c302212e43d79a472) Change-Id: I00dd595da1bba0f027f5c8647035e9fd8ba62ee1
* | ART: DCE should know that array-length can throw NPESerguei Katkov2015-07-163-0/+35
|/ | | | | | | | | | | array-length can throw NPE so it should be taking into account. Bug: 22521944 Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com> (cherry picked from commit b016c6dd3c30b04104a0a43dc294ce93e5f63874) Change-Id: I6232430a02f9e6d156ad2aae0eb5a630118c0e79
* Re-enable run-test 449-checker-bce on MIPS64.Roland Levillain2015-07-131-14/+0
| | | | | | | (cherry picked from commit c3f73f788a2f46e4007433bd3ed3dce64e2f5f33) Bug: 21555893 Change-Id: I92e11637cc1f8f694e4d4138512cbcf47e22a249
* Fix proxy handling in FindDeclaredVirtualMethodMathieu Chartier2015-07-112-0/+32
| | | | | | | | | | | | | Added missing GetInterfaceMethodIfProxy and test. Fixed formatting. Bug: 22411819 https://code.google.com/p/android-developer-preview/issues/detail?id=2635 (cherry picked from commit 72156e28fd6bc72ac965b29446f8801b2e82f2fd) Change-Id: I3eece9c72091bb9d0262aacf0a75ec6908b5f4d2
* ART: Change merges with Undefined to UndefinedAndreas Gampe2015-07-094-0/+48
| | | | | | | | | | | | | | | | The result of a merge with an Undefined type should be Undefined. Conflicts are allowed to be copied around, but Undefined registers should not be touched at all, except to be written into. Add a success test case (the register isn't used) and a fail test case (the register is tried to be copied). Bug: 22331663 Bug: 22371999 (cherry picked from commit 97a1ff353f254b6e46c7501fe3f0e3254c2517b4) Change-Id: I9697ce31c1d2ab5aee0433dcf1253bcca79c2983
* ART: Fix testAndreas Gampe2015-07-091-0/+3
| | | | | | | | | | | | | Fixes a breakage from 38536287f61c9c0fc3bab8c1950cf8c74881482a. Ensure that v4 is not undefined when an exception may be thrown (at the new-instance). Bug: 22331663 Bug: 22371999 (cherry picked from commit 7135ff0fdfd02796d40e7ef3c7527ff127512bd3) Change-Id: Ice36ddda5ca92ea32fa88523dd616d4f2a61027e
* Support compiling run-tests with jackSebastien Hertz2015-07-0925-109/+475
| | | | | | | | | | | | | | | | | | | | | | | | This CL adds support to compile run-test source files with jack. When a test needs to rely on class files, we use jill to convert them to a jack library. We need to pass the full classpath to jack containing at least core classes (like java.lang.Object). This means the Android tree must have been compiled with jack first so we find all the necessary classes.jack files. Some tests still rely on dex files generated with the old toolchain. We keep building them this way for the moment and will update them later, when they get ready for Jack. Also updates a few tests dealing with garbage collection to avoid a situation where a reference can be retained by a local DEX register. Bug: 19467889 (cherry picked from commit 19ac0276208f0afef6ba8a4ab34b74a59b8d11d7) Change-Id: Ia5a989b83430ffe8298a869a1da970b756721bb0
* ART: Allow to set and copy conflicts in the verifierAndreas Gampe2015-07-083-0/+38
| | | | | | | | | | | As long as conflicts are not actively being used, it is OK to set them in a register line or copy them around. Bug: 22331663 (cherry picked from commit 38536287f61c9c0fc3bab8c1950cf8c74881482a) Change-Id: I61999e2d9c92f9bdedcb0a5dea54df3c5bb130ca
* Merge "ART: Release inputs in Long.reverse intrinsic in x86" into mnc-devAndreas Gampe2015-07-081-0/+39
|\
| * ART: Release inputs in Long.reverse intrinsic in x86Andreas Gampe2015-07-081-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | In the worst case we are using two temps each for input and output. Then we do not have a temp left over for the swap operations. The input is dead, however, after the first swap. So try to release it (a no-op if it isn't actually a temp). Bug: 22324327 (cherry picked from commit 575422fa5be7389bdaff5e2d25dd87b1d2d4de85) Change-Id: I1fc50159afdad14160e34abeaf4670958171d6b2
* | ART: Fix opsize in LoadArgDirectAndreas Gampe2015-07-073-0/+10
|/ | | | | | | | | | | If the destination register is a reference, use kReference for the op size. Bug: 22244733 (cherry picked from commit 185a5586c8b796e770e9b4b7ac2befa8ccdaca7e) Change-Id: Idf52f2ee4c65b5dc41cb66257d95281dc6f32255
* Add implicit null pointer and stack overflow checks for Mips.Douglas Leung2015-07-031-17/+0
| | | | | | | (cherry picked from commit 22bb5a2ebc1e2724179faf4660b2735dcb185f21) Bug: 21555893 Change-Id: I2a995be128a5603d08753c14956dd8c8240ac63c
* Do not create a HBoundType when the instruction is non-null.Nicolas Geoffray2015-07-021-0/+15
| | | | | | | | | | We don't need to refine the type after a null check, if the instruction is known non null or null. As a side effect, this avoids replacing HLoadClass instructions with HBoundType instructions. bug:22116987 Change-Id: I565ae95db5a64faec30e026674636e398e0bf445
* Merge "Do not replace a live phi with a dead phi." into mnc-devNicolas Geoffray2015-07-014-0/+67
|\
| * Do not replace a live phi with a dead phi.Nicolas Geoffray2015-06-294-0/+67
| | | | | | | | | | | | | | | | | | | | | | A dead phi is not properly typed. Therefore, always use the live phi equivalent instead. bug:21865466 (cherry picked from commit 4230e1895b915a22363452823b0e51eabe92cb60) Change-Id: If9a3313fc953c2eb4be85b625676e48112fcb1f6
* | Revert "Revert "Do not update the type of something we already know.""Nicolas Geoffray2015-06-293-0/+27
|/ | | | | | | | | | This reverts commit 63107a804ce17db9789051e1fe310d99d1dae1cb. bug:22116987 (cherry picked from commit f9a199571417b5a5a62d94d05a064077e14dd2c4) Change-Id: Ia516f2cbce6d22df37f3a0854abdd0b54d3ea72d
* Merge "MIPS: Initial version of optimizing compiler for MIPS64R6." into mnc-devRoland Levillain2015-06-291-0/+31
|\
| * MIPS: Initial version of optimizing compiler for MIPS64R6.Roland Levillain2015-06-261-0/+31
| | | | | | | | | | | | | | | | | | | | (cherry picked from commit 4dda3376b71209fae07f5c3c8ac3eb4b54207aa8) (amended for mnc-dev) Bug: 21555893 Change-Id: I874dc356eee6ab061a32f8f3df5f8ac3a4ab7dcf Signed-off-by: Alexey Frunze <Alexey.Frunze@imgtec.com> Signed-off-by: Douglas Leung <douglas.leung@imgtec.com>
* | ART: Fix invalid access and DCHECK in verifierAndreas Gampe2015-06-264-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If we get a throwing failure when setting types from the signature, the work instruction index is still invalid. Do not try to copy the line then. As a throwing failure might happen in the above instance, but the flow analysis expects to have a cleared failure flag before processing each instruction, clear the flag. Bug: 21645819 Bug: 22080519 Change-Id: I224c4dad98fa5bb50e62210f0ee30c0dd020e3a6
* | ART: Fix streaming tracing issuesAndreas Gampe2015-06-262-4/+30
|/ | | | | | | | | | | | Fix a lock ordering issue in streaming-mode tracing. Fix a moving-GC issue in streaming-mode tracing. DexCache objects are not good keys for a map. Expose streaming mode for testing in run-tests. Bug: 21760614 Change-Id: Idcd0575684ee3cc0cec3f81b4fdd0d5988c11e8c
* ART: Reset runtime_throw_failure flagAndreas Gampe2015-06-254-4/+34
| | | | | | | | | | | | | | | | The flag is instruction-specific. It transports the info from Fail to the main loop. It must be cleared after each iteration. Introduce a second flag to store whether we saw such a failure at all. Update test expectations. Bug: 22080519 (cherry picked from commit d12e782bcee03ecb6dec41aa9673ef53b638dcea) Change-Id: I32be914819946233babaa4cb7343844d97b61ba5
* Hard-fail get-/put-object to a non-reference field.Vladimir Marko2015-06-253-0/+18
| | | | | | | | Bug: 21886894 (cherry picked from commit 414000ec4d728b5c85f8c6dee4f867fecde59b01) Change-Id: Iafc32f0e45d26f3aaa2d521b98353e7cede16c6f
* [MIPS64] JNI Compiler: Sign-extend int function argumentsLazar Trsic2015-06-241-0/+3
| | | | | | | | | | | | | | | MIPS n64 ABI differs from arm64. Arguments smaller than the 8B stack slot need to be sign-extended. Use combination (lw,sd), instead of (lw,sw) for 4B values. Change fixes software keyboard crash on mips64. Bug: 21555893 (cherry picked from commit f652d605753f1387e7797461b47116c5dcdf928d) Change-Id: I7574d37f6039e9e8c9e0047254be71d28d4c829a
* Merge "Adding optimizing compiler test case for String.<init>." into mnc-devJeff Hao2015-06-241-0/+9
|\
| * Adding optimizing compiler test case for String.<init>.Jeff Hao2015-06-231-0/+9
| | | | | | | | | | Bug: 21991156 Change-Id: Ibd0bd7d3b20680ac06ac08cb857595288c4e9b69
* | Use a flag from the verifier to know if we should compile.Nicolas Geoffray2015-06-244-0/+66
| | | | | | | | | | | | | | | | | | | | | | Only used for the lack of bottom type in the aget-object case for now. Could be used for more. bug:21865466 (cherry picked from commit 4824c27988c8eeb302791624bb3ce1d557b0db6c) Change-Id: I2bb7fe1d4737bd92c1076b5193607d74d8761ee7
* | BCE: don't assume a bounds check always gets a HArrayLength.Nicolas Geoffray2015-06-241-0/+22
| | | | | | | | | | | | | | | | | | | | Deoptimizations may change it to a HPhi. bug:22056703 (cherry picked from commit 8df886b9214802ad689316a1dedb00a6d102555c) Change-Id: I8afcf88e3a12dbe4d87101e6a7cefb8b81e2bb96
* | Recompute dominator tree after DCE.Nicolas Geoffray2015-06-244-0/+69
| | | | | | | | | | | | | | | | bug:22031382 (cherry picked from commit 1f82ecc6a0c9f88d03d6d1a6d95eeb8707bd06c1) Change-Id: I9a74edb185cb806045903dfe9695d9cc1a02e86b
* | BCE: Narrow instead of unconditionnaly overwrite the range.Nicolas Geoffray2015-06-241-6/+23
| | | | | | | | | | | | | | | | bug:21862741 (cherry picked from commit a09ff9c11f07863ac57e6120a824f0d20dfaa284) Change-Id: Ia8e903e09a7f9c2b8ef7cf3522f73f154534b81f
* | Fix another case of un-verified dead code.Nicolas Geoffray2015-06-244-0/+57
|/ | | | | | | | | bug:22042796 https://code.google.com/p/android/issues/detail?id=178008 (cherry picked from commit 1efcc22cd1895c48adccbe49270d8e8583c2b12d) Change-Id: I5c0d783e842da39cd3dcbb2f18ccf784e797a64f
* Do not overwrite an input register in shift operations.Nicolas Geoffray2015-06-233-0/+108
| | | | | | | | | | | 'second_reg' is an input register that can survive the instruction. Instead use the output register as a temporary result. bug:21667432 (cherry picked from commit a4f3581da73b83484a30ab499c4f8ad43b378dab) Change-Id: Ic1f399964911b8a9fc57352130c92b2a0a1b8e0d
* Revert "Revert "Add support for inlining already sharpened interface calls.""Nicolas Geoffray2015-06-223-0/+30
| | | | | | | | bug:21867144 This reverts commit ee39360775066e6b9920348c86ea98bf01d0facf. Change-Id: I69bf85ce7c352b1a22f36f0f2a136f95b4e73bd6
* Revert "Add support for inlining already sharpened interface calls. DO NOT ↵Nicolas Geoffray2015-06-223-30/+0
| | | | | | | | | | MERGE ANYWHERE" This reverts commit c362782609ca6fbc355ccc9ea9110fe671db9671. Reverting in order to make a commit that will merge. bug:21867144
* Revert "Revert "Use IsAssignableFrom instead of IsSubclass for robustness.""Nicolas Geoffray2015-06-224-0/+54
| | | | | | | | | | | | | | | Don't use IsAssignableFrom, but check beforehand if the referrer is an interface. Otherwise, we are being too aggressive on removing clinit checks on interfaces (being a subclass doesn't imply the interface has been initialized). bug:21870666 This reverts commit 463580ca5a1e75e27ad0207537ffc6252091326a. (cherry picked from commit b783b408112d1797da646f576a40f94bcb5162f3) Change-Id: Ida03f453c9b0d4dda87a5696098f9ffbd69a3aa3
* Use compiling class instead of outer class for access checks.Nicolas Geoffray2015-06-227-0/+117
| | | | | | | | bug:21869678 (cherry picked from commit afd06414598e011693137ba044e38756609b2179) Change-Id: I982ccdf46e3f4d0cc1901439e0bc2dcfa0fc661f
* Use compiling class instead of referrer for access checks.Nicolas Geoffray2015-06-224-0/+53
| | | | | | | | bug:21869670 (cherry picked from commit 30451743493bc2f589e96d68ab98f557461f97f9) Change-Id: Ia18986797d166470801e7a9a690c054d2dc57952
* Be careful with predecessor/successor index.Nicolas Geoffray2015-06-225-2/+73
| | | | | | | | | | | | | When we simplify the CFG, we must preserve things that were already simplified. For example, the index in the predecessor list or successor list of a block must be preserved for ensuring the first block is a loop pre header. bug:21867463 (cherry picked from commit 8b20f88b0a8d1b374dd5eaae289d19734c77b8f8) Change-Id: I2581b5a50942290da96cd9ec876f6f2573e0a6c4
* Merge "Don't check the return type in the builder." into mnc-devNicolas Geoffray2015-06-223-0/+32
|\