[project @ 2002-02-06 11:13:47 by sewardj]
authorsewardj <unknown>
Wed, 6 Feb 2002 11:13:49 +0000 (11:13 +0000)
committersewardj <unknown>
Wed, 6 Feb 2002 11:13:49 +0000 (11:13 +0000)
commit70d68b088f9531ceb1ff6fa5cad1ee285f9c7187
treeeb4988271bae077d43659855f2199d3c0d7093f8
parent49fe21121cf7532457b69e68d5cb17f73230b4e5
[project @ 2002-02-06 11:13:47 by sewardj]
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.
ghc/compiler/absCSyn/AbsCSyn.lhs
ghc/compiler/absCSyn/AbsCUtils.lhs
ghc/compiler/absCSyn/MachOp.hs
ghc/compiler/absCSyn/PprAbsC.lhs
ghc/compiler/nativeGen/AbsCStixGen.lhs
ghc/compiler/nativeGen/Stix.lhs
ghc/compiler/nativeGen/StixPrim.lhs