Add import facility to cmm parser
authorClemens Fruhwirth <clemens@endorphin.org>
Fri, 13 Jul 2007 21:08:45 +0000 (21:08 +0000)
committerClemens Fruhwirth <clemens@endorphin.org>
Fri, 13 Jul 2007 21:08:45 +0000 (21:08 +0000)
commitd55027c917a101692ded11b6b1421052866df2d4
tree8edd936df3fe0ccc5fc90784e65f9178dfbebc43
parent1e15be89f436ae0a8ad0c2ca4fbf949c8f2c6cfc
Add import facility to cmm parser

The cmm parser classified all unknown variables as imported. This
behaviour is not changed with this patch. Explicitly imported
variables get a different internal label type, namely ForeignLabel
instead of RtsLabel. In PIC compilation, the NCG creates dynamic
access for ForeignLabel, while RtsLabel are not treated as PIC when
-package rts. Hence, putting explicit imports into cmm files enables
the NCG to distinguish between RTS-external and RTS-internal symbols,
and create the appropriate code.
compiler/cmm/CmmParse.y