Changes between Version 4 and Version 5 of Pointers


Ignore:
Timestamp:
11/11/13 09:40:00 (13 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Pointers

    v4 v5  
    234234}
    235235}}}
     236
     237== Implementation ==
     238
     239I don't think it's possible to implement the scope-parameterized constructs by translating the program to one without the scope parameters.
     240
     241The reason is that if there is a cycle in the call graph, you may need an infinite number of non-scope-parameterized procedures.
     242Here is an example.
     243
     244Original program outline:
     245{{{
     246| <t1> void f(int *<t1> x);
     247| | scope s1
     248| | g<s1>(...)
     249| <t2> void g(int *<t2> y);
     250| | scope s2
     251| | f<s2>(...)
     252| main() { f<s0>(...); }
     253}}}
     254
     255Attempt to expand scope-parameterized procedures statically:
     256
     257{{{
     258| f0(s0)
     259| | scope s1.0
     260| | g<s1.0>
     261| g0(s1.0)
     262| | scope s2.0
     263| | f<s2.0>
     264| f2(s2.0)
     265| | scope s1.1
     266| | g<s1.1>
     267| g1
     268etc.
     269}}}
     270