Skip to content

Commit

Permalink
remove deprecated functions from crystal.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzure committed Oct 12, 2012
1 parent 82f7e98 commit 69c0125
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions extras/crystal.py
Expand Up @@ -7673,31 +7673,6 @@ def check_address_is_in_file(self):
self.address_is_in_file = new_asm.does_address_have_label(self.address)
return self.address_is_in_file

def get_line_number_from_raw_file(self):
""" Reads the asm file to figure out the line number.
Note that this label might not be in the file yet, like
if this is a newly generated label. However, if crystal.py
has been run before and manipulated main.asm, then it is
possible that this label is already in the file.
"""
lineno = old_is_label_in_asm(self.name)
if lineno:
self.line_number = lineno
self.is_in_file = True
return lineno
else:
self.line_number = None
self.is_in_file = False
return None

def old_check_is_in_file(self):
""" Reads the asm file to figure out if this label
is already inserted or not.
"""
self.get_line_number_from_raw_file()
return self.is_in_file

def old_check_address_is_in_file(self):
""" Checks whether or not the address of the object is
already in the file. This might happen if the label name
Expand Down Expand Up @@ -7733,27 +7708,6 @@ def make_label(self):
line_has_label, get_label_from_line, \
get_address_from_line_comment

def old_is_label_in_asm(label):
""" Returns the line number or returns None if the
label is not in the file. This is an "old" method
because it looks directly at the list of lines
rather than reading a globally shared instance of
the Asm class.
"""

# line numbering begins at 1 in vim
i = 1

# check if any line starts with this label
for line in asm:
if line_has_label(line):
thislabel = get_label_from_line(line)
if thislabel == label:
return i
i += 1

return False

def find_labels_without_addresses():
"""scans the asm source and finds labels that are unmarked"""
without_addresses = []
Expand Down

0 comments on commit 69c0125

Please sign in to comment.