• sewardj's avatar
    [project @ 2002-02-06 11:13:47 by sewardj] · 70d68b08
    sewardj authored
    Clean up the AbsC -> AbsC translation of array operations.
    
    * MachOps MO_ReadOSBI and MO_WriteOSBI, which previously did
      array indexing, are gone.  We translate now just to plain
      memory references and explicit address computations.  This
      has the happy side effect that all MachOps now return exactly
      one result (previously it was 0 or 1), cleaning up various
      bits of code.
    
      As a result the Abstract C structure now contains an unneccessary
      restriction, which is that the result of a MachOp can only be
      assigned to a temporary.  This made sense when MachOps had variable
      numbers of results (0, 1 or 2, originally), but is no longer needed.
      MachOps applied to args could now be allowed to appear as
      arbitrary nodes in expression trees, but so far they are not.
    
    * Get rid of CAddrMode constructor CMem, since it is a special case of
      CVal with a RegRelative of CIndex.
    
    AbstractC is inconsistent and non-orthogonal.  The StixStmt + StixExpr
    combination expresses a large part of what AbstractC does in a cleaner
    and simpler way, IMO.
    70d68b08
MachOp.hs 14.7 KB