44# ------------------------------------------------------------------------------
55# The MIT License (MIT)
66#
7- # Copyright (c) 2023 Aarno Labs LLC
7+ # Copyright (c) 2023-2024 Aarno Labs LLC
88#
99# Permission is hereby granted, free of charge, to any person obtaining a copy
1010# of this software and associated documentation files (the "Software"), to deal
@@ -54,7 +54,9 @@ class AppFunctionSignature(InterfaceDictionaryRecord):
5454 args[6..]: indices of registers preserved (not normally preserved)
5555 """
5656
57- def __init__ (self , ixd : "InterfaceDictionary" , ixval : IndexedTableValue ) -> None :
57+ def __init__ (
58+ self , ixd : "InterfaceDictionary" , ixval : IndexedTableValue
59+ ) -> None :
5860 InterfaceDictionaryRecord .__init__ (self , ixd , ixval )
5961
6062 @property
@@ -69,16 +71,22 @@ def parameter_list(self) -> List["FtsParameter"]:
6971 def returntype (self ) -> "BCTyp" :
7072 return self .bcd .typ (self .args [3 ])
7173
72- def index_of_register_parameter_location (self , r : "Register" ) -> Optional [int ]:
74+ def index_of_register_parameter_location (
75+ self , r : "Register" ) -> Optional [int ]:
7376 for p in self .parameter_list :
7477 if p .is_register_parameter_location (r ):
7578 return p .argindex
7679 return None
7780
81+ def index_of_stack_parameter_location (self , offset : int ) -> Optional [int ]:
82+ for p in self .parameter_list :
83+ if p .is_stack_parameter_location (offset ):
84+ return p .argindex
85+ return None
86+
7887 def __str__ (self ) -> str :
7988 return (
8089 str (self .returntype )
8190 + " ("
8291 + ", " .join (str (p ) for p in self .parameter_list )
8392 + ")" )
84-
0 commit comments