mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-04 18:20:09 +01:00
changed from dict DB back to list DB for now
This commit is contained in:
@@ -68,21 +68,21 @@ class MachineModel(object):
|
|||||||
|
|
||||||
def get_instruction(self, name, operands):
|
def get_instruction(self, name, operands):
|
||||||
"""Find and return instruction data from name and operands."""
|
"""Find and return instruction data from name and operands."""
|
||||||
return self.get_instruction_from_dict(name, operands)
|
# return self.get_instruction_from_dict(name, operands)
|
||||||
# if name is None:
|
if name is None:
|
||||||
# return None
|
return None
|
||||||
# try:
|
try:
|
||||||
# return next(
|
return next(
|
||||||
# instruction_form
|
instruction_form
|
||||||
# for instruction_form in self._data['instruction_forms']
|
for instruction_form in self._data['instruction_forms']
|
||||||
# if instruction_form['name'].upper() == name.upper()
|
if instruction_form['name'].upper() == name.upper()
|
||||||
# and self._match_operands(instruction_form['operands'], operands)
|
and self._match_operands(instruction_form['operands'], operands)
|
||||||
# )
|
)
|
||||||
# except StopIteration:
|
except StopIteration:
|
||||||
# return None
|
return None
|
||||||
# except TypeError as e:
|
except TypeError as e:
|
||||||
# print('\nname: {}\noperands: {}'.format(name, operands))
|
print('\nname: {}\noperands: {}'.format(name, operands))
|
||||||
# raise TypeError from e
|
raise TypeError from e
|
||||||
|
|
||||||
def get_instruction_from_dict(self, name, operands):
|
def get_instruction_from_dict(self, name, operands):
|
||||||
if name is None:
|
if name is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user