@@ -270,42 +270,42 @@ def writes_to_stack(self):
270
270
@property
271
271
def writes_to_memory (self ):
272
272
""" True if the instruction writes to memory """
273
- return self .semantics in ( 'MSTORE' , 'MSTORE8' , 'CALLDATACOPY' , 'CODECOPY' , 'EXTCODECOPY' )
273
+ return self .semantics in { 'MSTORE' , 'MSTORE8' , 'CALLDATACOPY' , 'CODECOPY' , 'EXTCODECOPY' , 'RETURNDATACOPY' , 'CALL' , 'STATICCALL' , 'DELEGATECALL' , 'CALLCODE' }
274
274
275
275
@property
276
276
def reads_from_memory (self ):
277
277
""" True if the instruction reads from memory """
278
- return self .semantics in ( 'MLOAD' , 'CREATE' , 'CALL' , 'CALLCODE ' , 'RETURN ' , 'DELEGATECALL ' , 'REVERT' )
278
+ return self .semantics in { 'MLOAD' , 'CREATE' , 'CALL' , 'STATICCALL ' , 'DELEGATECALL ' , 'CALLCODE ' , 'RETURN' , ' REVERT'}
279
279
280
280
@property
281
281
def writes_to_storage (self ):
282
282
""" True if the instruction writes to the storage """
283
- return self .semantics in 'SSTORE'
283
+ return self .semantics == 'SSTORE'
284
284
285
285
@property
286
286
def reads_from_storage (self ):
287
287
""" True if the instruction reads from the storage """
288
- return self .semantics in 'SLOAD'
288
+ return self .semantics == 'SLOAD'
289
289
290
290
@property
291
291
def is_terminator (self ):
292
292
""" True if the instruction is a basic block terminator """
293
- return self .semantics in ( 'RETURN' , 'STOP' , 'INVALID' , 'JUMP' , 'JUMPI' , 'SELFDESTRUCT' , 'REVERT' )
293
+ return self .semantics in { 'RETURN' , 'STOP' , 'INVALID' , 'JUMP' , 'JUMPI' , 'SELFDESTRUCT' , 'REVERT' }
294
294
295
295
@property
296
296
def is_endtx (self ):
297
297
""" True if the instruction is a transaction terminator """
298
- return self .semantics in ( 'RETURN' , 'STOP' , 'INVALID' , 'SELFDESTRUCT' , 'REVERT' )
298
+ return self .semantics in { 'RETURN' , 'STOP' , 'INVALID' , 'SELFDESTRUCT' , 'REVERT' }
299
299
300
300
@property
301
301
def is_starttx (self ):
302
302
""" True if the instruction is a transaction initiator """
303
- return self .semantics in ( 'CREATE' , 'CREATE2' , 'CALL' , 'CALLCODE' , 'DELEGATECALL' )
303
+ return self .semantics in { 'CREATE' , 'CREATE2' , 'CALL' , 'CALLCODE' , 'DELEGATECALL' , 'STATICCALL' }
304
304
305
305
@property
306
306
def is_branch (self ):
307
307
""" True if the instruction is a jump """
308
- return self .semantics in ( 'JUMP' , 'JUMPI' )
308
+ return self .semantics in { 'JUMP' , 'JUMPI' }
309
309
310
310
@property
311
311
def is_environmental (self ):
@@ -325,8 +325,8 @@ def uses_block_info(self):
325
325
@property
326
326
def is_arithmetic (self ):
327
327
""" True if the instruction is an arithmetic operation """
328
- return self .semantics in (
329
- 'ADD' , 'MUL' , 'SUB' , 'DIV' , 'SDIV' , 'MOD' , 'SMOD' , 'ADDMOD' , 'MULMOD' , 'EXP' , 'SIGNEXTEND' , 'SHL' , 'SHR' , 'SAR' )
328
+ return self .semantics in {
329
+ 'ADD' , 'MUL' , 'SUB' , 'DIV' , 'SDIV' , 'MOD' , 'SMOD' , 'ADDMOD' , 'MULMOD' , 'EXP' , 'SIGNEXTEND' , 'SHL' , 'SHR' , 'SAR' }
330
330
331
331
332
332
def assemble_one (asmcode , pc = 0 , fork = DEFAULT_FORK ):
0 commit comments