home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / modula2 / 1404 < prev    next >
Encoding:
Text File  |  1992-11-17  |  3.0 KB  |  79 lines

  1. Newsgroups: comp.lang.modula2
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!spool.mu.edu!agate!apple!mumbo.apple.com!gallant.apple.com!cheryl
  3. From: cheryl@gallant.apple.com (Cheryl Lins)
  4. Subject: Re: Oberon vs Modula-2
  5. Message-ID: <1992Nov16.221811.8761@gallant.apple.com>
  6. Date: Mon, 16 Nov 1992 22:18:11 GMT
  7. References: <1992Nov16.080647.26783@informatik.uni-ulm.de> <gpjqq!h+@aix01.rz.fht-mannheim.de>
  8. Organization: Apple Computer Inc, Cupertino, CA
  9. Lines: 68
  10.  
  11. In article <gpjqq!h+@aix01.rz.fht-mannheim.de> mw%ki.fht-mannheim.de (Marc Wachowitz) writes:
  12.  
  13. >Andreas Borchert (borchert@titania.mathematik.uni-ulm.de) wrote
  14. >in reply to Markku Sakkinen <sakkinen@jyu.fi>:
  15. >: Agreed, programmers shouldn't be enforced to use VAR-parameters
  16. >: for reasons of efficiency only. But, even with the semantics of
  17. >: Oberon or Modula-2, it's not to difficult for the compiler to
  18. >: detect that your 1000 x 1000 array isn't modified and, thus,
  19. >: doesn't need to be copied.
  20. >
  21. >That doesn't work as soon as your procedure is public and (directly or
  22. >indirectly) calls some procedure not fully known to the compiler, since
  23. >the original argument may be accessible and modified behind the back of the
  24. >supposedly innocent routine. According to the current definition it only
  25. >sees a copy made at the entry and therefore would not be influenced by the
  26. >perfectly legal modification, but due to our smart optimizer ... :-(
  27. >
  28.  
  29. Actually interprocedural side-effect analysis  and alias analysis are fairly
  30. complex. See the references below. Very few production compilers implement
  31. such analyses.
  32.  
  33. If the actual parameter is a globally exported variable, and the routine (call
  34. it "p") calls through a procedure variable, it may be impossible at compile-
  35. time to determine whether the actual parameter is modified or not.
  36.  
  37. While the symbol file could be enhanced to carry the interprocedural alias and
  38. side-effect information (and this could improve the analysis in modules calling
  39. imported procedures), there will still be situations where the compiler cannot
  40. determine the full effects. Additional analysis could be done at link-time,
  41. but a good deal of additional information would be necessary for a linker to
  42. do this. Probably not impossible, just a lot of work.
  43.  
  44.  
  45. @inproceedings{cooper:88b,
  46.     author        = "Keith D. Cooper and Ken Kennedy",
  47.     title        = "Interprocedural side-effect analysis in linear time",
  48.     booktitle    = pldi88,
  49.     journal        = sigplan,
  50.     volume        = 23,
  51.     number        = 7,
  52.     pages        = "57--66",
  53.     address        = "Atlanta, GA",
  54.     month        = jun,
  55.     year        = 1988}
  56.  
  57.  
  58. @techreport{cooper:88c,
  59.     author        = "Keith D. Cooper and Ken Kennedy",
  60.     title        = "Complexity of interprocedural side-effect analysis",
  61.     institution    = Rice,
  62.     type        = "Technical Report",
  63.     number        = "Rice COMP TR87-61",
  64.     year        = 1988}
  65.  
  66. @inproceedings{cooper:89a,
  67.     author        = "Keith D. Cooper and Ken Kennedy",
  68.     title        = "Fast interprocedural alias analysis",
  69.     booktitle    = popl89,
  70.     pages        = "49--59",
  71.     address        = "Austin, TX",
  72.     month        = jan,
  73.     year        = 1989}
  74.  
  75.  
  76. -- 
  77. Cheryl Lins  Oberon Paladin  lins@apple.com
  78. "You bloated sack of protoplasm!" - Ren
  79.