summaryrefslogtreecommitdiff
path: root/tools/checker/checker.py
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2021-04-21 17:04:13 -0700
committer Alex Light <allight@google.com> 2021-04-26 09:10:12 -0700
commitbb550e415da77e7e21c8f800657984c145bb42e1 (patch)
tree0596ce5d5b1b2f58cef50f8ef133febdd053399c /tools/checker/checker.py
parentadfa1ad73a3a557bdec67d59894139b2727aaa7d (diff)
Fix issue with Partial LSE and casts/instanceof
If PartialLSE encounters an instanceof or check-cast before the escapes it could not correctly handle it. Due to how java language code is typically developed and compiled this is generally not a problem but could lead to incorrect codegen on release builds or DCHECK failures on debug builds. This fixes the issues by (1) causing partial LSE to consider check-cast and instance-ofs to be escaping. This also updates the instruction simplifier to be much more aggressive in removing instance-of and check-casts. Test: ./test.py --host Bug: 186041085 Change-Id: Ia513c4210a87a0dfa92f10adc530e17ee631d006
Diffstat (limited to 'tools/checker/checker.py')
-rwxr-xr-xtools/checker/checker.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/checker/checker.py b/tools/checker/checker.py
index 1e0314199a..ec933f643d 100755
--- a/tools/checker/checker.py
+++ b/tools/checker/checker.py
@@ -72,7 +72,7 @@ def dump_pass(output_filename, pass_name):
def find_checker_files(path):
""" Returns a list of files to scan for check annotations in the given path.
Path to a file is returned as a single-element list, directories are
- recursively traversed and all '.java' and '.smali' files returned.
+ recursively traversed and all '.java', '.j', and '.smali' files returned.
"""
if not path:
Logger.fail("No source path provided")
@@ -83,7 +83,7 @@ def find_checker_files(path):
for root, dirs, files in os.walk(path):
for file in files:
extension = os.path.splitext(file)[1]
- if extension in [".java", ".smali"]:
+ if extension in [".java", ".smali", ".j"]:
found_files.append(os.path.join(root, file))
return found_files
else: