dectect_structure() -> detect_control_flow()

This commit is contained in:
rocky
2016-12-29 07:32:36 -05:00
parent 8eb1a16f5b
commit 6f097ff1ca
2 changed files with 6 additions and 6 deletions

View File

@@ -478,7 +478,7 @@ class Scanner2(scan.Scanner):
elif op in self.setup_ops: elif op in self.setup_ops:
count_SETUP_ += 1 count_SETUP_ += 1
def detect_structure(self, offset, op): def detect_control_flow(self, offset, op):
""" """
Detect type of block structures and their boundaries to fix optimized jumps Detect type of block structures and their boundaries to fix optimized jumps
in python2.3+ in python2.3+
@@ -955,7 +955,7 @@ class Scanner2(scan.Scanner):
self.ignore_if = set() self.ignore_if = set()
self.build_statement_indices() self.build_statement_indices()
# Containers filled by detect_structure() # Containers filled by detect_control_flow()
self.not_continue = set() self.not_continue = set()
self.return_end_ifs = set() self.return_end_ifs = set()
self.setup_loop_targets = {} # target given setup_loop offset self.setup_loop_targets = {} # target given setup_loop offset
@@ -968,7 +968,7 @@ class Scanner2(scan.Scanner):
# Determine structures and fix jumps in Python versions # Determine structures and fix jumps in Python versions
# since 2.3 # since 2.3
self.detect_structure(offset, op) self.detect_control_flow(offset, op)
if op_has_argument(op, self.opc): if op_has_argument(op, self.opc):
label = self.fixed_jumps.get(offset) label = self.fixed_jumps.get(offset)

View File

@@ -441,7 +441,7 @@ class Scanner3(Scanner):
self.build_statement_indices() self.build_statement_indices()
self.else_start = {} self.else_start = {}
# Containers filled by detect_structure() # Containers filled by detect_control_flow()
self.not_continue = set() self.not_continue = set()
self.return_end_ifs = set() self.return_end_ifs = set()
self.setup_loop_targets = {} # target given setup_loop offset self.setup_loop_targets = {} # target given setup_loop offset
@@ -453,7 +453,7 @@ class Scanner3(Scanner):
# Determine structures and fix jumps in Python versions # Determine structures and fix jumps in Python versions
# since 2.3 # since 2.3
self.detect_structure(offset, targets) self.detect_control_flow(offset, targets)
has_arg = (op >= op3.HAVE_ARGUMENT) has_arg = (op >= op3.HAVE_ARGUMENT)
if has_arg: if has_arg:
@@ -580,7 +580,7 @@ class Scanner3(Scanner):
return target return target
def detect_structure(self, offset, targets): def detect_control_flow(self, offset, targets):
""" """
Detect structures and their boundaries to fix optimized jumps Detect structures and their boundaries to fix optimized jumps
in python2.3+ in python2.3+