Re: Linux kernel, possible useless continue



"Bin Chen" <binary.chen@xxxxxxxxx> writes:
Rainer Weikusat <rainer.weiku...@xxxxxxxxx> wrote:

[...]

pgd = pgd_base + pgd_index(PAGE_OFFSET);
pgd_end = pgd_base + PTRS_PER_PGD;
pfn = 0;
do {
pmd = one_md_table_init(pgd);
pmd_end = pmd + PTRS_PER_PMD;
do {
/* pte_t init code */
} while (pfn < max_low_pfn && ++pmd < pmd_end);
} while (++pgd < pgd_end && pfn < max_low_pfn);

while (pgd < pgd_end) one_md_table_init(pgd++);

OTOH, that would trigger several political correctness alerts ...

So in conclusion, the author's purpose is still to avoid another
indention?

The author's intention was likely to express the algorithm given above
with some accidental contortion (like incrementing pointers and
counters or unifiying two 'semantically different' loops into one loop
whose effective body changes at runtime).

That you and the entity calling itself Ulrich Eckhardt apparently
believe that a different algorithm would be translated into

a) identical machine code
b) identical machine code plus some superfluous instructions
c) better machine code
d) anything somebody else may come up with

is not relevant at the source code level. That's why it is called
_source code_, ie something supposed to contain a high-level
description of what is supposed to happen, which a compiler can peruse
to generate some machine code with (hopefully) the desired effect.

Independently of your's and Mr Eckhardt's (unsubstantiated) beliefs
about compilers, source code should not contain noise statements,
because they will confuse an eventual reader.

Always a nice quote in this respect:

A program is a sort of publication. It's meant to be read by
the programmer, another programmer (perhaps yourself a few
days, weeks or years later), and lastly a machine. The
machine doesn't care how pretty the program is - if the
program compiles, the machine's happy - but people do, and
they should.
<URL:http://www.lysator.liu.se/c/pikestyle.html>
.



Relevant Pages

  • Re: How do I dig a memory value out?
    ... The only C compiler I could find at the time was ... The Atari keyboard was missing several characters, ... higher level language plus a few common data types ... hand tweeked machine code was entered directly in the ...
    (microsoft.public.vb.general.discussion)
  • Re: Basic compiler
    ... stand-alone executables in machine code were the "Einstein Compiler" ... and Microsoft's TASC (The AppleSoft Compiler). ...
    (comp.sys.apple2)
  • Re: Basic compiler
    ... stand-alone executables in machine code were the "Einstein Compiler" ... and Microsoft's TASC (The AppleSoft Compiler). ... Apple once made an effort to use the "R" file type in Apple ...
    (comp.sys.apple2)
  • Re: vm02 update
    ... Instant Pascal was a misguided attempt at creating an IDE with automatic formatting and almost instant feedback. ... Editing the source in a tokenized format would keep the memory constraints lower and ease the first pass of the compiler. ... compiled to machine code at all. ...
    (comp.sys.apple2.programmer)
  • Re: VB Com compatibility
    ... C/C++ components are generally going to be faster, ... |> interpreted) while VC is compiled directly to machine code. ... | compiled to native code as well as P-Code. ... | "Visual Basic 5 uses the same compiler technology as Visual C++" ...
    (microsoft.public.vb.com)