summaryrefslogtreecommitdiff
path: root/tools/checker/file_format/c1visualizer/parser.py
diff options
context:
space:
mode:
authorDaniil Riazanovskiy <riazanovskiy@google.com>2020-10-06 16:29:38 +0000
committerRoland Levillain <rpl@google.com>2020-10-07 11:52:15 +0000
commit961f2954c12cfd66970a3150f2e3ef9b2567300f (patch)
tree3a10e0b5a0f9c9ec5f9f43116cd9d918e5376853 /tools/checker/file_format/c1visualizer/parser.py
parent8d34a182fea1b24f7b8361b55e930cb953cf3fb2 (diff)
Port Checker to python 3
The porting only required very minor changes, mostly related to the change of the meaning of the str type Test: ./run_unit_tests.py Test: atest art-run-test-583-checker-zero Bug: 162408889 Change-Id: I9199a740ef19bfadddd6c52c0906e3a843c3ac2e
Diffstat (limited to 'tools/checker/file_format/c1visualizer/parser.py')
-rw-r--r--tools/checker/file_format/c1visualizer/parser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/checker/file_format/c1visualizer/parser.py b/tools/checker/file_format/c1visualizer/parser.py
index a31bc565e6..9234bde9d1 100644
--- a/tools/checker/file_format/c1visualizer/parser.py
+++ b/tools/checker/file_format/c1visualizer/parser.py
@@ -37,7 +37,7 @@ def __parseC1Line(c1File, line, lineNo, state, fileName):
if state.currentState == C1ParserState.StartingCfgBlock:
# Previous line started a new 'cfg' block which means that this one must
# contain the name of the pass (this is enforced by C1visualizer).
- if re.match("name\s+\"[^\"]+\"", line):
+ if re.match(r"name\s+\"[^\"]+\"", line):
# Extract the pass name, prepend it with the name of the method and
# return as the beginning of a new group.
state.currentState = C1ParserState.InsideCfgBlock
@@ -54,12 +54,12 @@ def __parseC1Line(c1File, line, lineNo, state, fileName):
elif state.currentState == C1ParserState.InsideCompilationBlock:
# Search for the method's name. Format: method "<name>"
- if re.match("method\s+\"[^\"]*\"", line):
+ if re.match(r"method\s+\"[^\"]*\"", line):
methodName = line.split("\"")[1].strip()
if not methodName:
Logger.fail("Empty method name in output", fileName, lineNo)
- m = re.search("isa_features:([\w,-]+)", methodName)
+ m = re.search(r"isa_features:([\w,-]+)", methodName)
if (m):
rawFeatures = m.group(1).split(",")
# Create a map of features in the form {featureName: isEnabled}.