Class: AdLint::Cc1::Memory
- Inherits:
-
Object
- Object
- AdLint::Cc1::Memory
- Includes:
- Bindable
- Defined in:
- lib/adlint/cc1/object.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#byte_size ⇒ Object
readonly
Returns the value of attribute byte_size.
Attributes included from Bindable
Instance Method Summary collapse
- #_cascade_update(src, br) ⇒ Object
- #dynamic? ⇒ Boolean
-
#initialize(addr, byte_size) ⇒ Memory
constructor
A new instance of Memory.
- #read ⇒ Object
- #static? ⇒ Boolean
- #write(val, src, br) ⇒ Object
Methods included from Bindable
Constructor Details
#initialize(addr, byte_size) ⇒ Memory
Returns a new instance of Memory.
1167 1168 1169 1170 1171 |
# File 'lib/adlint/cc1/object.rb', line 1167 def initialize(addr, byte_size) @address = addr @byte_size = byte_size @value = nil end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
1173 1174 1175 |
# File 'lib/adlint/cc1/object.rb', line 1173 def address @address end |
#byte_size ⇒ Object (readonly)
Returns the value of attribute byte_size.
1174 1175 1176 |
# File 'lib/adlint/cc1/object.rb', line 1174 def byte_size @byte_size end |
Instance Method Details
#_cascade_update(src, br) ⇒ Object
1196 1197 1198 1199 1200 |
# File 'lib/adlint/cc1/object.rb', line 1196 def _cascade_update(src, br) # NOTE: This method will be called only from # #narrow_value_domain! and # #widen_value_domain! of Variable to propagate memory mutation to # the upper MemoryBlock from MemoryWindow. end |
#dynamic? ⇒ Boolean
1180 1181 1182 |
# File 'lib/adlint/cc1/object.rb', line 1180 def dynamic? subclass_responsibility end |
#read ⇒ Object
1184 1185 1186 |
# File 'lib/adlint/cc1/object.rb', line 1184 def read @value end |
#static? ⇒ Boolean
1176 1177 1178 |
# File 'lib/adlint/cc1/object.rb', line 1176 def static? subclass_responsibility end |
#write(val, src, br) ⇒ Object
1188 1189 1190 1191 1192 1193 1194 |
# File 'lib/adlint/cc1/object.rb', line 1188 def write(val, src, br) if @value @value.overwrite!(val, TransitionTag.new([src], [br])) else @value = VersionedValue.new(val, TransitionTag.new([src], [br])) end end |