On Monday, 6 January 2014 at 20:08:27 UTC, Jake Thomas wrote:
Things like Object.factory also pulls in it's fair share due to not being able to remove classes. So we get alot of fluff in small programs.

  What do you mean by not being able to remove classes?

Isn't the whole point of offering a language that has both structs, which can have functions, and classes to do away with classes when inheritence
  isn't needed?

Well since you could potentially create classes through Object.factory at runtime the code for unused classes will be compiled into the binary anyways this is even if you never use Object.factory directly in the code. I am not 100% sure but i think the main problem is ModuleInfo that keeps everything alive. And it keeps classes alive since they could be used by object factory. It also keeps other information like unittests locations and static constructors.

What tools and parameters did you use to obtain that dissassembly?

I used the visual studio dissassembly window.


Can you tell whether a 32-bit load was used?


_Dmain:
                push    RBP
                mov     RBP,RSP
                mov     EAX,0Ah
                pop     RBP
                ret



----   mov EAX,0AH

This is a 32-bit instruction. 64-bit instructions use the RAX register.

It's actually the same register but it's just named diffrently depending if you use the full 64-bits or just the lower 32-bits. It will automatically zero extend it.

See https://github.com/yasm/yasm/wiki/AMD64 for a simple intro into x64.

Reply via email to