A Space & astronomy forum. SpaceBanter.com

Go Back   Home » SpaceBanter.com forum » Space Science » Policy
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

Apollo 11 source code released



 
 
Thread Tools Display Modes
  #1  
Old July 16th 16, 12:48 AM posted to sci.space.policy
Jeff Findley[_6_]
external usenet poster
 
Posts: 2,307
Default Apollo 11 source code released

In article m,
says...

On 2016-07-12 21:41, Jeff Findley wrote:

Actually, I see this all the time in C++ when you define a pure virtual
interface function in a base class (A) and then have the same
implementation for two derived classes (B and C). For the names given
in parenthesis, when debugging, the debugger will only show the
implementation of that function for B even when called on an object of
type C. Dead giveaway that the linker has discarded the duplicate
implementation.



Such obtimizatiosn are done by the compiler, not the linker. And in a
object oriented language, the compiler does all the stuff to convert the
"object" stuff into procedural code, ( which subroutine to call when you
invoke a method etc). And when the compiler realises that subroutine X
is never called, it doesn't include it in the obvect module because it
is optimized away.


How could this possibly be done in the compiler when the code I'm
talking about is written such that each class has its own .cxx file
which is compiled *separately* into individual object files?

Jeff
--
All opinions posted by me on Usenet News are mine, and mine alone.
These posts do not reflect the opinions of my family, friends,
employer, or any organization that I am a member of.
  #2  
Old July 16th 16, 12:59 AM posted to sci.space.policy
Jeff Findley[_6_]
external usenet poster
 
Posts: 2,307
Default Apollo 11 source code released

In article ,
says...

In article m,
says...

On 2016-07-12 21:41, Jeff Findley wrote:

Actually, I see this all the time in C++ when you define a pure virtual
interface function in a base class (A) and then have the same
implementation for two derived classes (B and C). For the names given
in parenthesis, when debugging, the debugger will only show the
implementation of that function for B even when called on an object of
type C. Dead giveaway that the linker has discarded the duplicate
implementation.



Such obtimizatiosn are done by the compiler, not the linker. And in a
object oriented language, the compiler does all the stuff to convert the
"object" stuff into procedural code, ( which subroutine to call when you
invoke a method etc). And when the compiler realises that subroutine X
is never called, it doesn't include it in the obvect module because it
is optimized away.


How could this possibly be done in the compiler when the code I'm
talking about is written such that each class has its own .cxx file
which is compiled *separately* into individual object files?


Microsoft explains exactly what I'm talking about. The linker
(necessarily) does this optimization.

Why does the debugger show me the wrong function?
https://blogs.msdn.microsoft.com/old...22-00/?p=36113

Jeff
--
All opinions posted by me on Usenet News are mine, and mine alone.
These posts do not reflect the opinions of my family, friends,
employer, or any organization that I am a member of.
  #3  
Old July 17th 16, 05:14 PM posted to sci.space.policy
Jeff Findley[_6_]
external usenet poster
 
Posts: 2,307
Default Apollo 11 source code released

In article om,
says...

On 2016-07-15 19:59, Jeff Findley wrote:

How could this possibly be done in the compiler when the code I'm
talking about is written such that each class has its own .cxx file
which is compiled *separately* into individual object files?


Microsoft explains exactly what I'm talking about. The linker
(necessarily) does this optimization.



As objects are hiearchical and inherit capabilities from their parent,
it is quite possible to have a chair call a method "paint chair" and a
table call "paint table". But as those inherit that capability from
their parent "furniture". The compiler would ask the linker to resolve
"paint furniture" for each of those 2 calls to different routine names
in the source code.

C++ and other object oriented stuff is many many layers above assembly
language where memory allocation and branchig and returning to
subroutines is very explicit.


I've been working with C++ for the last 20 years and hold a job title
commensurate with my 26 years of experience as a software developer. I
don't need to be told how C++ works as I use it every single day as part
of my job.

You, however, ignored my original example completely, have snipped the
link to Microsoft's explanation that I provided, and substituted an
example that is not at all like the one I first gave.

There is no further purpose to engaging you in this thread as you are
being evasive, obtuse, or perhaps both.

Jeff
--
All opinions posted by me on Usenet News are mine, and mine alone.
These posts do not reflect the opinions of my family, friends,
employer, or any organization that I am a member of.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apollo 11 source code released Niklas Holsti Policy 1 July 18th 16 07:20 AM


All times are GMT +1. The time now is 11:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 SpaceBanter.com.
The comments are property of their posters.