2 comments

[ 4.5 ms ] story [ 12.4 ms ] thread
I wrote all 138,000 lines from scratch, over 9 years.

You guys are niggers. India-niggers?

God says... quit buy blest Wisdom possess

My compiler generates an intermediate language -- an array of stack operations that eventually gets converted to machine code.

------ input file ----

f=i*5;

----------------------

Parsed:

    PUSH address off RBP of f
    PUSH address off RBP of i
    POP and dereference i, push result.
    PUSH immediate 5
    POP and MUL Top TWO
    POP Top Two, put result in dereferenced second from top

-----

    Keep top-of-stack in RAX

    Assign REG variables to frequent offsets off RBP
    
-----

    merge little instructions into bigger ones
----

    Convert to machine code
(from 2006, so not sure what it's doing here, but anyway..)

This "oddity" is how every C compiler and linker behaves (that I've used) You need it behave this way to have some control over what gets linked in the face of multiple definitions.