| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#11
| |||
| |||
| Hi Michiel, >I propose that in addition to comparing modification dates, we selectively >compare AST's (if the source file is newer). At the very least this allows >the programmer to modify style, layout and comments without requiring any >recompilation at all. If the comparison utility is smart enough, you may >even perform trivial refactoring without losing semantic equivalence. As per your thought programmer can make cosmetic changes like changing the comments / spaces / tabs / new lines, any such cosmetic change will not lead to re-compilation. How are you going to keep the line number info updated ? It needed by source debugger to refer to correct source line analogous to current assembly/machine instruction . -- Thanks and Regards Jatin Bhateja |
|
#12
| |||
| |||
| On Aug 28, 9:35 am, Jatin Bhateja <Jatin_Bhat...@mentor.com> wrote: > >I propose that in addition to comparing modification dates, we selectively > >compare AST's (if the source file is newer). At the very least this allows > >the programmer to modify style, layout and comments without requiring any > >recompilation at all. If the comparison utility is smart enough, you may > >even perform trivial refactoring without losing semantic equivalence. > > As per your thought programmer can make cosmetic changes like changing > the comments / spaces / tabs / new lines, > any such cosmetic change will not lead to re-compilation. How are you > going to keep the line number info updated ? > It needed by source debugger to refer to correct source line analogous > to current assembly/machine instruction . Good question. It's something I did not initially consider. Of course, when compiling in release mode, this is not a problem. But I agree this is unacceptable, since it's exactly in debug mode where you want the compilation to be fast. I'm not sure how line-numbers and such are usually stored in a binary file. However, I imagine it would be possible to store that information in a separate section of the binary, clearly marked with a unique bit-sequence. Then it is only that section of the binary that would need to be updated by the compiler. This also requires nothing more than the AST. The rest of the binary would be copied bit by bit. I imagine something like that would probably break binary compatibility for existing compilers. I can't say much about this with my limited experience. But it may be a sacrifice worth making. -- Michiel Helvensteijn |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.