git @ Cat's Eye Technologies SixtyPical / 11d6c08
In fact the 'src' should never (I think?) be 'touched'. Chris Pressey 7 years ago
1 changed file(s) with 1 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
140140
141141 def set_touched(self, *refs):
142142 for ref in refs:
143 # FIXME review the whole "touched" thing. what does it even mean? how is it different from "written"?
144 if isinstance(ref.type, RoutineType):
145 continue
146143 self._touched.add(ref)
147144
148145 def set_meaningful(self, *refs):
402399 elif isinstance(src, IndirectRef) and isinstance(dest, LocationRef):
403400 context.assert_meaningful(src.ref, REG_Y)
404401 # TODO this will need to be more sophisticated. the thing ref points to is touched, as well.
405 context.set_touched(src.ref) # TODO and REG_Y? if not, why not?
406 context.set_touched(dest)
407402 context.set_written(dest)
408403 elif isinstance(src, LocationRef) and isinstance(dest, IndexedRef):
409404 context.assert_meaningful(src, dest.ref, dest.index)
410 context.set_touched(src) # TODO and dest.index?
411405 context.set_written(dest.ref)
412406 elif isinstance(src, ConstantRef) and isinstance(dest, IndexedRef):
413407 context.assert_meaningful(src, dest.ref, dest.index)
414408 context.set_written(dest.ref)
415409 elif isinstance(src, IndexedRef) and isinstance(dest, LocationRef):
416410 context.assert_meaningful(src.ref, src.index, dest)
417 context.set_touched(dest) # TODO and src.index?
411 context.set_touched(dest)
418412 context.set_written(dest)
419413 else:
420414 context.assert_meaningful(src)