And I am just about to get a Debug Probe so I can step by step debug bootloader on arm
Читать полностью…Yeah, but no.
What you usually do is the exact opposite. Break down everything into tiny atomic operations with assignments and then try to find out what can you chain how so it uses only registers and what has to be saved to main memory.
That's optimizations that could happen significantly deeper. With languages of syntactic complexity of ALGOL you really need intermediate representation(s) to work through it so stuff like this wouldn't immediately affect syntax.
Not sure how the original compilers looked but as far as I know this type of language is most commonly translated to https://en.m.wikipedia.org/wiki/Static_single-assignment_form first before any register assignment could happen.
I mean like older revisions where accumulator and x was added for example and it would be stored in accumulator. As I said its just assumption tho
Читать полностью…Why are they scamming me? “Tax and shipping included”
Also them: “tax including shipping excluded”
Yeah thats what I mean by assembly. Like it could have been a limitation or optimization or whatever. It just makes sense to me like this. Because why would you clean up after yourself if you don’t even know if that register is gonna get used. Do it before you use it and just the ones you use. from a security standpoint this may sound bad tho but Not sure if it would have any real danger except with syscalls
Читать полностью…BTW they = team at Bell labs. B was mostly Ken Thompson with some contribution of Dennis Ritchie. And C of course is chiefly Dennis.
Читать полностью…Not sure what "side effect of assembly" means, but this was deliberate decision in C to allow setting multiple variables to the same value in a single statement.
Most likely copied from BCPL but I didn't check.
But unlike BCPL and the rest of ALGOL-derived languages they decided to change := to = and = to == when making a BCPL clone for PDP-11 minicomputer they called B to save couple of bytes on the size of source files as assignments were slightly more common. That's also when curly braces were introduced.
C started as B + types, the syntax was pretty much the same, optimized for density IMO at the cost of readability, so this mistake is much easier to make.
And of course the major point for advertising C++ back in the day was backwards compatibility with C. It was implemented using a transpiler into C fairly often too.