Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Delphi...

Name: Anonymous 2011-10-13 15:34

It's 2011, and...

    mov     eax, [ebx]
    mov     edx, [ebp-16]
    mov     [eax+4], edx
    mov     eax, [ebx]     ; WTF? Who changed eax or ebx?
    mov     edx, [ebp-12]
    mov     [eax+8], edx
    mov     eax, [ebx]     ; WTF? Who changed eax or ebx?
    mov     edx, [ebp-8]
    mov     [eax+12], edx

...it's compiler is still being retarded.

(I checked, there are no jumps between there. This is one run of code.)

Name: Anonymous 2011-10-13 15:41

And that's why one should always program in x86 asm on an x86 platform.

Name: Anonymous 2011-10-13 15:47

Delphi...
Is that alpha version of C#?

Name: Anonymous 2011-10-13 15:52

>>1
The compiler can't tell if ebx and [eax+4]/[eax+8] are aliased addresses.

Name: Anonymous 2011-10-13 16:09

>>2
Or at least use C and Intel's compiler.

>>4
This is a structure (record) assignment from a copy on the stack to a copy in a heap object.

And even if the compiler can't tell if they're aliased or not, it's a little annoying how it keeps using eax and edx. If you look at MSVC or Intel's C/C++ compiler output you'll see how it spreads loads and stores across registers to help with parallelism. Here's another two 'wat' fragments:


    xor eax, eax
    mov [ebp-8], eax
    mov [ebp-12], eax
    mov [ebp-16], 0   ; wat



    mov eax, [esp-8]
    mov ebx, [esp-12]
    mov [ebx+4], eax
    mov ebx, [esp-12]    ; wat
    mov ebx, [esp-16]
    mov [ebx+8], eax

Name: Anonymous 2011-10-13 16:31

>>5
Or use GCC.

Name: Anonymous 2011-10-13 16:38

Borland never pretended to have good optimizers. At least their compilers are fast.

>>3
Is that alpha version of C#?
Actually it's the good version of C#. The one that doesn't make your users cringe. The one that actually delivers real, native code, which despite the poor optimizer still outperforms MS' managed languages.

Name: Anonymous 2011-10-13 16:49

>>7
Get out Delphi devs!

Name: Anonymous 2011-10-13 17:02

Pretty sure this is not an aliasing problem...


    xor eax, eax
    mov [ebx+24], eax
    xor eax, eax
    mov [ebx+28], eax

Name: Anonymous 2011-10-13 20:24

Delphi was the "cool thing" when VB was king....

Luckily those days are over.

Name: Anonymous 2011-10-13 20:31

Doesn't Delphi have a restrict equivalent?

Name: Anonymous 2011-10-13 23:09

>>5

mov [ebp-16], 0

Isn't that an assignment to NULL? Doesn't that crash the program?

Name: Anonymous 2011-10-14 0:09

Name: Anonymous 2011-10-14 0:56

Delphi
2011

Name: Anonymous 2011-10-14 4:03

>>14
s/Delphi/Pascal-90/g;

Name: Cudder !MhMRSATORI!FBeUS42x4uM+kgp 2011-10-14 5:05

On the other hand this makes it easier to decompile.

I'm disassembling a Delphi prog myself (compiled several weeks ago) and it's easy to read but incredibly inefficient.

Name: Anonymous 2011-10-14 6:47

It's 2011 and people can still read ASM

Name: Cudder !MhMRSATORI!FBeUS42x4uM+kgp 2011-10-15 6:18

>>17
It's easier to read than any HLL, but a lot more tedious.

I just came across this:

mov eax, [ebp+4]
mov eax, edx

Name: Anonymous 2011-10-15 6:23

Delphi always generated inefficient code like that.

Name: Anonymous 2011-10-15 6:41

>>19
Because Delphi was done by evil french frog-eater, who studied under Niclaus Wirt, who was the one of the cabalistic group responsible for summoning of the great evils - C/C++ and Haskell, by forcing all institutions to adopt their ugly Algol (early C/C++ version) piece of shit.

Name: Anonymous 2011-10-15 15:30

>>16,18
Back to REchan please !

You're its only poster, after all.

Name: Anonymous 2011-10-15 17:53

czech my duh bulls

Name: Anonymous 2011-10-15 17:58

It's 2011, and...

people are still using Delphi?

Name: Anonymous 2011-10-15 19:00

>>6
but GC is shit.

Don't change these.
Name: Email:
Entire Thread Thread List