File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,16 @@ class Attrs(Map) :
248
248
class Attr (ADT ) :
249
249
"""Attribute is a pair of attribute name and value,
250
250
both represented with str"""
251
- pass
251
+
252
+ @property
253
+ def name (self ):
254
+ """name of attribute"""
255
+ return self .arg [0 ]
256
+
257
+ @property
258
+ def value (self ):
259
+ """value of attribute"""
260
+ return self .arg [1 ]
252
261
253
262
class Values (Map ) :
254
263
"""A set of possible values, taken by a phi-node.
@@ -362,7 +371,15 @@ class Annotation(ADT) :
362
371
Each annotation denotes an association between a memory region and
363
372
some arbitrary property, denoted with an attribute.
364
373
"""
365
- pass
374
+ @property
375
+ def region (self ):
376
+ """memory region"""
377
+ return self .arg [0 ]
378
+
379
+ @property
380
+ def attr (self ):
381
+ """memory region attribute"""
382
+ return self .arg [1 ]
366
383
367
384
def parse_addr (str ):
368
385
return int (str .split (':' )[0 ],16 )
You can’t perform that action at this time.
0 commit comments