@@ -188,11 +188,15 @@ def call_op(
188188 Put opcode in the class of instructions that perform calls.
189189 """
190190 loc ["callop" ].add (opcode )
191+ if "hasarg" in loc :
192+ loc ["hasarg" ].append (opcode )
191193 nargs_op (loc , name , opcode , pop , push , fallthrough )
192194
193195
194196def compare_op (loc : dict , name : str , opcode : int , pop : int = 2 , push : int = 1 ) -> None :
195197 def_op (loc , name , opcode , pop , push )
198+ if "hasarg" in loc :
199+ loc ["hasarg" ].append (opcode )
196200 loc ["hascompare" ].append (opcode )
197201 loc ["binaryop" ].add (opcode )
198202
@@ -203,6 +207,8 @@ def conditional_op(loc: dict, name: str, opcode: int) -> None:
203207
204208def const_op (loc : dict , name : str , opcode : int , pop : int = 0 , push : int = 1 ) -> None :
205209 def_op (loc , name , opcode , pop , push )
210+ if "hasarg" in loc :
211+ loc ["hasarg" ].append (opcode )
206212 loc ["hasconst" ].append (opcode )
207213 loc ["nullaryop" ].add (opcode )
208214
@@ -225,6 +231,8 @@ def def_op(
225231
226232def free_op (loc : dict , name : str , opcode : int , pop : int = 0 , push : int = 1 ) -> None :
227233 def_op (loc , name , opcode , pop , push )
234+ if "hasarg" in loc :
235+ loc ["hasarg" ].append (opcode )
228236 loc ["hasfree" ].append (opcode )
229237
230238
@@ -242,6 +250,8 @@ def jabs_op(
242250 """
243251 def_op (loc , name , opcode , pop , push , fallthrough = fallthrough )
244252 loc ["hasjabs" ].append (opcode )
253+ if "hasarg" in loc :
254+ loc ["hasarg" ].append (opcode )
245255 if conditional :
246256 loc ["hascondition" ].append (opcode )
247257
@@ -252,12 +262,16 @@ def jrel_op(loc, name: str, opcode: int, pop: int=0, push: int=0, conditional=Fa
252262 """
253263 def_op (loc , name , opcode , pop , push , fallthrough )
254264 loc ["hasjrel" ].append (opcode )
265+ if "hasarg" in loc :
266+ loc ["hasarg" ].append (opcode )
255267 if conditional :
256268 loc ["hascondition" ].append (opcode )
257269
258270
259271def local_op (loc , name , opcode : int , pop = 0 , push = 1 ) -> None :
260272 def_op (loc , name , opcode , pop , push )
273+ if "hasarg" in loc :
274+ loc ["hasarg" ].append (opcode )
261275 loc ["haslocal" ].append (opcode )
262276 loc ["nullaryop" ].add (opcode )
263277
@@ -268,6 +282,8 @@ def name_op(loc: dict, op_name, opcode: int, pop=-2, push=-2) -> None:
268282 """
269283 def_op (loc , op_name , opcode , pop , push )
270284 loc ["hasname" ].append (opcode )
285+ if "hasarg" in loc :
286+ loc ["hasarg" ].append (opcode )
271287 loc ["nullaryop" ].add (opcode )
272288
273289
@@ -278,6 +294,8 @@ def nargs_op(
278294 Put opcode in the class of instructions that have a variable number of (or *n*) arguments
279295 """
280296 def_op (loc , name , opcode , pop , push , fallthrough = fallthrough )
297+ if "hasarg" in loc :
298+ loc ["hasarg" ].append (opcode )
281299 loc ["hasnargs" ].append (opcode )
282300
283301
0 commit comments