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.
1158 1159 1160 1161 1162 |
# File 'lib/adlint/cc1/object.rb', line 1158 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.
1164 1165 1166 |
# File 'lib/adlint/cc1/object.rb', line 1164 def address @address end |
#byte_size ⇒ Object (readonly)
Returns the value of attribute byte_size.
1165 1166 1167 |
# File 'lib/adlint/cc1/object.rb', line 1165 def byte_size @byte_size end |
Instance Method Details
#_cascade_update(src, br) ⇒ Object
1187 1188 1189 1190 1191 |
# File 'lib/adlint/cc1/object.rb', line 1187 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
1171 1172 1173 |
# File 'lib/adlint/cc1/object.rb', line 1171 def dynamic? subclass_responsibility end |
#read ⇒ Object
1175 1176 1177 |
# File 'lib/adlint/cc1/object.rb', line 1175 def read @value end |
#static? ⇒ Boolean
1167 1168 1169 |
# File 'lib/adlint/cc1/object.rb', line 1167 def static? subclass_responsibility end |
#write(val, src, br) ⇒ Object
1179 1180 1181 1182 1183 1184 1185 |
# File 'lib/adlint/cc1/object.rb', line 1179 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 |